Beispiel #1
0
 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();
   }
 }
Beispiel #2
0
 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);
   }
 }
Beispiel #3
0
 public void setMaxPlayedLevel(final Difficulty dclty, final int maxPlayedLevel) {
   this.maxPlayedLevel[dclty.ordinal()] = maxPlayedLevel;
 }
Beispiel #4
0
 public void addScores(final Difficulty dclty, final LevelScore score) {
   scores[dclty.ordinal()].add(score);
 }
Beispiel #5
0
 public int getMaxPlayedLevel(final Difficulty dclty) {
   return maxPlayedLevel[dclty.ordinal()];
 }