Class PacMan


  • public class PacMan
    extends Player
    • Constructor Detail

      • PacMan

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

        public PacMan​(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
      • getDirection

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

        public void changeDir​(Direction dir)