Class GameRecordUtils

java.lang.Object
com.deco2800.game.files.stats.GameRecordUtils

public class GameRecordUtils
extends java.lang.Object
  • Constructor Details

  • Method Details

    • getHighestScores

      public static java.util.List<GameRecords.Score> getHighestScores()
      Returns the list of scores (the highest score first)
      Returns:
      scores by descending order of score value
    • getAllTimeBestAchievements

      public static java.util.List<BaseAchievementConfig> getAllTimeBestAchievements()
      Loops through all the game records and returns the list of achievements with the highest tier and ignores lower ones. In order words, the all-time best achievements unlocked by the user are returned.
      Returns:
      bestAchievements the highest tier of achievements unlocked by user
    • getBestAchievementsByGame

      public static java.util.List<BaseAchievementConfig> getBestAchievementsByGame​(int game)
      Returns the achievements of the highest tier of a particular game.
      Parameters:
      game - the game number
      Returns:
      bestAchievements the best achievements of a particular game
    • getGoldAchievementsCount

      public static int getGoldAchievementsCount()
      Get the number of gold achievements that the user has unlocked
      Returns:
      count of unlocked gold achievements
    • getNextUnlockAchievements

      public static java.util.List<BaseAchievementConfig> getNextUnlockAchievements()
      Returns a list of achievements that can be unlocked next
      Returns:
      list of bronze achievements yet to be unlocked