public void advanceGameWithPowerPillReverseOnly( MOVE pacManMove, EnumMap<GHOST, MOVE> ghostMoves) { updatePacMan(pacManMove); if (pildoraPoderFueComida) updateGhostsWithForcedReverse(ghostMoves); else updateGhostsWithoutReverse(ghostMoves); updateGame(); }
public void advanceGameWithForcedReverse(MOVE pacManMove, EnumMap<GHOST, MOVE> ghostMoves) { updatePacMan(pacManMove); updateGhostsWithForcedReverse(ghostMoves); updateGame(); }
/** * 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(); }