aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2023-05-21 17:12:06 -0400
committersowgro <tpoke.ferrari@gmail.com>2023-05-21 17:12:06 -0400
commitf941b529f1cb12312041516e6799ece0f6df2cac (patch)
treefc905d0dc1f67380c55c7053e22a76c1917821e9 /src/main
parentf49a73c6af7445bb4ae92fcab87e13abba527048 (diff)
downloadNPEhero-f941b529f1cb12312041516e6799ece0f6df2cac.tar.gz
NPEhero-f941b529f1cb12312041516e6799ece0f6df2cac.tar.bz2
NPEhero-f941b529f1cb12312041516e6799ece0f6df2cac.zip
add f11 fullscrn, comment gui, add scorecontroller
Diffstat (limited to 'src/main')
-rw-r--r--src/main/ScoreController.java59
-rw-r--r--src/main/SettingsController.java2
2 files changed, 60 insertions, 1 deletions
diff --git a/src/main/ScoreController.java b/src/main/ScoreController.java
new file mode 100644
index 0000000..a33c873
--- /dev/null
+++ b/src/main/ScoreController.java
@@ -0,0 +1,59 @@
+package main;
+
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+
+public class ScoreController{
+
+ int score = 0;
+ int combo = 0;
+ public StringProperty scoreProperty = new SimpleStringProperty("0");
+ public StringProperty comboProperty = new SimpleStringProperty("0");
+
+ /**
+ * @return current score
+ */
+ public int getScore()
+ {
+ return score;
+ }
+
+ /**
+ * @return current combo
+ */
+ public int getCombo()
+ {
+ return combo;
+ }
+
+ /**
+ * @param newScore: the score to be set
+ */
+ public void setScore(int newScore)
+ {
+ score = newScore;
+ scoreProperty.setValue(newScore+"");
+ }
+
+ /**
+ * @param newCombo: the combo to be set
+ */
+ public void setCombo(int newCombo)
+ {
+ combo = newCombo;
+ comboProperty.setValue(newCombo+"");
+ }
+
+ /**
+ * prints values into console
+ */
+ public void print()
+ {
+ System.out.println("--");
+ System.out.println(combo);
+ System.out.println(score);
+ System.out.println("");
+ System.out.println(scoreProperty);
+ System.out.println(comboProperty);
+ }
+}
diff --git a/src/main/SettingsController.java b/src/main/SettingsController.java
index 66da588..f767570 100644
--- a/src/main/SettingsController.java
+++ b/src/main/SettingsController.java
@@ -1,4 +1,4 @@
-package gui;
+package main;
import java.util.Map;
import java.util.HashMap;