diff --git a/src/Engine.py b/src/Engine.py index b41f6ad..b2ae7bc 100644 --- a/src/Engine.py +++ b/src/Engine.py @@ -48,6 +48,7 @@ class Engine: self.runnin: bool = False self.paused: bool = False self.show_fringe: bool = False + self.is_simulation: bool = False def build_field(self): s = self.square_size @@ -79,11 +80,16 @@ class Engine: def train_loop(self, stop_condition): print(colored("Simulation started", "green")) + real_action_duration = self.action_duration self.action_duration = 0 + self.is_simulation = True while stop_condition(self.action_clock): self.action() + self.action_duration = real_action_duration + self.is_simulation = False + return self.serviced_tables def user_interaction(self): @@ -156,6 +162,9 @@ class Engine: self.revoke_goal() def log_state(self, state: TemporaryState): + if self.is_simulation: + return + LOG_COLOR = "blue" print( colored("Action:", LOG_COLOR),