feat: add elapsed time, fix bugs
This commit is contained in:
@@ -66,6 +66,10 @@ public class Space {
|
||||
Set<Integer> completedLines = new TreeSet<>();
|
||||
for (int line : lines) {
|
||||
if (line >= getMapHeight()) continue;
|
||||
if (line < 0) {
|
||||
Tetris.stopGame();
|
||||
return;
|
||||
}
|
||||
Color[] newBlobs = tetromino.getLine(line);
|
||||
for (int i = 0; i < newBlobs.length; i++) {
|
||||
if (newBlobs[i] == null) continue;
|
||||
@@ -85,6 +89,7 @@ public class Space {
|
||||
}
|
||||
}
|
||||
increaseScore(combo);
|
||||
this.spawnTetromino();
|
||||
}
|
||||
|
||||
public void increaseScore(int amount) {
|
||||
|
||||
Reference in New Issue
Block a user