Exemplo n.º 1
0
  /** _level reset. */
  private void _levelReset() {
    fastamasComerMultiplicador = 1;

    _initGhosts();

    pacman.currentNodeIndex = laberintoActua.initialPacManNodeIndex;
    pacman.lastMoveMade = MOVE.LEFT;
  }
Exemplo n.º 2
0
  /**
   * _init.
   *
   * @param initialMaze the initial maze
   */
  private void _init(int initialMaze) {
    indiceDeLaberinto = initialMaze;
    score = tiempoLvlActual = cuentaElLvl = tiempoTotal = 0;
    fastamasComerMultiplicador = 1;
    juegoTerminado = false;
    timeOfLastGlobalReversal = -1;
    pacmanFueComido = false;
    pastillaFueComida = false;
    pildoraPoderFueComida = false;

    fantasmaComido = new EnumMap<GHOST, Boolean>(GHOST.class);

    for (GHOST ghost : GHOST.values()) fantasmaComido.put(ghost, false);

    _setPills(laberintoActua = laberintos[indiceDeLaberinto]);
    _initGhosts();

    pacman = new PacMan(laberintoActua.initialPacManNodeIndex, MOVE.LEFT, NUM_LIVES, false);
  }