Update actors/enums.py
This commit is contained in:
@@ -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)
|
Reference in New Issue
Block a user