1
0
Fork 0

BreakOut 5.3

master
rxbn_ 3 years ago
parent 59fdc12e4f
commit 59c2f83f49
  1. 12
      src/break_out/model/Level.java

@ -272,6 +272,11 @@ public class Level extends Thread implements ILevel {
if(stone.getType() == 0) {
stones.remove(stone);
}
if(allStonesBroken()) {
setFinished(true);
nextLevel();
}
}
/**
@ -332,6 +337,13 @@ public class Level extends Thread implements ILevel {
public int getLives() {
return lifeCounter;
}
/**
* switch to next level
*/
public void nextLevel() {
game.createLevel(++levelnr, score);
}
}

Loading…
Cancel
Save