Initialize SDL and load graphics assets in GameWindow constructor
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user