diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2023-05-03 21:29:23 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2023-05-03 21:29:23 -0400 |
commit | 96fae9b176c670a2bae04f7f22367e15989e73b3 (patch) | |
tree | 72ad28111d5c53e47dc5a825730bc88e6f7e638f /NoteTest.java | |
parent | 5bc9eabe409b6908b5d0bd75e24a6b50514020c4 (diff) | |
parent | ff2fa62df5e80f9ef053297afdd65254b5044d60 (diff) | |
download | NPEhero-96fae9b176c670a2bae04f7f22367e15989e73b3.tar.gz NPEhero-96fae9b176c670a2bae04f7f22367e15989e73b3.tar.bz2 NPEhero-96fae9b176c670a2bae04f7f22367e15989e73b3.zip |
Merge branch 'main' of https://gitlab.sowgro.net/guitarheros/guitarhero
Diffstat (limited to 'NoteTest.java')
-rw-r--r-- | NoteTest.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/NoteTest.java b/NoteTest.java new file mode 100644 index 0000000..dd38b72 --- /dev/null +++ b/NoteTest.java @@ -0,0 +1,35 @@ +/*Name: + *Date: + *Period: + *Teacher: + *Description: + */ +package cs; +import java.awt.*; + +public class NoteTest +{ + private boolean failed = false; + private int lane; + private final int NOTESPEED = 1; + private int yPos = SongPlayer.HEIGHT; + + public void gameTick() { + if (!failed) { + if (yPos > 0) { + yPos -= NOTESPEED; + } + else { + failed = true; + } + } + } + + public boolean getFailed() { + return failed; + } + + public int getY() { + return yPos; + } +} |