diff --git a/main.py b/main.py index d98dcec2aed58594ab0ee67c1a14fd8e4a181ed9..8f69e296088c9edfafec5ea0268976200da40733 100644 --- a/main.py +++ b/main.py @@ -34,14 +34,14 @@ run = True while run: timer.tick(FPS) maze.draw() - player.draw() + player.draw(screen) enemy1.draw(screen) easy_button.draw() normal_button.draw() hard_button.draw() # player_controller.move_to_goal_dfs() - # player_controller.move_to_goal_bfs() + player_controller.move_to_goal_bfs() # player_controller.move_to_goal_dijkstra() # player_controller.move_to_goal_astar() diff --git a/player.py b/player.py index e96c72f82f0a2a7b17728ea424682cf5e4d6fdd8..4a4840a39064f6c82a600714b3437542c3c7ef28 100644 --- a/player.py +++ b/player.py @@ -18,5 +18,5 @@ class Player: This method utilizes the Pygame library to draw a white rectangle representing the player at the specified (x, y) coordinates with the size of TILE_SIZE. """ - def draw(self): + def draw(self, screen): pygame.draw.rect(screen, 'white', (self.x, self.y, TILE_SIZE, TILE_SIZE))