Esempio n. 1
0
  public void advanceGameWithPowerPillReverseOnly(
      MOVE pacManMove, EnumMap<GHOST, MOVE> ghostMoves) {
    updatePacMan(pacManMove);

    if (pildoraPoderFueComida) updateGhostsWithForcedReverse(ghostMoves);
    else updateGhostsWithoutReverse(ghostMoves);

    updateGame();
  }
Esempio n. 2
0
 public void advanceGameWithForcedReverse(MOVE pacManMove, EnumMap<GHOST, MOVE> ghostMoves) {
   updatePacMan(pacManMove);
   updateGhostsWithForcedReverse(ghostMoves);
   updateGame();
 }
Esempio n. 3
0
 /**
  * Central method that advances the game state using the moves supplied by the controllers. It
  * first updates Ms Pac-Man, then the ghosts and then the general game logic.
  *
  * @param pacManMove The move supplied by the Ms Pac-Man controller
  * @param ghostMoves The moves supplied by the ghosts controller
  */
 public void advanceGame(MOVE pacManMove, EnumMap<GHOST, MOVE> ghostMoves) {
   updatePacMan(pacManMove);
   updateGhosts(ghostMoves);
   updateGame();
 }