Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Jump Instruction #7

Merged
merged 4 commits into from Feb 14, 2022
Merged

Implement Jump Instruction #7

merged 4 commits into from Feb 14, 2022

Conversation

fredy20501
Copy link
Owner

Summary of work

  • Implemented the Jump Detector
  • Created a test activity (JumpTestActivity) for testing the jump input
  • It works similarly to shake, except I also use the direction of gravity to know which direction is up (regardless of the phone's orientation).

Note: For some reason, the acceleration values I got from my phone when moving it down were almost the same as when moving it up, so the jump detector technically works if you move up or down (relative to gravity).

@fredy20501 fredy20501 self-assigned this Feb 12, 2022
@fredy20501 fredy20501 changed the base branch from main to integrate-shake February 12, 2022 23:53
Copy link
Collaborator

@hsavoie hsavoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for my emulator and code looks good!

Base automatically changed from integrate-shake to main February 14, 2022 15:31
@fredy20501 fredy20501 merged commit 90ee634 into main Feb 14, 2022
@fredy20501 fredy20501 deleted the instr-jump branch February 14, 2022 15:37
hsavoie added a commit that referenced this pull request Feb 23, 2022
commit 90ee634
Author: Frederic Verret <43451024+fredy20501@users.noreply.github.com>
Date:   Mon Feb 14 11:37:10 2022 -0400

    Implement Jump Instruction (#7)

commit 42f0f8d
Author: Frederic Verret <43451024+fredy20501@users.noreply.github.com>
Date:   Mon Feb 14 11:31:58 2022 -0400

    Integrated shake instruction, organized java files (#5)

commit b6e6a60
Author: Carter Moore <71897852+carterjmoore@users.noreply.github.com>
Date:   Sat Feb 12 11:47:11 2022 -0400

    Implemented game loop (#3)

    * Implemented game loop

    Set up the game loop. With every loop, we get a random instruction from a list of instructions and then add the corresponding UI elements. If the proper input is received, we clear the UI elements, wait one second, and then loop again. Also made it so the time available to perform the actions scales with score, but we might want to adjust this scale in the future.

    * Implemented changes Fred requested

    Added enums for Instructions, GameMode, and Difficulty. Instruction list is now constructed based on GameMode. Timer now pauses when app is paused and resumed when it resumes. Also cleaned up a few other things suggested by Fred.

    * Fixed a bug where "Play Again" caused crashing

    * Swapped MainActivity to be the main activity

commit d50e59e
Author: Frederic Verret <43451024+fredy20501@users.noreply.github.com>
Date:   Fri Feb 11 08:26:36 2022 -0400

    Implement ShakeDetector (#4)

    - Also created a ShakeTestActivity to test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants