1 Star 0 Fork 0

zhuo木鸟/AlienInvasionGame

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
game_stats.py 585 Bytes
一键复制 编辑 原始数据 按行查看 历史
1259975740 提交于 2021-03-11 19:56 . First version complete
class GameStats():
""" Track statistics for Alien Invasion. """
def __init__(self, ai_settings):
""" Initialize statistic. """
self.ai_settings = ai_settings
self.reset_stats()
# Start Alien Invasion in an inactive state.
self.game_active = False
# Highest score of history
self.high_score = 0
def reset_stats(self):
""" Initialize statistics that can change during the game. """
self.ships_left = self.ai_settings.ship_limit
self.score = 0
self.level = 1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/zhuowoodbird/alien-invasion-game.git
[email protected]:zhuowoodbird/alien-invasion-game.git
zhuowoodbird
alien-invasion-game
AlienInvasionGame
master

搜索帮助