diff options
Diffstat (limited to 'src/pinky.py')
| -rw-r--r-- | src/pinky.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pinky.py b/src/pinky.py index 29949a7..be9e5dc 100644 --- a/src/pinky.py +++ b/src/pinky.py @@ -43,7 +43,7 @@ class Pinky(Ghost): return (27 * 30 + 15, 30 * 30 + 15) @override - def get_next_move(self, pacman, maze, screen, blinky): + def get_next_move(self, game_state, screen): default_tile = self.get_default_tile() dx = [1, 0, -1, 0] @@ -64,25 +64,25 @@ class Pinky(Ghost): rand_pos = (0, 0) - new_target = self.get_four_tiles_ahead_of_pacman(pacman) + new_target = self.get_four_tiles_ahead_of_pacman(game_state.pacman) if settings.debug: pygame.draw.circle(screen, self.color, (new_target[0], new_target[1]), 15) pygame.draw.circle(screen, self.color, default_tile, 15) - if pacman.powerup: + if game_state.pacman.powerup: self.mode = MODE.FRIGHETENED rand_pos = random.randint(0, 900), random.randint(0, 990) - if pacman.powerup is False and self.mode == MODE.FRIGHETENED: + if game_state.pacman.powerup is False and self.mode == MODE.FRIGHETENED: self.mode = MODE.CHASING for i in range(len(dx)): if i != forbidden: nx = self.x + dx[i] * self.speed ny = self.y + dy[i] * self.speed - if self.check_collision(nx, ny, 30, 30, maze): + if self.check_collision(nx, ny, 30, 30, game_state.map.maze): if self.mode == MODE.SCATTERED: ret[i] = self.heuristic( (nx, ny), default_tile[0], default_tile[1]) |
