Skip to content
Snippets Groups Projects
Commit b2f08ded authored by Fabian Heinrich's avatar Fabian Heinrich
Browse files

Formatting

parent b01fe5cb
No related branches found
No related tags found
1 merge request!62Resolve "Game Flow"
......@@ -207,7 +207,7 @@ async def agent():
if not task_type:
task_type = random.choice(["GOTO", "PUT", "INTERACT"])
threshold = datetime.now() + timedelta(seconds=15.0)
threshold = datetime.now() + timedelta(seconds=TIME_TO_STOP_ACTION)
if task_type == "GOTO":
counter_type = random.choice(list(counters.keys()))
task_args = random.choice(counters[counter_type])["pos"]
......
......@@ -793,7 +793,7 @@ class PyGameGUI:
self.fullscreen_button,
self.player_selection_container,
self.bot_number_container,
self.press_a_image
self.press_a_image,
]
self.tutorial_screen_elements = [
......@@ -948,7 +948,10 @@ class PyGameGUI:
relative_rect=rect,
manager=self.manager,
object_id="#recipe",
anchors={"centerx": "centerx", "top_target": self.completed_meals_text_label},
anchors={
"centerx": "centerx",
"top_target": self.completed_meals_text_label,
},
)
else:
meal_label = pygame_gui.elements.UILabel(
......@@ -956,7 +959,10 @@ class PyGameGUI:
relative_rect=rect,
manager=self.manager,
object_id="#recipe",
anchors={"centerx": "centerx", "top_target": self.last_completed_meals[idx - 1]},
anchors={
"centerx": "centerx",
"top_target": self.last_completed_meals[idx - 1],
},
)
self.last_completed_meals.append(meal_label)
self.all_completed_meals.append(meal_label)
......@@ -1137,7 +1143,10 @@ class PyGameGUI:
manager=self.manager,
# container=self.recipes_container,
object_id="#recipe",
anchors={"centerx": "centerx", "top_target": self.text_recipes_label},
anchors={
"centerx": "centerx",
"top_target": self.text_recipes_label,
},
)
else:
recipe_label = pygame_gui.elements.UILabel(
......@@ -1149,7 +1158,10 @@ class PyGameGUI:
manager=self.manager,
# container=self.recipes_container,
object_id="#recipe",
anchors={"centerx": "centerx", "top_target": self.last_recipes_labels[idx-1]},
anchors={
"centerx": "centerx",
"top_target": self.last_recipes_labels[idx - 1],
},
)
self.last_recipes_labels.append(recipe_label)
self.all_recipes_labels.append(recipe_label)
......@@ -1252,7 +1264,6 @@ class PyGameGUI:
self.state_player_id = player_id
def setup_game(self, tutorial=False):
self.connect_websockets()
state = self.request_state()
......@@ -1517,11 +1528,9 @@ class PyGameGUI:
case MenuStates.PostGame:
match event.ui_element:
case self.next_game_button:
self.button_continue_postgame_pressed()
case self.finish_study_button:
self.menu_state = MenuStates.End
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment