feat: highscore dialog and list
This commit is contained in:
@@ -52,11 +52,11 @@ public class Tetris {
|
||||
|
||||
public static void stopGame() {
|
||||
SoundUtil.stopMusic("/music/theme.wav");
|
||||
HighScores.addScore(space.getScore());
|
||||
if (gravityTask != null) gravityTask.cancel();
|
||||
timer.purge();
|
||||
if (ui.getMenuPanel() instanceof ScoreMenu) ((ScoreMenu) ui.getMenuPanel()).gameOver();
|
||||
ui.transferFocus();
|
||||
if (HighScores.scores.values().stream().noneMatch(hs -> hs > space.getScore())) ui.showHighscoreDialog(space.getScore());
|
||||
}
|
||||
|
||||
public static void updateScore(int score) {
|
||||
|
||||
Reference in New Issue
Block a user