diff --git a/game_config.json b/game_config.json index 0f7e7c6..c5fa450 100644 --- a/game_config.json +++ b/game_config.json @@ -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": [ diff --git a/main.py b/main.py index 3485878..80df9ad 100644 --- a/main.py +++ b/main.py @@ -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 diff --git a/src/game.py b/src/game.py index 26ae6c0..cad6cf0 100644 --- a/src/game.py +++ b/src/game.py @@ -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