Package controller

Interface IScoreController

All Known Implementing Classes:
ScoreController

public interface IScoreController
ScoreController handles communication between the Scoreboards and the GUI
  • Method Details

    • fetchScores

      void fetchScores(ModeType difficulty)
      fetches scores form db, and stores them in the correct scoreboard
      Parameters:
      difficulty - the difficulty to fetch scores for
    • getTopFiveScores

      ArrayList<String> getTopFiveScores(ModeType difficulty)
      returns the scores for the given difficulty formatted for gui
      Parameters:
      difficulty - the difficulty to get scores for
      Returns:
      top five scores in array
    • getScoresRaw

      ArrayList<Score> getScoresRaw(ModeType difficulty)
      get raw Score-objects. use with temperance
      Parameters:
      difficulty - the difficulty to get scores for
      Returns:
      the scores
    • formatScore

      String formatScore(Score score)
      converts score-object to a string that will be displayed in GUI.
      Parameters:
      score - the score to format
      Returns:
      the formatted score
    • formatScoreVerbose

      String formatScoreVerbose(Score score)
      converts score-object to a string that will be displayed in GUI.
      Parameters:
      score - the score to format
      Returns:
      the formatted score
    • formatScores

      ArrayList<String> formatScores(ArrayList<Score> scores)
    • fetchPersonalScores

      void fetchPersonalScores()
      fetches the personal scores for the logged in user and stores them in the correct scoreboard
    • getTopFivePersonalScores

      ArrayList<String> getTopFivePersonalScores(ModeType difficulty)
      returns the personal scores for the given difficulty formatted for gui
      Parameters:
      difficulty - the difficulty to get scores for
      Returns:
      the personal scores for the given difficulty formatted for gui
    • getUserScoresRaw

      ArrayList<Score> getUserScoresRaw(ModeType difficulty)
      get raw Score-objects. use with temperance
      Parameters:
      difficulty - the difficulty to get scores for
      Returns:
      the scores