Follow-up to #155.

Some code cleanup and tweaks to the scoreboard display.
This commit is contained in:
Jeffrey Han
2016-10-13 14:41:58 -04:00
parent 21579daa26
commit 3b847d088d
6 changed files with 130 additions and 82 deletions

View File

@@ -304,16 +304,16 @@ public class ScoreDB {
* @return all scores for the beatmap, or null if any error occurred
*/
public static ScoreData[] getMapScores(Beatmap beatmap) {
return getMapScores(beatmap, null);
return getMapScoresExcluding(beatmap, null);
}
/**
* Retrieves the game scores for a beatmap while excluding a score.
* @param beatmap the beatmap
* @param exclude the filename of the score to exclude
* @param exclude the filename (replay string) of the score to exclude
* @return all scores for the beatmap except for exclude, or null if any error occurred
*/
public static ScoreData[] getMapScores(Beatmap beatmap, String exclude) {
public static ScoreData[] getMapScoresExcluding(Beatmap beatmap, String exclude) {
if (connection == null)
return null;
@@ -328,7 +328,7 @@ public class ScoreDB {
while (rs.next()) {
ScoreData s = new ScoreData(rs);
if (s.replayString != null && s.replayString.equals(exclude)) {
// dont return this score
// don't return this score
} else {
list.add(s);
}
@@ -340,6 +340,7 @@ public class ScoreDB {
}
return getSortedArray(list);
}
/**
* Retrieves the game scores for a beatmap set.
* @param beatmap the beatmap