Package de.tum.cit.fop.maze.Utils
Class ScoreManager
java.lang.Object
de.tum.cit.fop.maze.Utils.ScoreManager
Manages high scores for endless mode with persistent storage.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddScore(long score) Adds a new score and saves to leaderboard (keeps top 10).static ScoreManagerGets the singleton instance of ScoreManager.Gets the list of top scores.
-
Method Details
-
getInstance
Gets the singleton instance of ScoreManager.- Returns:
- The ScoreManager instance
-
getScores
Gets the list of top scores.- Returns:
- Sorted list of scores (highest first)
-
addScore
public void addScore(long score) Adds a new score and saves to leaderboard (keeps top 10).- Parameters:
score- The score to add
-