blob: 79556981d476d23ae9407d1aa54e4fbe57c521a9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package main;
import java.io.File;
import java.time.LocalDate;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class Difficulty
{
public String title;
private ObservableList<LeaderboardEntry> leaderboard = FXCollections.observableArrayList();
public File notes;
public int bpm;
public void parseMetadata(File file) {
//hi zach put json reader stuff here
title = "placeholderDiff";
}
public void parseLeaderboard(File file) {
//and here
leaderboard.add(new LeaderboardEntry("placeholderScore", 0, "0/0/0"));
}
public void addToLeaderboard(String name, int score) {
leaderboard.add(new LeaderboardEntry(name, score, ""+LocalDate.now())); //do not delete this tho its not a placeholder
//and make this write to the json also
}
public ObservableList<LeaderboardEntry> getLeaderboard() {
return leaderboard;
}
}
|