From 1584574267bae0ec4b0096ace7a7cbbe08787c05 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Mon, 8 May 2023 18:32:04 +0300 Subject: Fixed a bug in inky's algorithms and also now the ghost reset to chase mode after pacman finishes his powerup --- src/clyde.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/clyde.py') 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 -- cgit v1.2.3