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

Flag for drawing interaction range

parent d8c05a65
No related branches found
No related tags found
1 merge request!1340-visualisierungsregeln
......@@ -20,6 +20,7 @@ from overcooked_simulator.pygame_gui.game_colors import colors, Color
from overcooked_simulator.simulation_runner import Simulator
PLAYER_DEBUG_VIZ = True
SHOW_INTERACTION_RANGE = False
class PlayerKeySet:
......@@ -87,7 +88,7 @@ class PyGameGUI:
def create_player_colors(self) -> list[Color]:
number_player = len(self.simulator.env.players)
hue_values = np.linspace(0, 1, number_player+1)
hue_values = np.linspace(0, 1, number_player + 1)
colors_vec = np.array([col for col in colors.values()])
......@@ -180,9 +181,10 @@ class PyGameGUI:
pygame.draw.circle(self.screen, color2, pos, size)
pygame.draw.circle(self.screen, BLUE, pos, size, width=1)
pygame.draw.circle(
self.screen, BLUE, pos, player.interaction_range, width=1
)
if SHOW_INTERACTION_RANGE:
pygame.draw.circle(
self.screen, BLUE, pos, player.interaction_range, width=1
)
pygame.draw.circle(self.screen, colors[color1], pos, size // 2)
pos = player.pos
......
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