Merge branch 'master' of https://gitlab.com/joachimschmidt557/fop-projekt
This commit is contained in:
commit
b53797ef75
1 changed files with 1 additions and 8 deletions
|
|
@ -156,22 +156,15 @@ public class Resources {
|
|||
InputStream is = Resources.class.getClassLoader().getResourceAsStream("highscores.txt");
|
||||
InputStreamReader isr = new InputStreamReader(is, StandardCharsets.UTF_8);
|
||||
BufferedReader br = new BufferedReader(isr);
|
||||
ScoreEntry temp;
|
||||
scoreEntries = new LinkedList<>();
|
||||
String line;
|
||||
try {
|
||||
while((line = br.readLine()) != null) {
|
||||
line = line.trim();
|
||||
if(line.length() > 0 && !line.startsWith("#")) {
|
||||
temp = ScoreEntry.read(line);
|
||||
scoreEntries.add(temp);
|
||||
addScoreEntry(ScoreEntry.read(line));
|
||||
}
|
||||
}
|
||||
Collections.sort(scoreEntries, new Comparator<ScoreEntry>() {
|
||||
@Override
|
||||
public int compare(ScoreEntry s1, ScoreEntry s2) {
|
||||
return s1.compareTo(s2);
|
||||
} } );
|
||||
|
||||
br.close();
|
||||
} catch (IOException e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue