Summary
In this chapter, we coded our first game object classes. We saw that we can encapsulate much of the logic and the data of a bat and a ball into classes to make the game engine less cluttered and error-prone. As we progress through the book and learn even more advanced techniques, we will see that we can encapsulate even more. For example, in the fifth project, starting in Chapter 18, Introduction to Design Patterns and Much More! we will have the game object classes draw themselves as well as handling their own part of responding to screen touches.
In the next chapter, we will finish this Pong game by detecting collisions, making some 1970s-style beeps, and keeping score.