Package pacManReloaded.common.model

## Class Ghost

- java.lang.Object
- - pacManReloaded.server.Player
  - - pacManReloaded.common.model.Ghost

-     public class Ghost
      extends Player

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `GhostColor` | `color` |

    - ### Fields inherited from class pacManReloaded.server.Player

      `direction, navigator, position, speed, startPoint`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Ghost​(java.awt.geom.Point2D.Float point, INavigator nav, java.awt.geom.Point2D.Float startPoint)` |
    `Ghost​(java.awt.geom.Point2D.Float point, INavigator nav, java.awt.geom.Point2D.Float startPoint, Player player)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `changeDir​(Direction dir)` |
    `Direction` | `getDirection()` | "getter" for the direction of the player
    `void` | `nextMove()` | ckeck if the next direction is possible, if it is change position, else change position in the same direction
    `void` | `setFear​(boolean b)` |

    - ### Methods inherited from class pacManReloaded.server.Player

      `changePosition, gameFinished, getClient, getMsgSentTime, getState, sendActorPosition, sendBeginFailed, sendGameState, sendInitGameState, sendInitPlayer, sendMap, sendRemoveObject, setDirection, setPosition, setStartPoint, setState`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### color

          public GhostColor color

  - ### 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)