删除 'game_stats.py'

This commit is contained in:
206530235 2021-06-24 21:28:08 +08:00
parent 6629605c1a
commit cd5dc5099a
1 changed files with 0 additions and 19 deletions

View File

@ -1,19 +0,0 @@
class GameStats():
"""跟踪游戏的统计信息"""
def __init__(self, ai_settings):
"""初始化统计信息"""
self.ai_settings = ai_settings
self.reset_stats()
# 游戏刚启动时处于非活动状态
self.game_active = False
# 在任何情况下不应该重置最高分
self.high_score = 0
self.level = 1
def reset_stats(self):
"""初始化在游戏运行期间可能变化的统计信息"""
self.ships_left = self.ai_settings.ship_limit
self.score = 0