All Implemented Interfaces:
Hitable, Movable, Scorable

public class Blinky extends Ghost
Represents a Blinky (red) ghost.
  • Field Details

    • POINTS

      private static final int POINTS
      This attribute stores the amount of points that the Blinky ghost gives.
      See Also:
  • Constructor Details

    • Blinky

      public Blinky(Position startPosition, Direction direction, Behaviour behaviour, Level level)
      Constructor with arguments.
      The value of the scatterPosition is (level.WIDTH,-1).
      The value of the sprite is Sprite.BLINKY.
      It assigns to chaseBehaviour a ChaseAggressive object.
      Parameters:
      startPosition - The position where the ghost is in the beginning (value given by the level configuration file).
      direction - Direction which the ghost faces in the beginning.
      behaviour - Current behaviour of the ghost.
      level - Reference to the current level object.
  • Method Details

    • getPoints

      public int getPoints()
      Getter of the attribute POINTS.
      Returns:
      Returns the value of the attribute POINTS.
      Since:
      getPoints in interface Scorable.