public void GameInit() { if (!isInitialized) { LevelInit(); try { game.setNrofghosts(6); } catch (Exception e) { e.printStackTrace(); } currentspeed = 3; } }
public void finished() { int numberPlayer = game.getNumberPlayer(); numberFinished += 1; if (numberFinished == numberPlayer) { // Ghosts update int nrOfGhosts = game.getNrofghosts(); if (nrOfGhosts < maxghosts) { game.setNrofghosts(nrOfGhosts++); } if (currentspeed < maxspeed) { currentspeed++; } LevelInit(); } }