aboutsummaryrefslogtreecommitdiff
path: root/src/main/LeaderboardEntry.java
blob: 673ca11600af2734e3e7799791ac64f2a5a7470a (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
36
37
38
39
40
41
42
43
44
45
package main;

import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

public class LeaderboardEntry 
{
    private SimpleIntegerProperty score;
    private SimpleStringProperty name;
    private SimpleStringProperty date;

    //all below is required for table view
    public LeaderboardEntry(String name, int score, String date)
    {
        this.name = new SimpleStringProperty(name);
        this.score = new SimpleIntegerProperty(score);
        this.date = new SimpleStringProperty(date);
    }

    public int getScore() {
        return score.get();
    }

    public void setScore(int score) {
        this.score.set(score);
    }

    public String getName() {
        return name.get();
    }

    public void setName(String name) {
        this.name.set(name);
    }

    public String getDate()
    {
        return date.get();
    }

    public void setDate(String date)
    {
        this.date = new SimpleStringProperty(date);
    }
}