From f9d0aea52ebf485c7e526293eed9dfde0ce34cfc Mon Sep 17 00:00:00 2001 From: Nathanael Lu Date: Mon, 11 Mar 2024 20:33:44 -0400 Subject: [PATCH] updated game_scheduler type annotation --- clash_royale/envs/game_engine/game_engine.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clash_royale/envs/game_engine/game_engine.py b/clash_royale/envs/game_engine/game_engine.py index 54bd48c..3aff46f 100644 --- a/clash_royale/envs/game_engine/game_engine.py +++ b/clash_royale/envs/game_engine/game_engine.py @@ -58,7 +58,7 @@ def __init__(self, self.player2: Player = Player(deck2, fps) self.scheduler: Scheduler = Scheduler(fps) # counting frames - self.game_scheduler: GameScheduler = DefaultScheduler(self.scheduler) # determining elixir etc. + self.game_scheduler: DefaultScheduler = DefaultScheduler(self.scheduler) # determining elixir etc. def reset(self) -> None: """ @@ -156,13 +156,13 @@ def is_terminal(self) -> bool: """ if self.game_scheduler.is_game_over(): return True - + if self.game_scheduler.is_overtime(): - player1_val = self.arena.tower_count(0) - player2_val = self.arena.tower_count(1) + player1_val: int = self.arena.tower_count(0) + player2_val: int = self.arena.tower_count(1) if player1_val != player2_val: return True - + return False def terminal_value(self) -> int: