diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-05-08 18:32:04 +0300 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-05-08 18:32:04 +0300 |
| commit | 1584574267bae0ec4b0096ace7a7cbbe08787c05 (patch) | |
| tree | 912cd58e7e21c35c0afebe125e6badf69c12ed52 /src/clyde.py | |
| parent | 9621f880a03337a8a252cf5cd3993d5a1a29969c (diff) | |
| download | Macpan-1584574267bae0ec4b0096ace7a7cbbe08787c05.tar.xz Macpan-1584574267bae0ec4b0096ace7a7cbbe08787c05.zip | |
Fixed a bug in inky's algorithms and also now the ghost reset to chase mode after pacman finishes his powerup
Diffstat (limited to 'src/clyde.py')
| -rw-r--r-- | src/clyde.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/clyde.py b/src/clyde.py index 140ce16..7dcf54e 100644 --- a/src/clyde.py +++ b/src/clyde.py @@ -41,6 +41,9 @@ class Clyde(Ghost): self.mode = MODE.FRIGHETENED rand_pos = random.randint(0, 900), random.randint(0, 990) + if pacman.powerup is False and self.mode == MODE.FRIGHETENED: + self.mode = MODE.CHASING + for i in range(len(dx)): nx = self.x + dx[i] * self.speed ny = self.y + dy[i] * self.speed |
