aboutsummaryrefslogtreecommitdiff
path: root/src/main/Difficulty.java
blob: f0b73915e8555fda940ac7d51e89b38c6cbe7455 (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
34
35
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 = 28;
    public File song;
    public int numBeats;

    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;
    }
}