コード例 #1
0
ファイル: Game.java プロジェクト: jgacitua/PacMan
  public void advanceGameWithPowerPillReverseOnly(
      MOVE pacManMove, EnumMap<GHOST, MOVE> ghostMoves) {
    updatePacMan(pacManMove);

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

    updateGame();
  }
コード例 #2
0
ファイル: Game.java プロジェクト: jgacitua/PacMan
 public void advanceGameWithForcedReverse(MOVE pacManMove, EnumMap<GHOST, MOVE> ghostMoves) {
   updatePacMan(pacManMove);
   updateGhostsWithForcedReverse(ghostMoves);
   updateGame();
 }
コード例 #3
0
ファイル: Game.java プロジェクト: jgacitua/PacMan
 /**
  * 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();
 }