14 Scoring
In this chapter, we’ll finish building Alien Invasion. We’ll add a Play button to start the game on demand and to restart the game once it ends. We’ll also change the game so it speeds up when the player moves up a level, and we’ll implement a scoring system. By the end of the chapter, you’ll know enough to start writing games that increase in difficulty as a player progresses and that feature complete scoring systems.
Adding the Play Button
In this section, we’ll add a Play button that appears before a game begins and reappears when the game ends so the player can play again.
Right now, the game begins as soon as you run alien_invasion.py ...
Get Python Crash Course, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.