aboutsummaryrefslogtreecommitdiff
path: root/src/main/Difficulty.java
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2023-05-25 20:57:51 -0400
committersowgro <tpoke.ferrari@gmail.com>2023-05-25 20:57:51 -0400
commitfcd65070900865a9e0b547c49968988abcda5ab9 (patch)
tree92dca348a8adfad470f149dafa01a95780a895dc /src/main/Difficulty.java
parenta5d71e172b7202c5758837d896ffb8cafcb8da96 (diff)
downloadNPEhero-fcd65070900865a9e0b547c49968988abcda5ab9.tar.gz
NPEhero-fcd65070900865a9e0b547c49968988abcda5ab9.tar.bz2
NPEhero-fcd65070900865a9e0b547c49968988abcda5ab9.zip
Move levels outside of src, prepare for leaderboard writing and other small changes
Diffstat (limited to 'src/main/Difficulty.java')
-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;
+ }
}