Class Ghost


  • public class Ghost
    extends Player
    • Constructor Detail

      • Ghost

        public Ghost​(java.awt.geom.Point2D.Float point,
                     INavigator nav,
                     java.awt.geom.Point2D.Float startPoint,
                     Player player)
      • Ghost

        public Ghost​(java.awt.geom.Point2D.Float point,
                     INavigator nav,
                     java.awt.geom.Point2D.Float startPoint)
    • Method Detail

      • nextMove

        public void nextMove()
        ckeck if the next direction is possible, if it is change position, else change position in the same direction
        Overrides:
        nextMove in class Player
      • changeDir

        public void changeDir​(Direction dir)
      • getDirection

        public Direction getDirection()
        Description copied from class: Player
        "getter" for the direction of the player
        Overrides:
        getDirection in class Player
        Returns:
        the direction
      • setFear

        public void setFear​(boolean b)