Updated. /JL

This commit is contained in:
2025-04-21 13:56:21 +02:00
parent 4ebb3ad67f
commit 83b06994ce

View File

@@ -165,7 +165,6 @@ class Game:
self.player.direction = PlayerDirection.DirectionRight
self.player.move_right()
elif self.hat_x == -1:
if event.type == pygame.USEREVENT and event.dict.get("type_name") == "JOYHATREPEAT":
if self.maze.is_wall(self.player.location[0] - 1, self.player.location[1]):
break
elif self.maze.is_ghost_home(self.player.location[0] - 1, self.player.location[1]):
@@ -173,7 +172,6 @@ class Game:
self.player.direction = PlayerDirection.DirectionLeft
self.player.move_left()
elif self.hat_y == 1:
if event.type == pygame.USEREVENT and event.dict.get("type_name") == "JOYHATREPEAT":
if self.maze.is_wall(self.player.location[0], self.player.location[1] - 1):
break
elif self.maze.is_ghost_home(self.player.location[0], self.player.location[1] - 1):
@@ -181,7 +179,6 @@ class Game:
self.player.direction = PlayerDirection.DirectionUp
self.player.move_up()
elif self.hat_y == -1:
if event.type == pygame.USEREVENT and event.dict.get("type_name") == "JOYHATREPEAT":
if self.maze.is_wall(self.player.location[0], self.player.location[1] + 1):
break
elif self.maze.is_ghost_home(self.player.location[0], self.player.location[1] + 1):