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

Update how different screens are managed.

parent 6790f53b
No related branches found
No related tags found
1 merge request!62Resolve "Game Flow"
Pipeline #46579 failed
......@@ -5,7 +5,7 @@ plates:
# range of seconds until the dirty plate arrives.
game:
time_limit_seconds: 300
time_limit_seconds: 100
meals:
all: true
......
overcooked_simulator/gui_2d_vis/controller_tutorial.png

1.41 MiB

......@@ -133,13 +133,13 @@ class Visualizer:
grid_size,
)
for idx, col in zip(controlled_player_idxs, [colors["blue"], colors["red"]]):
pygame.draw.circle(
screen,
col,
np.array(state["players"][idx]["pos"]) * grid_size + (grid_size // 2),
(grid_size / 2),
)
# for idx, col in zip(controlled_player_idxs, [colors["blue"], colors["red"]]):
# pygame.draw.circle(
# screen,
# col,
# np.array(state["players"][idx]["pos"]) * grid_size + (grid_size // 2),
# (grid_size / 2),
# )
self.draw_players(
screen,
......
This diff is collapsed.
overcooked_simulator/gui_2d_vis/recipe_mock.png

2.51 KiB

......@@ -431,6 +431,8 @@ class Environment:
grid = []
max_width = 0
lines = list(filter(lambda l: l != "", lines))
for line in lines:
line = line.replace(" ", "")
......@@ -438,6 +440,7 @@ class Environment:
break
current_x: float = starting_at
grid_line = []
for character in line:
# character = character.capitalize()
pos = np.array([current_x, current_y])
......@@ -460,10 +463,19 @@ class Environment:
current_x += 1
if len(line) >= max_width:
max_width = len(line)
grid.append(grid_line)
current_y += 1
self.kitchen_width: float = len(lines[0]) + starting_at
for line in grid:
print(line)
grid = [line + ([0] * (max_width - len(line))) for line in grid]
for line in grid:
print(line)
self.kitchen_width: float = max_width + starting_at
self.kitchen_height = current_y
self.determine_counter_orientations(
......
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