Spikes, better gameHandler, map width and height computed automatically & big peanut hard map
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user