Initialize SDL and load graphics assets in GameWindow constructor

This commit is contained in:
2025-08-12 15:30:45 +02:00
parent aa907ed80a
commit 3266ce8209
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -17,10 +17,10 @@ class MiceMaze(controls.KeyBindings):
self.engine = engine.GameWindow(self.map.width, self.map.height,
self.cell_size, "Mice!",
key_callback=(self.key_pressed, self.key_released, self.axis_scroll))
self.graphics_load()
self.pointer = (random.randint(1, self.map.width-2), random.randint(1, self.map.height-2))
self.scroll_cursor()
self.points = 0
self.graphics_load()
self.units = {}
self.unit_positions = {}
self.unit_positions_before = {}