aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.classpath36
-rw-r--r--.settings/org.eclipse.jdt.core.prefs1
-rw-r--r--Driver.java21
-rw-r--r--NoteField.java34
-rw-r--r--NoteInfo.java22
-rw-r--r--Score.java51
-rw-r--r--SongPlayer.java225
-rw-r--r--Timer.java15
-rw-r--r--lib/javafx-swt.jarbin37117 -> 0 bytes
-rw-r--r--lib/javafx.base.jarbin755038 -> 0 bytes
-rw-r--r--lib/javafx.controls.jarbin2577993 -> 0 bytes
-rw-r--r--lib/javafx.fxml.jarbin130176 -> 0 bytes
-rw-r--r--lib/javafx.graphics.jarbin4339873 -> 0 bytes
-rw-r--r--lib/javafx.media.jarbin278549 -> 0 bytes
-rw-r--r--lib/javafx.properties3
-rw-r--r--lib/javafx.swing.jarbin89688 -> 0 bytes
-rw-r--r--lib/javafx.web.jarbin727749 -> 0 bytes
-rwxr-xr-xlib/libavplugin-54.sobin52160 -> 0 bytes
-rwxr-xr-xlib/libavplugin-56.sobin52360 -> 0 bytes
-rwxr-xr-xlib/libavplugin-57.sobin52360 -> 0 bytes
-rwxr-xr-xlib/libavplugin-ffmpeg-56.sobin52360 -> 0 bytes
-rwxr-xr-xlib/libavplugin-ffmpeg-57.sobin52360 -> 0 bytes
-rwxr-xr-xlib/libavplugin-ffmpeg-58.sobin52360 -> 0 bytes
-rwxr-xr-xlib/libavplugin-ffmpeg-59.sobin52272 -> 0 bytes
-rwxr-xr-xlib/libdecora_sse.sobin73672 -> 0 bytes
-rwxr-xr-xlib/libfxplugins.sobin51752 -> 0 bytes
-rwxr-xr-xlib/libglass.sobin11568 -> 0 bytes
-rwxr-xr-xlib/libglassgtk2.sobin328520 -> 0 bytes
-rwxr-xr-xlib/libglassgtk3.sobin328864 -> 0 bytes
-rwxr-xr-xlib/libgstreamer-lite.sobin2187712 -> 0 bytes
-rwxr-xr-xlib/libjavafx_font.sobin15992 -> 0 bytes
-rwxr-xr-xlib/libjavafx_font_freetype.sobin25928 -> 0 bytes
-rwxr-xr-xlib/libjavafx_font_pango.sobin24424 -> 0 bytes
-rwxr-xr-xlib/libjavafx_iio.sobin140496 -> 0 bytes
-rwxr-xr-xlib/libjfxmedia.sobin530144 -> 0 bytes
-rwxr-xr-xlib/libprism_common.sobin7048 -> 0 bytes
-rwxr-xr-xlib/libprism_es2.sobin62480 -> 0 bytes
-rwxr-xr-xlib/libprism_sw.sobin64960 -> 0 bytes
-rw-r--r--lib/linux/javafx-swt.jarbin0 -> 37118 bytes
-rw-r--r--lib/linux/javafx.base.jarbin0 -> 745370 bytes
-rw-r--r--lib/linux/javafx.controls.jarbin0 -> 2531099 bytes
-rw-r--r--lib/linux/javafx.fxml.jarbin0 -> 128790 bytes
-rw-r--r--lib/linux/javafx.graphics.jarbin0 -> 4409913 bytes
-rw-r--r--lib/linux/javafx.media.jarbin0 -> 266912 bytes
-rw-r--r--lib/linux/javafx.properties3
-rw-r--r--lib/linux/javafx.swing.jarbin0 -> 88725 bytes
-rw-r--r--lib/linux/javafx.web.jarbin0 -> 725645 bytes
-rw-r--r--lib/linux/libavplugin-54.sobin0 -> 51568 bytes
-rw-r--r--lib/linux/libavplugin-56.sobin0 -> 51592 bytes
-rw-r--r--lib/linux/libavplugin-57.sobin0 -> 51592 bytes
-rw-r--r--lib/linux/libavplugin-ffmpeg-56.sobin0 -> 51720 bytes
-rw-r--r--lib/linux/libavplugin-ffmpeg-57.sobin0 -> 51592 bytes
-rw-r--r--lib/linux/libavplugin-ffmpeg-58.sobin0 -> 51592 bytes
-rw-r--r--lib/linux/libdecora_sse.sobin0 -> 70624 bytes
-rw-r--r--lib/linux/libfxplugins.sobin0 -> 51016 bytes
-rw-r--r--lib/linux/libglass.sobin0 -> 12928 bytes
-rw-r--r--lib/linux/libglassgtk2.sobin0 -> 522752 bytes
-rw-r--r--lib/linux/libglassgtk3.sobin0 -> 522976 bytes
-rw-r--r--lib/linux/libgstreamer-lite.sobin0 -> 2248752 bytes
-rw-r--r--lib/linux/libjavafx_font.sobin0 -> 16928 bytes
-rw-r--r--lib/linux/libjavafx_font_freetype.sobin0 -> 27368 bytes
-rw-r--r--lib/linux/libjavafx_font_pango.sobin0 -> 25496 bytes
-rw-r--r--lib/linux/libjavafx_iio.sobin0 -> 256344 bytes
-rw-r--r--lib/linux/libjfxmedia.sobin0 -> 520504 bytes
-rw-r--r--[-rwxr-xr-x]lib/linux/libjfxwebkit.so (renamed from lib/libjfxwebkit.so)bin99198016 -> 98926456 bytes
-rw-r--r--lib/linux/libprism_common.sobin0 -> 59136 bytes
-rw-r--r--lib/linux/libprism_es2.sobin0 -> 63856 bytes
-rw-r--r--lib/linux/libprism_sw.sobin0 -> 71432 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-console-l1-1-0.dllbin0 -> 21032 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-console-l1-2-0.dllbin0 -> 21024 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-datetime-l1-1-0.dllbin0 -> 20512 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-debug-l1-1-0.dllbin0 -> 20544 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-errorhandling-l1-1-0.dllbin0 -> 20520 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-file-l1-1-0.dllbin0 -> 24104 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-file-l1-2-0.dllbin0 -> 20520 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-file-l2-1-0.dllbin0 -> 20520 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-handle-l1-1-0.dllbin0 -> 20520 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-heap-l1-1-0.dllbin0 -> 21032 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-interlocked-l1-1-0.dllbin0 -> 20520 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-libraryloader-l1-1-0.dllbin0 -> 21568 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-localization-l1-2-0.dllbin0 -> 23080 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-memory-l1-1-0.dllbin0 -> 21032 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-namedpipe-l1-1-0.dllbin0 -> 20520 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-processenvironment-l1-1-0.dllbin0 -> 21544 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-processthreads-l1-1-0.dllbin0 -> 22560 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-processthreads-l1-1-1.dllbin0 -> 21056 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-profile-l1-1-0.dllbin0 -> 20008 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-rtlsupport-l1-1-0.dllbin0 -> 21056 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-string-l1-1-0.dllbin0 -> 20520 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-synch-l1-1-0.dllbin0 -> 22568 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-synch-l1-2-0.dllbin0 -> 21032 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-sysinfo-l1-1-0.dllbin0 -> 21544 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-timezone-l1-1-0.dllbin0 -> 21032 bytes
-rw-r--r--lib/windows/bin/api-ms-win-core-util-l1-1-0.dllbin0 -> 20520 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-conio-l1-1-0.dllbin0 -> 21544 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-convert-l1-1-0.dllbin0 -> 24616 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-environment-l1-1-0.dllbin0 -> 21032 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-filesystem-l1-1-0.dllbin0 -> 22568 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-heap-l1-1-0.dllbin0 -> 21544 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-locale-l1-1-0.dllbin0 -> 21032 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-math-l1-1-0.dllbin0 -> 29528 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-multibyte-l1-1-0.dllbin0 -> 28736 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-private-l1-1-0.dllbin0 -> 73048 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-process-l1-1-0.dllbin0 -> 21568 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-runtime-l1-1-0.dllbin0 -> 25128 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-stdio-l1-1-0.dllbin0 -> 26664 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-string-l1-1-0.dllbin0 -> 26664 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-time-l1-1-0.dllbin0 -> 23080 bytes
-rw-r--r--lib/windows/bin/api-ms-win-crt-utility-l1-1-0.dllbin0 -> 21032 bytes
-rw-r--r--lib/windows/bin/decora_sse.dllbin0 -> 81408 bytes
-rw-r--r--lib/windows/bin/fxplugins.dllbin0 -> 119296 bytes
-rw-r--r--lib/windows/bin/glass.dllbin0 -> 264704 bytes
-rw-r--r--lib/windows/bin/glib-lite.dllbin0 -> 611840 bytes
-rw-r--r--lib/windows/bin/gstreamer-lite.dllbin0 -> 901632 bytes
-rw-r--r--lib/windows/bin/javafx_font.dllbin0 -> 67072 bytes
-rw-r--r--lib/windows/bin/javafx_iio.dllbin0 -> 159232 bytes
-rw-r--r--lib/windows/bin/jfxmedia.dllbin0 -> 137216 bytes
-rw-r--r--lib/windows/bin/jfxwebkit.dllbin0 -> 60861440 bytes
-rw-r--r--lib/windows/bin/msvcp140.dllbin0 -> 627440 bytes
-rw-r--r--lib/windows/bin/prism_common.dllbin0 -> 55808 bytes
-rw-r--r--lib/windows/bin/prism_d3d.dllbin0 -> 124928 bytes
-rw-r--r--lib/windows/bin/prism_sw.dllbin0 -> 92672 bytes
-rw-r--r--lib/windows/bin/ucrtbase.dllbin0 -> 1026088 bytes
-rw-r--r--lib/windows/bin/vcruntime140.dllbin0 -> 85232 bytes
-rw-r--r--lib/windows/lib/javafx-swt.jarbin0 -> 37110 bytes
-rw-r--r--lib/windows/lib/javafx.base.jarbin0 -> 745369 bytes
-rw-r--r--lib/windows/lib/javafx.controls.jarbin0 -> 2531028 bytes
-rw-r--r--lib/windows/lib/javafx.fxml.jarbin0 -> 128790 bytes
-rw-r--r--lib/windows/lib/javafx.graphics.jarbin0 -> 4341110 bytes
-rw-r--r--lib/windows/lib/javafx.media.jarbin0 -> 266912 bytes
-rw-r--r--lib/windows/lib/javafx.properties3
-rw-r--r--lib/windows/lib/javafx.swing.jarbin0 -> 88725 bytes
-rw-r--r--lib/windows/lib/javafx.web.jarbin0 -> 725645 bytes
-rw-r--r--lib/windows/lib/src.zipbin0 -> 6707232 bytes
-rw-r--r--src/fallTest/Driver.java2
-rw-r--r--src/fallTest/Score.java10
-rw-r--r--src/fallTest/SongPlayer.java221
137 files changed, 183 insertions, 464 deletions
diff --git a/.classpath b/.classpath
index a94ee04..7167265 100644
--- a/.classpath
+++ b/.classpath
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
- <attributes>
- <attribute name="module" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="lib" path="lib/javafx.base.jar"/>
- <classpathentry kind="lib" path="lib/javafx.controls.jar"/>
- <classpathentry kind="lib" path="lib/javafx.fxml.jar"/>
- <classpathentry kind="lib" path="lib/javafx.graphics.jar"/>
- <classpathentry kind="lib" path="lib/javafx.media.jar"/>
- <classpathentry kind="lib" path="lib/javafx.swing.jar"/>
- <classpathentry kind="lib" path="lib/javafx.web.jar"/>
- <classpathentry kind="lib" path="lib/javafx-swt.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="lib/windows/lib/javafx.base.jar"/>
+ <classpathentry kind="lib" path="lib/windows/lib/javafx.controls.jar"/>
+ <classpathentry kind="lib" path="lib/windows/lib/javafx.fxml.jar"/>
+ <classpathentry kind="lib" path="lib/windows/lib/javafx.graphics.jar"/>
+ <classpathentry kind="lib" path="lib/windows/lib/javafx.media.jar"/>
+ <classpathentry kind="lib" path="lib/windows/lib/javafx.swing.jar"/>
+ <classpathentry kind="lib" path="lib/windows/lib/javafx.web.jar"/>
+ <classpathentry kind="lib" path="lib/windows/lib/javafx-swt.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index f2525a8..a58ebdc 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -1,5 +1,6 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=11
diff --git a/Driver.java b/Driver.java
deleted file mode 100644
index 2319412..0000000
--- a/Driver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*Name:
- *Date:
- *Period:
- *Teacher:
- *Description:
- */
-package cs;
-
-
-public class Driver
-{
-
- public static void main(String[] args)
- {
- // TODO Auto-generated method stub
- SongPlayer g = new SongPlayer();
- g.loadSong();
- g.createAndShowGui();
- }
-
-}
diff --git a/NoteField.java b/NoteField.java
deleted file mode 100644
index b54e33a..0000000
--- a/NoteField.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*Name: Guitar Hero Project
- *Description: Contains the information for a single note on the field
- */
-package cs;
-
-public class NoteField
-{
- private boolean failed = false;
- private final int NOTESPEED = 5;
- private int yPos = SongPlayer.HEIGHT;
-
- public void gameTick() {
- if (!failed) {
- if (yPos > 0) {
- yPos -= NOTESPEED;
- }
- else {
- failed = true;
- }
- }
- }
-
- public int goalDistance() {
- return (yPos-((SongPlayer.HEIGHT)/6));
- }
-
- public boolean getFailed() {
- return failed;
- }
-
- public int getY() {
- return yPos;
- }
-}
diff --git a/NoteInfo.java b/NoteInfo.java
deleted file mode 100644
index 538b31b..0000000
--- a/NoteInfo.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*Name: Guitar Hero Project
- *Description: Contains the info for when to send a note
- */
-package cs;
-
-
-public class NoteInfo
-{
- private int sendTime;
-
- public NoteInfo(int t) {
- sendTime = t;
- }
-
- public int getTime() {
- return sendTime;
- }
-
- public int compareTo(NoteInfo other) {
- return sendTime - other.sendTime;
- }
-}
diff --git a/Score.java b/Score.java
deleted file mode 100644
index 9d31c9a..0000000
--- a/Score.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*Name: Guitar Hero Project
- *Description: Handles all the scoring for playing songs
- */
-package cs;
-
-
-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 close() {
- 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;
- }
-}
diff --git a/SongPlayer.java b/SongPlayer.java
deleted file mode 100644
index 065e777..0000000
--- a/SongPlayer.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*Name: Guitar Hero Project
- *Description: Contains the main game loop for gameplay
- */
-package cs;
-
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import java.util.*;
-
-public class SongPlayer
-{
- Timer time = new Timer();
-
- public static final int HEIGHT = 650;
- public static final int LENGTH = 400;
-
- private final int BLENGTH = LENGTH/7;
- private final int BHEIGHT = HEIGHT/20;
-
- JFrame frame = new JFrame("Guitar Hero"); //creates the frame
-
- JButton d = new JButton("D"); //button declarations
- JButton f = new JButton("F");
- JButton space= new JButton("SPC");
- JButton j = new JButton("J");
- JButton k = new JButton("K");
-
- Queue<NoteInfo> dSends = new LinkedList<NoteInfo>(); //Queue that dictates when to send the notes
- ArrayList<NoteField> dLane = new ArrayList<NoteField>(); //Array list containing all the notes currently on the field
- ArrayList<JButton> dVis = new ArrayList<JButton>(); //Array list containing the visual representations of the notes in lanes
-
- Queue<NoteInfo> fSends = new LinkedList<NoteInfo>();
- ArrayList<NoteField> fLane = new ArrayList<NoteField>();
- ArrayList<JButton> fVis = new ArrayList<JButton>();
-
- Queue<NoteInfo> spaceSends = new LinkedList<NoteInfo>();
- ArrayList<NoteField> spaceLane = new ArrayList<NoteField>();
- ArrayList<JButton> spaceVis = new ArrayList<JButton>();
-
- Queue<NoteInfo> jSends = new LinkedList<NoteInfo>();
- ArrayList<NoteField> jLane = new ArrayList<NoteField>();
- ArrayList<JButton> jVis = new ArrayList<JButton>();
-
- Queue<NoteInfo> kSends = new LinkedList<NoteInfo>();
- ArrayList<NoteField> kLane = new ArrayList<NoteField>();
- ArrayList<JButton> kVis = new ArrayList<JButton>();
-
- Score score = new Score();
-
- /**
- * Establishes what the chart for the song is going to look like
- */
- public void loadSong() {
- dSends.add(new NoteInfo(4000));
- dSends.add(new NoteInfo(4333));
- dSends.add(new NoteInfo(4666));
- fSends.add(new NoteInfo(5000));
- kSends.add(new NoteInfo(5500));
- spaceSends.add(new NoteInfo(6000));
- jSends.add(new NoteInfo(6000));
- jSends.add(new NoteInfo(6250));
- dSends.add(new NoteInfo(6500));
- jSends.add(new NoteInfo(6750));
- spaceSends.add(new NoteInfo(7000));
- fSends.add(new NoteInfo(7500));
- jSends.add(new NoteInfo(7750));
- spaceSends.add(new NoteInfo(8000));
- fSends.add(new NoteInfo(8500));
- jSends.add(new NoteInfo(8500));
- dSends.add(new NoteInfo(9000));
- spaceSends.add(new NoteInfo(9000));
- kSends.add(new NoteInfo(9000));
- spaceSends.add(new NoteInfo(9500));
-
- kSends.add(new NoteInfo(10000));
- dSends.add(new NoteInfo(10000));
- kSends.add(new NoteInfo(10333));
- fSends.add(new NoteInfo(10333));
- kSends.add(new NoteInfo(10666));
- spaceSends.add(new NoteInfo(10666));
- dSends.add(new NoteInfo(11000));
- spaceSends.add(new NoteInfo(11000));
- dSends.add(new NoteInfo(11333));
- jSends.add(new NoteInfo(11333));
- dSends.add(new NoteInfo(11666));
- kSends.add(new NoteInfo(11666));
- spaceSends.add(new NoteInfo(12000));
- }
-
-
- /**
- * Creates the GUI used to play the game
- */
- public void createAndShowGui() {
-
- d.setBounds(1*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT); //makes the button bounds for each button
- f.setBounds(2*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT);
- space.setBounds(3*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT);
- j.setBounds(4*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT);
- k.setBounds(5*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT);
- d.setFocusable(false); //makes it so you can't focus on the button
- f.setFocusable(false);
- space.setFocusable(false);
- j.setFocusable(false);
- k.setFocusable(false);
-
-
- frame.add(d); //adds the buttons to the frame
- frame.add(f);
- frame.add(space);
- frame.add(j);
- frame.add(k);
-
- frame.setSize(LENGTH, HEIGHT); //sets the size of the frame
- frame.setLayout(null);
- frame.setVisible(true); //makes the frame visible
-
-
- while (true) { //TRY TO FIND A BETTER SOLUTION FOR THIS?? maybe something like sends.size() > 0 || lanes.size() > 0
-
- update(d, dSends, dLane, dVis, 'd', "dPress", 1); //updates the provided lane
- update(f, fSends, fLane, fVis, 'f', "fPress", 2);
- update(space, spaceSends, spaceLane, spaceVis, ' ', "spacePress", 3);
- update(j, jSends, jLane, jVis, 'j', "jPress", 4);
- update(k, kSends, kLane, kVis, 'k', "kPress", 5);
-
- frame.repaint(); //updates the visuals every frame
-
- try {
- Thread.sleep(10); //THIS IS PROBABLY NOT THE BEST WAY TO DO THIS
- } catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Updates a lane. An update involves:
- * Checking to see if a note needs to be sent down a lane
- * Checking to see if the user hit the button
- * Checking to see if any notes have moved past the lane
- * @param sends The sending queue for the given lane
- * @param lane The place where note information is stored for notes currently in that lane
- * @param vis The place where the visual representation for a note is stored in that lane
- * @param key The button on the keyboard corresponding to the button for the lane being updated
- * @param id The id for the action map
- * @param k The lane number
- */
- private void update(JButton button, Queue<NoteInfo> sends, ArrayList<NoteField> lane, ArrayList<JButton> vis, char key, String id, int k) {
- if (!sends.isEmpty() && sends.peek().getTime()-time.time()<3) { //checks if any notes in the queue need to be sent at this time
- lane.add(new NoteField()); //adds that note's information to the lane list
-
- vis.add(new JButton()); //creates a visual representation of that note in the visualizer list
- frame.add(vis.get(vis.size()-1));
-
- sends.remove(); //removes the note just sent from the sending queue
- }
-
- if (lane.size() > 0) { //if there are any notes in the lanes, tests for a button press
- button.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(key), id); //Input map and Action map setting
- button.getActionMap().put(id, new AbstractAction() { //Defines what happens when the proper button is pressed
- public void actionPerformed(ActionEvent e)
- {
- if (lane.size() > 0) {
- int i = getClosestNote(lane);
- int dist = (int)Math.abs(lane.get(i).goalDistance());
-
- lane.remove(i); //removes the notes and visual representation from the playing field when the button is pressed
- frame.remove(vis.get(i));
- vis.remove(i);
-
- if (dist > 2*BHEIGHT) { //Determines what to add to the score depending on the proximity of the note
- score.miss();
- }
- else if (dist > BHEIGHT) {
- score.combo();
- score.close();
- }
- else {
- score.combo();
- score.perfect();
- }
-
- System.out.println("Score: " + score.getScore() + " Combo: " + score.getCombo());
- }
- }
- });
- }
-
- for (int i=0; i<lane.size(); i++) { //goes through every note on the field
- lane.get(i).gameTick(); //moves every note down
- vis.get(i).setBounds(k*BLENGTH, HEIGHT-lane.get(i).getY(), BLENGTH, BHEIGHT);
-
- if (lane.size() > 0 && lane.get(i).getFailed()) { //if the note has passed into the fail boundary, removes the note from the field
- score.miss();
- System.out.println(score.getScore() + " Combo: " + score.getCombo());
-
-
- lane.remove(i);
- frame.remove(vis.get(i));
- vis.remove(i);
-
- i--;
- }
- }
- }
-
- /**
- * Finds the note closest to the goal
- * @return the location in the array list of the closest note
- */
- private int getClosestNote(ArrayList<NoteField> searchLane) {
- int pos = 0;
-
- for (int i=0; i<searchLane.size(); i++) {
- if (Math.abs(searchLane.get(i).goalDistance()) < Math.abs(searchLane.get(pos).goalDistance())) {
- pos = i;
- }
- }
-
- return pos;
- }
-}
diff --git a/Timer.java b/Timer.java
deleted file mode 100644
index 9707052..0000000
--- a/Timer.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*Name: Guitar Hero Project
- *Description: Contains the method used to determine how long the user has been playing,
- * used to determine when to send notes
- */
-package cs;
-
-
-public class Timer
-{
- private long timeStart = System.currentTimeMillis();
-
- public int time() {
- return (int)(System.currentTimeMillis()-timeStart);
- }
-}
diff --git a/lib/javafx-swt.jar b/lib/javafx-swt.jar
deleted file mode 100644
index 4e8c4cf..0000000
--- a/lib/javafx-swt.jar
+++ /dev/null
Binary files differ
diff --git a/lib/javafx.base.jar b/lib/javafx.base.jar
deleted file mode 100644
index 426f4be..0000000
--- a/lib/javafx.base.jar
+++ /dev/null
Binary files differ
diff --git a/lib/javafx.controls.jar b/lib/javafx.controls.jar
deleted file mode 100644
index f7f1c96..0000000
--- a/lib/javafx.controls.jar
+++ /dev/null
Binary files differ
diff --git a/lib/javafx.fxml.jar b/lib/javafx.fxml.jar
deleted file mode 100644
index 58bba56..0000000
--- a/lib/javafx.fxml.jar
+++ /dev/null
Binary files differ
diff --git a/lib/javafx.graphics.jar b/lib/javafx.graphics.jar
deleted file mode 100644
index cdd2e46..0000000
--- a/lib/javafx.graphics.jar
+++ /dev/null
Binary files differ
diff --git a/lib/javafx.media.jar b/lib/javafx.media.jar
deleted file mode 100644
index eb196bd..0000000
--- a/lib/javafx.media.jar
+++ /dev/null
Binary files differ
diff --git a/lib/javafx.properties b/lib/javafx.properties
deleted file mode 100644
index 9577822..0000000
--- a/lib/javafx.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-javafx.version=20.0.1
-javafx.runtime.version=20.0.1+2
-javafx.runtime.build=2
diff --git a/lib/javafx.swing.jar b/lib/javafx.swing.jar
deleted file mode 100644
index 20501ed..0000000
--- a/lib/javafx.swing.jar
+++ /dev/null
Binary files differ
diff --git a/lib/javafx.web.jar b/lib/javafx.web.jar
deleted file mode 100644
index c7c3f49..0000000
--- a/lib/javafx.web.jar
+++ /dev/null
Binary files differ
diff --git a/lib/libavplugin-54.so b/lib/libavplugin-54.so
deleted file mode 100755
index 354e77c..0000000
--- a/lib/libavplugin-54.so
+++ /dev/null
Binary files differ
diff --git a/lib/libavplugin-56.so b/lib/libavplugin-56.so
deleted file mode 100755
index 6f523a1..0000000
--- a/lib/libavplugin-56.so
+++ /dev/null
Binary files differ
diff --git a/lib/libavplugin-57.so b/lib/libavplugin-57.so
deleted file mode 100755
index c954188..0000000
--- a/lib/libavplugin-57.so
+++ /dev/null
Binary files differ
diff --git a/lib/libavplugin-ffmpeg-56.so b/lib/libavplugin-ffmpeg-56.so
deleted file mode 100755
index fa3c9a8..0000000
--- a/lib/libavplugin-ffmpeg-56.so
+++ /dev/null
Binary files differ
diff --git a/lib/libavplugin-ffmpeg-57.so b/lib/libavplugin-ffmpeg-57.so
deleted file mode 100755
index e1b48c2..0000000
--- a/lib/libavplugin-ffmpeg-57.so
+++ /dev/null
Binary files differ
diff --git a/lib/libavplugin-ffmpeg-58.so b/lib/libavplugin-ffmpeg-58.so
deleted file mode 100755
index 3b8964b..0000000
--- a/lib/libavplugin-ffmpeg-58.so
+++ /dev/null
Binary files differ
diff --git a/lib/libavplugin-ffmpeg-59.so b/lib/libavplugin-ffmpeg-59.so
deleted file mode 100755
index 462f746..0000000
--- a/lib/libavplugin-ffmpeg-59.so
+++ /dev/null
Binary files differ
diff --git a/lib/libdecora_sse.so b/lib/libdecora_sse.so
deleted file mode 100755
index ec9f43d..0000000
--- a/lib/libdecora_sse.so
+++ /dev/null
Binary files differ
diff --git a/lib/libfxplugins.so b/lib/libfxplugins.so
deleted file mode 100755
index 3820856..0000000
--- a/lib/libfxplugins.so
+++ /dev/null
Binary files differ
diff --git a/lib/libglass.so b/lib/libglass.so
deleted file mode 100755
index 8589d83..0000000
--- a/lib/libglass.so
+++ /dev/null
Binary files differ
diff --git a/lib/libglassgtk2.so b/lib/libglassgtk2.so
deleted file mode 100755
index 6037324..0000000
--- a/lib/libglassgtk2.so
+++ /dev/null
Binary files differ
diff --git a/lib/libglassgtk3.so b/lib/libglassgtk3.so
deleted file mode 100755
index 7e427d5..0000000
--- a/lib/libglassgtk3.so
+++ /dev/null
Binary files differ
diff --git a/lib/libgstreamer-lite.so b/lib/libgstreamer-lite.so
deleted file mode 100755
index b5c4d29..0000000
--- a/lib/libgstreamer-lite.so
+++ /dev/null
Binary files differ
diff --git a/lib/libjavafx_font.so b/lib/libjavafx_font.so
deleted file mode 100755
index 0d20843..0000000
--- a/lib/libjavafx_font.so
+++ /dev/null
Binary files differ
diff --git a/lib/libjavafx_font_freetype.so b/lib/libjavafx_font_freetype.so
deleted file mode 100755
index 8215598..0000000
--- a/lib/libjavafx_font_freetype.so
+++ /dev/null
Binary files differ
diff --git a/lib/libjavafx_font_pango.so b/lib/libjavafx_font_pango.so
deleted file mode 100755
index 7eb6b87..0000000
--- a/lib/libjavafx_font_pango.so
+++ /dev/null
Binary files differ
diff --git a/lib/libjavafx_iio.so b/lib/libjavafx_iio.so
deleted file mode 100755
index ae039b9..0000000
--- a/lib/libjavafx_iio.so
+++ /dev/null
Binary files differ
diff --git a/lib/libjfxmedia.so b/lib/libjfxmedia.so
deleted file mode 100755
index ea1d29a..0000000
--- a/lib/libjfxmedia.so
+++ /dev/null
Binary files differ
diff --git a/lib/libprism_common.so b/lib/libprism_common.so
deleted file mode 100755
index 87ea502..0000000
--- a/lib/libprism_common.so
+++ /dev/null
Binary files differ
diff --git a/lib/libprism_es2.so b/lib/libprism_es2.so
deleted file mode 100755
index 3220981..0000000
--- a/lib/libprism_es2.so
+++ /dev/null
Binary files differ
diff --git a/lib/libprism_sw.so b/lib/libprism_sw.so
deleted file mode 100755
index bebd11f..0000000
--- a/lib/libprism_sw.so
+++ /dev/null
Binary files differ
diff --git a/lib/linux/javafx-swt.jar b/lib/linux/javafx-swt.jar
new file mode 100644
index 0000000..0eb0e95
--- /dev/null
+++ b/lib/linux/javafx-swt.jar
Binary files differ
diff --git a/lib/linux/javafx.base.jar b/lib/linux/javafx.base.jar
new file mode 100644
index 0000000..04b547b
--- /dev/null
+++ b/lib/linux/javafx.base.jar
Binary files differ
diff --git a/lib/linux/javafx.controls.jar b/lib/linux/javafx.controls.jar
new file mode 100644
index 0000000..8775c8e
--- /dev/null
+++ b/lib/linux/javafx.controls.jar
Binary files differ
diff --git a/lib/linux/javafx.fxml.jar b/lib/linux/javafx.fxml.jar
new file mode 100644
index 0000000..ae2fa84
--- /dev/null
+++ b/lib/linux/javafx.fxml.jar
Binary files differ
diff --git a/lib/linux/javafx.graphics.jar b/lib/linux/javafx.graphics.jar
new file mode 100644
index 0000000..a662b10
--- /dev/null
+++ b/lib/linux/javafx.graphics.jar
Binary files differ
diff --git a/lib/linux/javafx.media.jar b/lib/linux/javafx.media.jar
new file mode 100644
index 0000000..87cc06e
--- /dev/null
+++ b/lib/linux/javafx.media.jar
Binary files differ
diff --git a/lib/linux/javafx.properties b/lib/linux/javafx.properties
new file mode 100644
index 0000000..ad39df9
--- /dev/null
+++ b/lib/linux/javafx.properties
@@ -0,0 +1,3 @@
+javafx.version=15.0.1
+javafx.runtime.version=15.0.1+1
+javafx.runtime.build=1
diff --git a/lib/linux/javafx.swing.jar b/lib/linux/javafx.swing.jar
new file mode 100644
index 0000000..9b18d17
--- /dev/null
+++ b/lib/linux/javafx.swing.jar
Binary files differ
diff --git a/lib/linux/javafx.web.jar b/lib/linux/javafx.web.jar
new file mode 100644
index 0000000..0b54acd
--- /dev/null
+++ b/lib/linux/javafx.web.jar
Binary files differ
diff --git a/lib/linux/libavplugin-54.so b/lib/linux/libavplugin-54.so
new file mode 100644
index 0000000..cebca6f
--- /dev/null
+++ b/lib/linux/libavplugin-54.so
Binary files differ
diff --git a/lib/linux/libavplugin-56.so b/lib/linux/libavplugin-56.so
new file mode 100644
index 0000000..7438e1c
--- /dev/null
+++ b/lib/linux/libavplugin-56.so
Binary files differ
diff --git a/lib/linux/libavplugin-57.so b/lib/linux/libavplugin-57.so
new file mode 100644
index 0000000..1185a5f
--- /dev/null
+++ b/lib/linux/libavplugin-57.so
Binary files differ
diff --git a/lib/linux/libavplugin-ffmpeg-56.so b/lib/linux/libavplugin-ffmpeg-56.so
new file mode 100644
index 0000000..363863a
--- /dev/null
+++ b/lib/linux/libavplugin-ffmpeg-56.so
Binary files differ
diff --git a/lib/linux/libavplugin-ffmpeg-57.so b/lib/linux/libavplugin-ffmpeg-57.so
new file mode 100644
index 0000000..ab9c16c
--- /dev/null
+++ b/lib/linux/libavplugin-ffmpeg-57.so
Binary files differ
diff --git a/lib/linux/libavplugin-ffmpeg-58.so b/lib/linux/libavplugin-ffmpeg-58.so
new file mode 100644
index 0000000..17d41c0
--- /dev/null
+++ b/lib/linux/libavplugin-ffmpeg-58.so
Binary files differ
diff --git a/lib/linux/libdecora_sse.so b/lib/linux/libdecora_sse.so
new file mode 100644
index 0000000..2ffe8f8
--- /dev/null
+++ b/lib/linux/libdecora_sse.so
Binary files differ
diff --git a/lib/linux/libfxplugins.so b/lib/linux/libfxplugins.so
new file mode 100644
index 0000000..643bffc
--- /dev/null
+++ b/lib/linux/libfxplugins.so
Binary files differ
diff --git a/lib/linux/libglass.so b/lib/linux/libglass.so
new file mode 100644
index 0000000..b886763
--- /dev/null
+++ b/lib/linux/libglass.so
Binary files differ
diff --git a/lib/linux/libglassgtk2.so b/lib/linux/libglassgtk2.so
new file mode 100644
index 0000000..babbc30
--- /dev/null
+++ b/lib/linux/libglassgtk2.so
Binary files differ
diff --git a/lib/linux/libglassgtk3.so b/lib/linux/libglassgtk3.so
new file mode 100644
index 0000000..399a3e2
--- /dev/null
+++ b/lib/linux/libglassgtk3.so
Binary files differ
diff --git a/lib/linux/libgstreamer-lite.so b/lib/linux/libgstreamer-lite.so
new file mode 100644
index 0000000..62c7183
--- /dev/null
+++ b/lib/linux/libgstreamer-lite.so
Binary files differ
diff --git a/lib/linux/libjavafx_font.so b/lib/linux/libjavafx_font.so
new file mode 100644
index 0000000..cf81fea
--- /dev/null
+++ b/lib/linux/libjavafx_font.so
Binary files differ
diff --git a/lib/linux/libjavafx_font_freetype.so b/lib/linux/libjavafx_font_freetype.so
new file mode 100644
index 0000000..41f6b8f
--- /dev/null
+++ b/lib/linux/libjavafx_font_freetype.so
Binary files differ
diff --git a/lib/linux/libjavafx_font_pango.so b/lib/linux/libjavafx_font_pango.so
new file mode 100644
index 0000000..009cb1f
--- /dev/null
+++ b/lib/linux/libjavafx_font_pango.so
Binary files differ
diff --git a/lib/linux/libjavafx_iio.so b/lib/linux/libjavafx_iio.so
new file mode 100644
index 0000000..50c625c
--- /dev/null
+++ b/lib/linux/libjavafx_iio.so
Binary files differ
diff --git a/lib/linux/libjfxmedia.so b/lib/linux/libjfxmedia.so
new file mode 100644
index 0000000..29289b2
--- /dev/null
+++ b/lib/linux/libjfxmedia.so
Binary files differ
diff --git a/lib/libjfxwebkit.so b/lib/linux/libjfxwebkit.so
index 9f3495a..019eaa7 100755..100644
--- a/lib/libjfxwebkit.so
+++ b/lib/linux/libjfxwebkit.so
Binary files differ
diff --git a/lib/linux/libprism_common.so b/lib/linux/libprism_common.so
new file mode 100644
index 0000000..99a2781
--- /dev/null
+++ b/lib/linux/libprism_common.so
Binary files differ
diff --git a/lib/linux/libprism_es2.so b/lib/linux/libprism_es2.so
new file mode 100644
index 0000000..b15e105
--- /dev/null
+++ b/lib/linux/libprism_es2.so
Binary files differ
diff --git a/lib/linux/libprism_sw.so b/lib/linux/libprism_sw.so
new file mode 100644
index 0000000..6f6b9ef
--- /dev/null
+++ b/lib/linux/libprism_sw.so
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-console-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-console-l1-1-0.dll
new file mode 100644
index 0000000..528187c
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-console-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-console-l1-2-0.dll b/lib/windows/bin/api-ms-win-core-console-l1-2-0.dll
new file mode 100644
index 0000000..4545f22
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-console-l1-2-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-datetime-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-datetime-l1-1-0.dll
new file mode 100644
index 0000000..4395104
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-datetime-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-debug-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-debug-l1-1-0.dll
new file mode 100644
index 0000000..343fa8e
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-debug-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-errorhandling-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-errorhandling-l1-1-0.dll
new file mode 100644
index 0000000..072e0dc
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-errorhandling-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-file-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-file-l1-1-0.dll
new file mode 100644
index 0000000..38c645b
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-file-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-file-l1-2-0.dll b/lib/windows/bin/api-ms-win-core-file-l1-2-0.dll
new file mode 100644
index 0000000..6f99bb8
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-file-l1-2-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-file-l2-1-0.dll b/lib/windows/bin/api-ms-win-core-file-l2-1-0.dll
new file mode 100644
index 0000000..91a9559
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-file-l2-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-handle-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-handle-l1-1-0.dll
new file mode 100644
index 0000000..efaf918
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-handle-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-heap-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-heap-l1-1-0.dll
new file mode 100644
index 0000000..8368d95
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-heap-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-interlocked-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-interlocked-l1-1-0.dll
new file mode 100644
index 0000000..2626b5f
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-interlocked-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-libraryloader-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-libraryloader-l1-1-0.dll
new file mode 100644
index 0000000..62b03d5
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-libraryloader-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-localization-l1-2-0.dll b/lib/windows/bin/api-ms-win-core-localization-l1-2-0.dll
new file mode 100644
index 0000000..4d9cf6e
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-localization-l1-2-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-memory-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-memory-l1-1-0.dll
new file mode 100644
index 0000000..2c42c9a
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-memory-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-namedpipe-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-namedpipe-l1-1-0.dll
new file mode 100644
index 0000000..b92a7e3
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-namedpipe-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-processenvironment-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-processenvironment-l1-1-0.dll
new file mode 100644
index 0000000..1607de8
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-processenvironment-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-processthreads-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-processthreads-l1-1-0.dll
new file mode 100644
index 0000000..73fe663
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-processthreads-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-processthreads-l1-1-1.dll b/lib/windows/bin/api-ms-win-core-processthreads-l1-1-1.dll
new file mode 100644
index 0000000..c194fef
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-processthreads-l1-1-1.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-profile-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-profile-l1-1-0.dll
new file mode 100644
index 0000000..53c2264
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-profile-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-rtlsupport-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-rtlsupport-l1-1-0.dll
new file mode 100644
index 0000000..215af2e
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-rtlsupport-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-string-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-string-l1-1-0.dll
new file mode 100644
index 0000000..eb16d63
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-string-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-synch-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-synch-l1-1-0.dll
new file mode 100644
index 0000000..a832560
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-synch-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-synch-l1-2-0.dll b/lib/windows/bin/api-ms-win-core-synch-l1-2-0.dll
new file mode 100644
index 0000000..98afd0c
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-synch-l1-2-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-sysinfo-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-sysinfo-l1-1-0.dll
new file mode 100644
index 0000000..e87aa67
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-sysinfo-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-timezone-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-timezone-l1-1-0.dll
new file mode 100644
index 0000000..9759c75
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-timezone-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-core-util-l1-1-0.dll b/lib/windows/bin/api-ms-win-core-util-l1-1-0.dll
new file mode 100644
index 0000000..7260a18
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-core-util-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-conio-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-conio-l1-1-0.dll
new file mode 100644
index 0000000..0480409
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-conio-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-convert-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-convert-l1-1-0.dll
new file mode 100644
index 0000000..591a019
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-convert-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-environment-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-environment-l1-1-0.dll
new file mode 100644
index 0000000..b88ac28
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-environment-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-filesystem-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-filesystem-l1-1-0.dll
new file mode 100644
index 0000000..c60772a
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-filesystem-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-heap-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-heap-l1-1-0.dll
new file mode 100644
index 0000000..d413aad
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-heap-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-locale-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-locale-l1-1-0.dll
new file mode 100644
index 0000000..e1bb543
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-locale-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-math-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-math-l1-1-0.dll
new file mode 100644
index 0000000..b90ddb5
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-math-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-multibyte-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-multibyte-l1-1-0.dll
new file mode 100644
index 0000000..1eecd42
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-multibyte-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-private-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-private-l1-1-0.dll
new file mode 100644
index 0000000..3051e75
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-private-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-process-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-process-l1-1-0.dll
new file mode 100644
index 0000000..ab8d632
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-process-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-runtime-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-runtime-l1-1-0.dll
new file mode 100644
index 0000000..ff1c19a
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-runtime-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-stdio-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-stdio-l1-1-0.dll
new file mode 100644
index 0000000..9e9e6e1
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-stdio-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-string-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-string-l1-1-0.dll
new file mode 100644
index 0000000..af71a1a
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-string-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-time-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-time-l1-1-0.dll
new file mode 100644
index 0000000..8ed94cd
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-time-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/api-ms-win-crt-utility-l1-1-0.dll b/lib/windows/bin/api-ms-win-crt-utility-l1-1-0.dll
new file mode 100644
index 0000000..e836e8c
--- /dev/null
+++ b/lib/windows/bin/api-ms-win-crt-utility-l1-1-0.dll
Binary files differ
diff --git a/lib/windows/bin/decora_sse.dll b/lib/windows/bin/decora_sse.dll
new file mode 100644
index 0000000..1df84c4
--- /dev/null
+++ b/lib/windows/bin/decora_sse.dll
Binary files differ
diff --git a/lib/windows/bin/fxplugins.dll b/lib/windows/bin/fxplugins.dll
new file mode 100644
index 0000000..6d6aab0
--- /dev/null
+++ b/lib/windows/bin/fxplugins.dll
Binary files differ
diff --git a/lib/windows/bin/glass.dll b/lib/windows/bin/glass.dll
new file mode 100644
index 0000000..2f4ee3f
--- /dev/null
+++ b/lib/windows/bin/glass.dll
Binary files differ
diff --git a/lib/windows/bin/glib-lite.dll b/lib/windows/bin/glib-lite.dll
new file mode 100644
index 0000000..b33a707
--- /dev/null
+++ b/lib/windows/bin/glib-lite.dll
Binary files differ
diff --git a/lib/windows/bin/gstreamer-lite.dll b/lib/windows/bin/gstreamer-lite.dll
new file mode 100644
index 0000000..98abe49
--- /dev/null
+++ b/lib/windows/bin/gstreamer-lite.dll
Binary files differ
diff --git a/lib/windows/bin/javafx_font.dll b/lib/windows/bin/javafx_font.dll
new file mode 100644
index 0000000..5916dba
--- /dev/null
+++ b/lib/windows/bin/javafx_font.dll
Binary files differ
diff --git a/lib/windows/bin/javafx_iio.dll b/lib/windows/bin/javafx_iio.dll
new file mode 100644
index 0000000..c4592b1
--- /dev/null
+++ b/lib/windows/bin/javafx_iio.dll
Binary files differ
diff --git a/lib/windows/bin/jfxmedia.dll b/lib/windows/bin/jfxmedia.dll
new file mode 100644
index 0000000..673551f
--- /dev/null
+++ b/lib/windows/bin/jfxmedia.dll
Binary files differ
diff --git a/lib/windows/bin/jfxwebkit.dll b/lib/windows/bin/jfxwebkit.dll
new file mode 100644
index 0000000..076bc79
--- /dev/null
+++ b/lib/windows/bin/jfxwebkit.dll
Binary files differ
diff --git a/lib/windows/bin/msvcp140.dll b/lib/windows/bin/msvcp140.dll
new file mode 100644
index 0000000..4706515
--- /dev/null
+++ b/lib/windows/bin/msvcp140.dll
Binary files differ
diff --git a/lib/windows/bin/prism_common.dll b/lib/windows/bin/prism_common.dll
new file mode 100644
index 0000000..a0842b4
--- /dev/null
+++ b/lib/windows/bin/prism_common.dll
Binary files differ
diff --git a/lib/windows/bin/prism_d3d.dll b/lib/windows/bin/prism_d3d.dll
new file mode 100644
index 0000000..5ee5e5c
--- /dev/null
+++ b/lib/windows/bin/prism_d3d.dll
Binary files differ
diff --git a/lib/windows/bin/prism_sw.dll b/lib/windows/bin/prism_sw.dll
new file mode 100644
index 0000000..482ed54
--- /dev/null
+++ b/lib/windows/bin/prism_sw.dll
Binary files differ
diff --git a/lib/windows/bin/ucrtbase.dll b/lib/windows/bin/ucrtbase.dll
new file mode 100644
index 0000000..e05d4de
--- /dev/null
+++ b/lib/windows/bin/ucrtbase.dll
Binary files differ
diff --git a/lib/windows/bin/vcruntime140.dll b/lib/windows/bin/vcruntime140.dll
new file mode 100644
index 0000000..64e5016
--- /dev/null
+++ b/lib/windows/bin/vcruntime140.dll
Binary files differ
diff --git a/lib/windows/lib/javafx-swt.jar b/lib/windows/lib/javafx-swt.jar
new file mode 100644
index 0000000..81f1646
--- /dev/null
+++ b/lib/windows/lib/javafx-swt.jar
Binary files differ
diff --git a/lib/windows/lib/javafx.base.jar b/lib/windows/lib/javafx.base.jar
new file mode 100644
index 0000000..b45fae4
--- /dev/null
+++ b/lib/windows/lib/javafx.base.jar
Binary files differ
diff --git a/lib/windows/lib/javafx.controls.jar b/lib/windows/lib/javafx.controls.jar
new file mode 100644
index 0000000..d78a436
--- /dev/null
+++ b/lib/windows/lib/javafx.controls.jar
Binary files differ
diff --git a/lib/windows/lib/javafx.fxml.jar b/lib/windows/lib/javafx.fxml.jar
new file mode 100644
index 0000000..0eefe6b
--- /dev/null
+++ b/lib/windows/lib/javafx.fxml.jar
Binary files differ
diff --git a/lib/windows/lib/javafx.graphics.jar b/lib/windows/lib/javafx.graphics.jar
new file mode 100644
index 0000000..e06e695
--- /dev/null
+++ b/lib/windows/lib/javafx.graphics.jar
Binary files differ
diff --git a/lib/windows/lib/javafx.media.jar b/lib/windows/lib/javafx.media.jar
new file mode 100644
index 0000000..9defa67
--- /dev/null
+++ b/lib/windows/lib/javafx.media.jar
Binary files differ
diff --git a/lib/windows/lib/javafx.properties b/lib/windows/lib/javafx.properties
new file mode 100644
index 0000000..ad39df9
--- /dev/null
+++ b/lib/windows/lib/javafx.properties
@@ -0,0 +1,3 @@
+javafx.version=15.0.1
+javafx.runtime.version=15.0.1+1
+javafx.runtime.build=1
diff --git a/lib/windows/lib/javafx.swing.jar b/lib/windows/lib/javafx.swing.jar
new file mode 100644
index 0000000..1def818
--- /dev/null
+++ b/lib/windows/lib/javafx.swing.jar
Binary files differ
diff --git a/lib/windows/lib/javafx.web.jar b/lib/windows/lib/javafx.web.jar
new file mode 100644
index 0000000..efef4e4
--- /dev/null
+++ b/lib/windows/lib/javafx.web.jar
Binary files differ
diff --git a/lib/windows/lib/src.zip b/lib/windows/lib/src.zip
new file mode 100644
index 0000000..f6ec1e7
--- /dev/null
+++ b/lib/windows/lib/src.zip
Binary files differ
diff --git a/src/fallTest/Driver.java b/src/fallTest/Driver.java
index 14b433b..0ad60f0 100644
--- a/src/fallTest/Driver.java
+++ b/src/fallTest/Driver.java
@@ -14,7 +14,7 @@ public class Driver
{
// TODO Auto-generated method stub
SongPlayer g = new SongPlayer();
- g.queueTest();
+ g.loadSong();
g.createAndShowGui();
}
diff --git a/src/fallTest/Score.java b/src/fallTest/Score.java
index f2840a3..7965261 100644
--- a/src/fallTest/Score.java
+++ b/src/fallTest/Score.java
@@ -11,19 +11,19 @@ public class Score
private int score=0;
public void perfect() {
- score += 5*comboMultiplier;
- System.out.println("perfect");
+ score += 300*comboMultiplier;
+ System.out.println("Perfect!");
}
public void close() {
- score += comboMultiplier;
- System.out.println("close");
+ score += 100*comboMultiplier;
+ System.out.println("Good");
}
public void miss() {
combo = 0;
comboMultiplier = 1;
- System.out.println("miss");
+ System.out.println("Miss");
}
public void combo() {
combo++;
diff --git a/src/fallTest/SongPlayer.java b/src/fallTest/SongPlayer.java
index ad3e4e2..62d3464 100644
--- a/src/fallTest/SongPlayer.java
+++ b/src/fallTest/SongPlayer.java
@@ -15,39 +15,102 @@ public class SongPlayer
public static final int HEIGHT = 650;
public static final int LENGTH = 400;
- private final int BLENGTH = LENGTH/6;
+ private final int BLENGTH = LENGTH/7;
private final int BHEIGHT = HEIGHT/20;
- JFrame frame = new JFrame("Guitar Hero"); //creates the frame
- JButton d = new JButton("D"); //creates the four button lanes
+ JFrame frame = new JFrame("Guitar Hero"); //creates the frame
- Queue<NoteInfo> sends = new LinkedList<NoteInfo>(); //Queue that dictates when to send the notes
- ArrayList<NoteField> lanes = new ArrayList<NoteField>(); //Array list containing all the notes currently on the field
- ArrayList<JButton> vis = new ArrayList<JButton>(); //Array list containing the visual representations of the notes in lanes
+ JButton d = new JButton("D"); //button declarations
+ JButton f = new JButton("F");
+ JButton space= new JButton("SPC");
+ JButton j = new JButton("J");
+ JButton k = new JButton("K");
+
+ Queue<NoteInfo> dSends = new LinkedList<NoteInfo>(); //Queue that dictates when to send the notes
+ ArrayList<NoteField> dLane = new ArrayList<NoteField>(); //Array list containing all the notes currently on the field
+ ArrayList<JButton> dVis = new ArrayList<JButton>(); //Array list containing the visual representations of the notes in lanes
+ Queue<NoteInfo> fSends = new LinkedList<NoteInfo>();
+ ArrayList<NoteField> fLane = new ArrayList<NoteField>();
+ ArrayList<JButton> fVis = new ArrayList<JButton>();
+
+ Queue<NoteInfo> spaceSends = new LinkedList<NoteInfo>();
+ ArrayList<NoteField> spaceLane = new ArrayList<NoteField>();
+ ArrayList<JButton> spaceVis = new ArrayList<JButton>();
+
+ Queue<NoteInfo> jSends = new LinkedList<NoteInfo>();
+ ArrayList<NoteField> jLane = new ArrayList<NoteField>();
+ ArrayList<JButton> jVis = new ArrayList<JButton>();
+
+ Queue<NoteInfo> kSends = new LinkedList<NoteInfo>();
+ ArrayList<NoteField> kLane = new ArrayList<NoteField>();
+ ArrayList<JButton> kVis = new ArrayList<JButton>();
+
Score score = new Score();
- public void queueTest() {
- sends.add(new NoteInfo(1000));
- sends.add(new NoteInfo(2000));
- sends.add(new NoteInfo(3000));
- sends.add(new NoteInfo(4000));
- sends.add(new NoteInfo(5000));
- sends.add(new NoteInfo(6000));
- sends.add(new NoteInfo(7000));
- sends.add(new NoteInfo(8000));
- sends.add(new NoteInfo(9000));
+ /**
+ * Establishes what the chart for the song is going to look like
+ */
+ public void loadSong() {
+ dSends.add(new NoteInfo(4000));
+ dSends.add(new NoteInfo(4333));
+ dSends.add(new NoteInfo(4666));
+ fSends.add(new NoteInfo(5000));
+ kSends.add(new NoteInfo(5500));
+ spaceSends.add(new NoteInfo(6000));
+ jSends.add(new NoteInfo(6000));
+ jSends.add(new NoteInfo(6250));
+ dSends.add(new NoteInfo(6500));
+ jSends.add(new NoteInfo(6750));
+ spaceSends.add(new NoteInfo(7000));
+ fSends.add(new NoteInfo(7500));
+ jSends.add(new NoteInfo(7750));
+ spaceSends.add(new NoteInfo(8000));
+ fSends.add(new NoteInfo(8500));
+ jSends.add(new NoteInfo(8500));
+ dSends.add(new NoteInfo(9000));
+ spaceSends.add(new NoteInfo(9000));
+ kSends.add(new NoteInfo(9000));
+ spaceSends.add(new NoteInfo(9500));
+
+ kSends.add(new NoteInfo(10000));
+ dSends.add(new NoteInfo(10000));
+ kSends.add(new NoteInfo(10333));
+ fSends.add(new NoteInfo(10333));
+ kSends.add(new NoteInfo(10666));
+ spaceSends.add(new NoteInfo(10666));
+ dSends.add(new NoteInfo(11000));
+ spaceSends.add(new NoteInfo(11000));
+ dSends.add(new NoteInfo(11333));
+ jSends.add(new NoteInfo(11333));
+ dSends.add(new NoteInfo(11666));
+ kSends.add(new NoteInfo(11666));
+ spaceSends.add(new NoteInfo(12000));
}
/**
- * Creates the Gui used to play the game
+ * Creates the GUI used to play the game
*/
public void createAndShowGui() {
d.setBounds(1*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT); //makes the button bounds for each button
-
+ f.setBounds(2*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT);
+ space.setBounds(3*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT);
+ j.setBounds(4*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT);
+ k.setBounds(5*BLENGTH, (5*HEIGHT)/6, BLENGTH, BHEIGHT);
+ d.setFocusable(false); //makes it so you can't focus on the button
+ f.setFocusable(false);
+ space.setFocusable(false);
+ j.setFocusable(false);
+ k.setFocusable(false);
+
+
frame.add(d); //adds the buttons to the frame
+ frame.add(f);
+ frame.add(space);
+ frame.add(j);
+ frame.add(k);
frame.setSize(LENGTH, HEIGHT); //sets the size of the frame
frame.setLayout(null);
@@ -56,27 +119,58 @@ public class SongPlayer
while (true) { //TRY TO FIND A BETTER SOLUTION FOR THIS?? maybe something like sends.size() > 0 || lanes.size() > 0
- if (!sends.isEmpty() && sends.peek().getTime()-time.time()<3) { //checks if any notes in the queue need to be sent at this time
- lanes.add(new NoteField()); //adds that note's information to the lane list
-
- vis.add(new JButton()); //creates a visual representation of that note in the visualizer list
- frame.add(vis.get(vis.size()-1));
-
- sends.remove(); //removes the note just sent from the sending queue
- }
+ update(d, dSends, dLane, dVis, 'd', "dPress", 1); //updates the provided lane
+ update(f, fSends, fLane, fVis, 'f', "fPress", 2);
+ update(space, spaceSends, spaceLane, spaceVis, ' ', "spacePress", 3);
+ update(j, jSends, jLane, jVis, 'j', "jPress", 4);
+ update(k, kSends, kLane, kVis, 'k', "kPress", 5);
+
+ frame.repaint(); //updates the visuals every frame
+
+ try {
+ Thread.sleep(10); //THIS IS PROBABLY NOT THE BEST WAY TO DO THIS
+ } catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Updates a lane. An update involves:
+ * Checking to see if a note needs to be sent down a lane
+ * Checking to see if the user hit the button
+ * Checking to see if any notes have moved past the lane
+ * @param sends The sending queue for the given lane
+ * @param lane The place where note information is stored for notes currently in that lane
+ * @param vis The place where the visual representation for a note is stored in that lane
+ * @param key The button on the keyboard corresponding to the button for the lane being updated
+ * @param id The id for the action map
+ * @param k The lane number
+ */
+ private void update(JButton button, Queue<NoteInfo> sends, ArrayList<NoteField> lane, ArrayList<JButton> vis, char key, String id, int k) {
+ if (!sends.isEmpty() && sends.peek().getTime()-time.time()<3) { //checks if any notes in the queue need to be sent at this time
+ lane.add(new NoteField()); //adds that note's information to the lane list
- if (lanes.size() > 0) { //if there are any notes in the lanes, tests for a button press
- d.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke('d'), "dPress"); //Input map and Action map setting
- d.getActionMap().put("dPress", new AbstractAction() { //Defines what happens when the proper button is pressed
- public void actionPerformed(ActionEvent e)
- {
- int i = getClosestNote();
- int dist = (int)Math.abs(lanes.get(i).goalDistance());
-
- lanes.remove(i); //removes the notes and visual representation from the playing field when the button is pressed
+ vis.add(new JButton()); //creates a visual representation of that note in the visualizer list
+ frame.add(vis.get(vis.size()-1));
+
+ sends.remove(); //removes the note just sent from the sending queue
+ }
+
+ if (lane.size() > 0) { //if there are any notes in the lanes, tests for a button press
+ button.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(key), id); //Input map and Action map setting
+ button.getActionMap().put(id, new AbstractAction() { //Defines what happens when the proper button is pressed
+ public void actionPerformed(ActionEvent e)
+ {
+ if (lane.size() > 0) {
+ int i = getClosestNote(lane);
+ int dist = (int)Math.abs(lane.get(i).goalDistance());
+
+ lane.remove(i); //removes the notes and visual representation from the playing field when the button is pressed
frame.remove(vis.get(i));
vis.remove(i);
-
+
if (dist > 2*BHEIGHT) { //Determines what to add to the score depending on the proximity of the note
score.miss();
}
@@ -88,51 +182,40 @@ public class SongPlayer
score.combo();
score.perfect();
}
-
- System.out.println(score.getScore() + " Combo: " + score.getCombo());
- }
- });
- d.setFocusable(false); //makes it so you can't focus on the button
- }
-
- for (int i=0; i<lanes.size(); i++) { //goes through every note on the field
- lanes.get(i).gameTick(); //moves every note down
- vis.get(i).setBounds(BLENGTH, HEIGHT-lanes.get(i).getY(), BLENGTH, BHEIGHT);
-
- if (lanes.size() > 0 && lanes.get(i).getFailed()) { //if the note has passed into the fail boundary, removes the note from the field
- score.miss();
- System.out.println(score.getScore() + " Combo: " + score.getCombo());
-
-
- lanes.remove(i);
- frame.remove(vis.get(i));
- vis.remove(i);
- i--;
+ System.out.println("Score: " + score.getScore() + " Combo: " + score.getCombo());
+ }
}
- }
-
- frame.repaint(); //updates the visuals every frame
+ });
+ }
+
+ for (int i=0; i<lane.size(); i++) { //goes through every note on the field
+ lane.get(i).gameTick(); //moves every note down
+ vis.get(i).setBounds(k*BLENGTH, HEIGHT-lane.get(i).getY(), BLENGTH, BHEIGHT);
- try {
- Thread.sleep(10);
- } catch (InterruptedException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ if (lane.size() > 0 && lane.get(i).getFailed()) { //if the note has passed into the fail boundary, removes the note from the field
+ score.miss();
+ System.out.println(score.getScore() + " Combo: " + score.getCombo());
+
+
+ lane.remove(i);
+ frame.remove(vis.get(i));
+ vis.remove(i);
+
+ i--;
}
- }
+ }
}
/**
* Finds the note closest to the goal
* @return the location in the array list of the closest note
*/
- private int getClosestNote() {
+ private int getClosestNote(ArrayList<NoteField> searchLane) {
int pos = 0;
- for (int i=0; i<lanes.size(); i++) {
- if (Math.abs(lanes.get(i).goalDistance()) < Math.abs(lanes.get(pos).goalDistance())) {
+ for (int i=0; i<searchLane.size(); i++) {
+ if (Math.abs(searchLane.get(i).goalDistance()) < Math.abs(searchLane.get(pos).goalDistance())) {
pos = i;
}
}