fix:update version and fix bug

This commit is contained in:
Kylin_on_Mac 2023-10-12 17:22:52 +08:00
parent 88eec69799
commit 161249cb94
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"game_name": "easy_game",
"version": "2.3.1-alpha",
"version": "2.3.2-alpha",
"url": "https://github.com/PAIA-Playful-AI-Arena/easy_game",
"description": "這是一個吃東西小遊戲,除了讓你熟習所有基本操作,也是 PAIA 的遊戲教學範例",
"logo": [

View File

@ -9,7 +9,7 @@ from src.game import EasyGame
FPS = 30
if __name__ == '__main__':
pygame.init()
game = EasyGame(time_to_play=1000, total_point_count=10, score=5, color="FF9800")
game = EasyGame(level=1)
scene_init_info_dict = game.get_scene_init_data()
game_view = PygameView(scene_init_info_dict)
frame_count = 0

View File

@ -37,7 +37,7 @@ class EasyGame(PaiaGame):
def __init__(
self,
level: int = -1,
level_file: str = None,
level_file: str = "",
sound: str = "off",
*args, **kwargs):
super().__init__(user_num=1)
@ -193,7 +193,7 @@ class EasyGame(PaiaGame):
pass
def _init_game(self):
if path.isfile(self._level_file) or self._level_file == "":
if path.isfile(self._level_file):
# set by injected file
self._init_game_by_file(self._level_file)
pass