Update actors/enums.py

This commit is contained in:
2025-04-15 21:37:23 +02:00
parent af49d834f6
commit 2aafdcc18c

View File

@@ -32,4 +32,19 @@ class GhostColor(Enum):
class GhostMode(Enum):
SCATTER = auto()
CHASE = auto()
FRIGHTENED = auto()
FRIGHTENED = auto()
class GhostBehavior(Enum):
BLINKY = "blinky_behavior"
PINKY = "pinky_behavior"
INKY = "inky_behavior"
CLYDE = "clyde_behavior"
def decide_direction(self, ghost, pacman, maze):
strategy = {
GhostBehavior.BLINKY: blinky_behavior,
GhostBehavior.PINKY: pinky_behavior,
GhostBehavior.INKY: inky_behavior,
GhostBehavior.CLYDE: clyde_behavior,
}[self]
return strategy(ghost, pacman, maze)