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
Implemented game loop #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
fredy20501
reviewed
Feb 10, 2022
app/src/main/java/ca/unb/mobiledev/reflexrevolution/GameActivity.java
Outdated
Show resolved
Hide resolved
app/src/main/java/ca/unb/mobiledev/reflexrevolution/GameActivity.java
Outdated
Show resolved
Hide resolved
app/src/main/java/ca/unb/mobiledev/reflexrevolution/GameActivity.java
Outdated
Show resolved
Hide resolved
app/src/main/java/ca/unb/mobiledev/reflexrevolution/GameActivity.java
Outdated
Show resolved
Hide resolved
fredy20501
reviewed
Feb 10, 2022
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.
…x-revolution into game-loop-timer
fredy20501
approved these changes
Feb 12, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done! 🥇
Looks good! Nice work :) |
hsavoie
approved these changes
Feb 12, 2022
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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, increase score, 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.