diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-05-08 20:08:41 +0300 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-05-08 20:08:41 +0300 |
| commit | d610718c10e310c75126593624ecaaaa2233b371 (patch) | |
| tree | 5e093b81f92d25e0f2df9e3a334e3f4521e3e3d3 /src/ghost.py | |
| parent | 1584574267bae0ec4b0096ace7a7cbbe08787c05 (diff) | |
| download | Macpan-d610718c10e310c75126593624ecaaaa2233b371.tar.xz Macpan-d610718c10e310c75126593624ecaaaa2233b371.zip | |
Added a simple GameOver Screen
Diffstat (limited to 'src/ghost.py')
| -rw-r--r-- | src/ghost.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ghost.py b/src/ghost.py index e785afc..e4b4cf1 100644 --- a/src/ghost.py +++ b/src/ghost.py @@ -108,9 +108,9 @@ class Ghost(): min_idx = ret.index(min_h) return min_idx - def move(self, maze, pacman, screen, game_over, blinky): + def move(self, maze, pacman, screen, is_pacman_alive, blinky): if abs(pacman.x - self.x) <= 15 and abs(pacman.y - self.y) <= 15: - game_over[0] = True + is_pacman_alive[0] = False min_idx = self.get_next_move(pacman, maze, screen, blinky) new_dx = dx[min_idx] * self.speed new_dy = dy[min_idx] * self.speed @@ -120,7 +120,6 @@ class Ghost(): self.last_move = min_idx def draw(self, screen, powerup, counter): - print(f"{self.color} -> mode: {self.mode}") radius = 30 // 2 pos = (self.x - radius, self.y - radius) if powerup: |
