public LevelScore getScores(final Difficulty dclty, final int levelNo) { if (levelNo - 1 < scores[dclty.ordinal()].size()) { return scores[dclty.ordinal()].get(levelNo - 1); } else { return new LevelScore(); } }
public void updateScores(final Difficulty dclty, final LevelScore score) { final LevelScore existingScore = scores[dclty.ordinal()].get(score.getLevelNo() - 1); if (score.getMedalWon().ordinal() >= existingScore.getMedalWon().ordinal()) { scores[dclty.ordinal()].set(score.getLevelNo() - 1, score); } }
public void setMaxPlayedLevel(final Difficulty dclty, final int maxPlayedLevel) { this.maxPlayedLevel[dclty.ordinal()] = maxPlayedLevel; }
public void addScores(final Difficulty dclty, final LevelScore score) { scores[dclty.ordinal()].add(score); }
public int getMaxPlayedLevel(final Difficulty dclty) { return maxPlayedLevel[dclty.ordinal()]; }