Package controller
Interface IScoreController
- All Known Implementing Classes:
ScoreController
public interface IScoreController
ScoreController handles communication between the Scoreboards and the GUI
-
Method Summary
Modifier and TypeMethodDescriptionvoidfetches the personal scores for the logged in user and stores them in the correct scoreboardvoidfetchScores(ModeType difficulty) fetches scores form db, and stores them in the correct scoreboardformatScore(Score score) converts score-object to a string that will be displayed in GUI.formatScores(ArrayList<Score> scores) formatScoreVerbose(Score score) converts score-object to a string that will be displayed in GUI.getScoresRaw(ModeType difficulty) get raw Score-objects.getTopFivePersonalScores(ModeType difficulty) returns the personal scores for the given difficulty formatted for guigetTopFiveScores(ModeType difficulty) returns the scores for the given difficulty formatted for guigetUserScoresRaw(ModeType difficulty) get raw Score-objects.
-
Method Details
-
fetchScores
fetches scores form db, and stores them in the correct scoreboard- Parameters:
difficulty- the difficulty to fetch scores for
-
getTopFiveScores
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
get raw Score-objects. use with temperance- Parameters:
difficulty- the difficulty to get scores for- Returns:
- the scores
-
formatScore
converts score-object to a string that will be displayed in GUI.- Parameters:
score- the score to format- Returns:
- the formatted score
-
formatScoreVerbose
converts score-object to a string that will be displayed in GUI.- Parameters:
score- the score to format- Returns:
- the formatted score
-
formatScores
-
fetchPersonalScores
void fetchPersonalScores()fetches the personal scores for the logged in user and stores them in the correct scoreboard -
getTopFivePersonalScores
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
get raw Score-objects. use with temperance- Parameters:
difficulty- the difficulty to get scores for- Returns:
- the scores
-