You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
566 B
20 lines
566 B
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
|