Well, we have covered a lot of code in this chapter. We have come back to Box2D after being away from it for a while, and we have built a pretty fun pool game. Along the way, we have explored alternate control schemes, how to make the same engine run with different game rules with a minimum of messy code in the core class, and hopefully learned a few new approaches to coding issues, too. Did we build a world-class pool simulator? Absolutely not. We built a fun game that you, the reader, can expand on and explore on your own. There are many ways you could expand on this game. Add new rules to play pool your way. We kept arrays of each player's sunken balls, but we never did anything interesting with them. (That was intentional.) Perhaps you could draw images of the balls from those arrays on the screen to show who sank which balls? The possibilities are there, and by now you should be ready to hack and slash at the code and make it your own.
In the next chapter we will be building...