public static void main(String[] args) { Score.getInstance().clearAndSave(); Score.getInstance().addAndSave("TEST", 1); Score.getInstance().addAndSave("TEST", 200); for (int i = 0; i < 12; i++) { Score.getInstance().addAndSave("TEST", i); } Utilities.print(Score.getInstance().toString()); }
@Override public String toString() { List<HighScoreEntry> entries = Score.getInstance().getEntries(); String values = ""; for (int i = 0; i < entries.size(); i++) { values += entries.get(i).getName() + ": " + entries.get(i).getScore() + "\n"; } return values; }