diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-04-20 19:58:39 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-04-20 19:58:39 +0200 |
| commit | 7194ca65ae23d96960fe7edb619efb100db0a49c (patch) | |
| tree | f73643e5b17f4520fcea83cf0bdaa0bd35918772 /src/pinky.py | |
| parent | 68f17e149ad49e63b05bb53ced64c74f4a372c4f (diff) | |
| download | Macpan-7194ca65ae23d96960fe7edb619efb100db0a49c.tar.xz Macpan-7194ca65ae23d96960fe7edb619efb100db0a49c.zip | |
Added the abillity to portals and also made the ghots favour going up when there is a conflict
Diffstat (limited to 'src/pinky.py')
| -rw-r--r-- | src/pinky.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pinky.py b/src/pinky.py index 8b2bee1..42b5d91 100644 --- a/src/pinky.py +++ b/src/pinky.py @@ -1,6 +1,6 @@ +import pygame from typing_extensions import override from direction import DIRECTION -from settings import settings import math from ghost import Ghost @@ -36,7 +36,7 @@ class Pinky(Ghost): return (pacman.x, pacman.y) @override - def get_next_move(self, target, maze): + def get_next_move(self, target, maze, screen): dx = [1, 0, -1, 0] dy = [0, 1, 0, -1] @@ -54,6 +54,7 @@ class Pinky(Ghost): forbidden = 1 new_target = self.get_four_tiles_ahead_of_pacman(target) + pygame.draw.circle(screen, self.color, (new_target[0], new_target[1]), 15) for i in range(len(dx)): if i != forbidden: |
