1
0
Fork 0

BreakOut 5.3

This commit is contained in:
rxbn_ 2020-02-03 23:34:20 +01:00
parent 59fdc12e4f
commit 59c2f83f49
1 changed files with 12 additions and 0 deletions

View File

@ -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);
}
}