aboutsummaryrefslogtreecommitdiff
path: root/src/main/Difficulty.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/Difficulty.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/Difficulty.java b/src/main/Difficulty.java
index 926d8d6..7955698 100644
--- a/src/main/Difficulty.java
+++ b/src/main/Difficulty.java
@@ -1,17 +1,19 @@
package main;
import java.io.File;
-
+import java.time.LocalDate;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class Difficulty
{
public String title;
- public ObservableList<LeaderboardEntry> leaderboard = FXCollections.observableArrayList();
+ 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";
}
@@ -19,4 +21,13 @@ public class Difficulty
//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;
+ }
}