feat: save highscores per difficulty

This commit is contained in:
Martin Prokoph
2025-09-09 15:03:24 +02:00
parent db537f84ae
commit f881427a67
7 changed files with 64 additions and 27 deletions

View File

@@ -97,7 +97,7 @@ public class Tetris {
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());
if (HighScores.diffToMap(Settings.difficulty).values().stream().noneMatch(hs -> hs > space.getScore())) ui.showHighscoreDialog(space.getScore());
}
/**