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

Fixed missing int conversion

parent 923815d8
No related branches found
No related tags found
1 merge request!22Resolve "Sprites for all game items and counters"
Pipeline #43081 passed
......@@ -118,10 +118,7 @@ class PyGameGUI:
self.window_height = self.visualization_config["GameWindow"]["start_height"]
self.main_window = pygame.display.set_mode(
(
self.window_width,
self.window_height,
)
(self.window_width, self.window_height)
)
self.game_width, self.game_height = 0, 0
......@@ -141,6 +138,7 @@ class PyGameGUI:
)
game_height = int(game_width * kitchen_aspect_ratio)
grid_size = int(game_width / self.simulator.env.kitchen_width)
elif self.visualization_config["GameWindow"]["WhatIsFixed"] == "grid":
grid_size = self.visualization_config["GameWindow"]["size"]
game_width, game_height = (
......@@ -156,7 +154,7 @@ class PyGameGUI:
game_height + (2 * self.screen_margin),
)
return window_width, window_height, game_width, game_height, grid_size
return int(window_width), int(window_height), game_width, game_height, grid_size
def create_player_colors(self) -> list[Color]:
number_player = len(self.simulator.env.players)
......
# colors: https://www.webucator.com/article/python-color-constants-module/
GameWindow:
WhatIsFixed: window_width # entweder grid oder window_width
size: 600
WhatIsFixed: grid # entweder grid oder window_width
size: 65
screen_margin: 100
start_width: 600
start_height: 600
......
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