In this chapter, we created a separate Hero class so that all the code pertaining to the Hero class was in one single file. In this Hero class, we managed jumping and the shooting of the rockets in the class. Next, we created the Enemy class, because for every hero, there needs to be a villain in the story! We learned how to add enemies to a vector so that it is easier to loop between the enemies in order to update their position. We also created a Rocket class and managed the rockets using a vector. Finally, we learned how to check for collisions between the enemies and the rockets. This creates the foundation of the gameplay loop.
In the next chapter, we will finish the game, adding sound and text to it in order to give audio feedback to the player and show the current score.