Spikes, better gameHandler, map width and height computed automatically & big peanut hard map

This commit is contained in:
2026-10-10 16:21:11 +02:00
parent 14a39b7154
commit 17f00ebca2
12 changed files with 131 additions and 37 deletions
+3 -2
View File
@@ -44,10 +44,9 @@ class Game:
if spawn_point_position is None:
raise ValueError("No spawn point found in the map.")
self.gameState.set_player_position(spawn_point_position)
self._position_update()
while not self.gameState.stopGame:
self._position_update() # Update the screen for example
if self.gameState.playerVelocity == -1 and self.waitingForInputCallback:
self.gameState.set_player_velocity(self.waitingForInputCallback())
self.gameState.add_move_count()
@@ -70,6 +69,8 @@ class Game:
self._update_player_velocity()
self._position_update() # Update the screen for example
if self.gameStopCallback and self.gameStopCallback(self.gameState):
self.gameState.set_stop_game(True)
break