aboutsummaryrefslogtreecommitdiff
path: root/src/fallTest/Score.java
diff options
context:
space:
mode:
authorTyler Ferrari <tpoke.ferrari@gmail.com>2023-05-09 12:30:00 +0000
committerTyler Ferrari <tpoke.ferrari@gmail.com>2023-05-09 12:30:00 +0000
commit4c67291aee90d1e42c51400d544882bcda8e1a18 (patch)
tree7c73dea889f415e055284d78b832d9ccfc8b5cc5 /src/fallTest/Score.java
parent107ef4c16d8007559a4de7c68f590df92f8f415f (diff)
downloadNPEhero-4c67291aee90d1e42c51400d544882bcda8e1a18.tar.gz
NPEhero-4c67291aee90d1e42c51400d544882bcda8e1a18.tar.bz2
NPEhero-4c67291aee90d1e42c51400d544882bcda8e1a18.zip
Move files
Diffstat (limited to 'src/fallTest/Score.java')
-rw-r--r--src/fallTest/Score.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/fallTest/Score.java b/src/fallTest/Score.java
new file mode 100644
index 0000000..f2840a3
--- /dev/null
+++ b/src/fallTest/Score.java
@@ -0,0 +1,51 @@
+/*Name: Guitar Hero Project
+ *Description: Handles all the scoring for playing songs
+ */
+package fallTest;
+
+
+public class Score
+{
+ private int combo=0;
+ private int comboMultiplier=1;
+ private int score=0;
+
+ public void perfect() {
+ score += 5*comboMultiplier;
+ System.out.println("perfect");
+ }
+
+ public void close() {
+ score += comboMultiplier;
+ System.out.println("close");
+ }
+
+ public void miss() {
+ combo = 0;
+ comboMultiplier = 1;
+ System.out.println("miss");
+ }
+ public void combo() {
+ combo++;
+
+ if (combo == 2) {
+ comboMultiplier = 2;
+ }
+
+ if (combo == 4) {
+ comboMultiplier = 4;
+ }
+
+ if (combo == 8) {
+ comboMultiplier = 8;
+ }
+ }
+
+ public int getScore() {
+ return score;
+ }
+
+ public int getCombo() {
+ return combo;
+ }
+}