parent
d9a6e36284
commit
5e851915d8
@ -0,0 +1,19 @@
|
||||
class GameStats():
|
||||
"""靶子的统计数据"""
|
||||
|
||||
def __init__(self, ai_settings):
|
||||
"""初始化统计信息"""
|
||||
self.ai_settings = ai_settings
|
||||
self.reset_stats()
|
||||
|
||||
# 在非活动状态下开始游戏
|
||||
self.game_active = False
|
||||
|
||||
# 高分不应重置。
|
||||
self.high_score = 0
|
||||
|
||||
def reset_stats(self):
|
||||
"""初始化游戏期间可能更改的统计信息"""
|
||||
self.mans_left = self.ai_settings.man_limit
|
||||
self.score = 0
|
||||
self.level = 1
|
Loading…
Reference in new issue