You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
456 B
Python
14 lines
456 B
Python
class GameStats:
|
|
"""Track statistics for Alien Invasion."""
|
|
|
|
def __init__(self, ai_game):
|
|
"""Initialize statistics."""
|
|
self.settings = ai_game.settings
|
|
self.reset_stats()
|
|
# Start Alien Invasion in an active state.
|
|
self.game_active = True
|
|
|
|
def reset_stats(self):
|
|
"""Initialize statistics that can change during the game."""
|
|
self.ships_left = self.settings.ship_limit
|
|
self.score = 0 |