Package edu.uoc.pacman.model.entities.characters.ghosts.chase
package edu.uoc.pacman.model.entities.characters.ghosts.chase
-
ClassDescriptionIt implements the
ChaseBehaviour
interface according to an aggressive behaviour.
Its target position is directly Pacman's position.It implements theChaseBehaviour
interface according to an ambush behaviour.
Its target position is four steps ahead of Pacman's position in the direction Pacman is facing.Defines the methods that any character (namely, ghost) must have to chase.
Thanks to this interface, we are using the Strategy design pattern.It implements theChaseBehaviour
interface according to a coward behaviour.
It has two different modes which it constantly switches back and forth between, based on its proximity to Pacman.It implements theChaseBehaviour
interface according to an aggressive behaviour.
In order to locate Inky's target position, we first start by selecting the positionTILES_OFFSET
tiles in front of Pac-Man in his current direction of travel, similar to Pinky's targeting method.