aboutsummaryrefslogtreecommitdiff
path: root/src/main/LeaderboardEntry.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/LeaderboardEntry.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/LeaderboardEntry.java b/src/main/LeaderboardEntry.java
new file mode 100644
index 0000000..61a0449
--- /dev/null
+++ b/src/main/LeaderboardEntry.java
@@ -0,0 +1,33 @@
+package main;
+
+import javafx.beans.property.SimpleIntegerProperty;
+import javafx.beans.property.SimpleStringProperty;
+
+public class LeaderboardEntry
+{
+ private SimpleIntegerProperty score;
+ private SimpleStringProperty name;
+
+ //all below is required for table view
+ public LeaderboardEntry(String name, int score)
+ {
+ this.name = new SimpleStringProperty(name);
+ this.score = new SimpleIntegerProperty(score);
+ }
+
+ 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);
+ }
+}