aboutsummaryrefslogtreecommitdiff
path: root/src/GamePlay/Score.java
diff options
context:
space:
mode:
authorAidan Ross <aross02@fairport.org>2023-05-25 08:19:48 -0400
committerAidan Ross <aross02@fairport.org>2023-05-25 08:19:48 -0400
commitf9748632b8bc33a3b91cad1392aac23c6fe47ac1 (patch)
tree849a6f4820620ff5c3f9df3ba1f81876f9fc88bd /src/GamePlay/Score.java
parent9c7aa6cab36884d4dda8b3dbf50791f2e2d810d2 (diff)
downloadNPEhero-f9748632b8bc33a3b91cad1392aac23c6fe47ac1.tar.gz
NPEhero-f9748632b8bc33a3b91cad1392aac23c6fe47ac1.tar.bz2
NPEhero-f9748632b8bc33a3b91cad1392aac23c6fe47ac1.zip
Renamed everything to be better and fixed arches on SongPlayer
Diffstat (limited to 'src/GamePlay/Score.java')
-rw-r--r--src/GamePlay/Score.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/GamePlay/Score.java b/src/GamePlay/Score.java
new file mode 100644
index 0000000..af3af25
--- /dev/null
+++ b/src/GamePlay/Score.java
@@ -0,0 +1,51 @@
+/*Name: Guitar Hero Project
+ *Description: Handles all the scoring for playing songs
+ */
+package GamePlay;
+
+
+public class Score
+{
+ private int combo=0;
+ private int comboMultiplier=1;
+ private int score=0;
+
+ public void perfect() {
+ score += 300*comboMultiplier;
+ System.out.println("Perfect!");
+ }
+
+ public void good() {
+ score += 100*comboMultiplier;
+ System.out.println("Good");
+ }
+
+ 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;
+ }
+}