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 Typing and Dialing Instructions #13
Conversation
carterjmoore
commented
Mar 4, 2022
- Added TypeInstruction, which makes the user type a random 5-letter word, read from a text file
- Added DialInstruction, which makes the user type a random 7-digit phone number (no need to type the hyphen)
- Extra time is added for both instructions, as they take longer than usual, but we may want to adjust this value
- There is currently an issue, as described in Teams, where the keyboard stays up if it is open when you force stop the program from Android Studio
Typing instruction works now, just need to figure out the best way to store a large list of strings and get a random one
Word list is stored in a JSON file, then read into an arraylist in memory when the game starts. We get a random word from this list whenever the instruction is triggered.
Also made it so you get extra time if the current instruction is dialing or typing
Fixed a bug where keyboard wasn't hiding after dial instruction ends. Tweaked time added for the two instructions.
Implemented picking a random word directly from file using RandomAccessFile
TypeInstruction now does readLine() twice, which guarantees it's at the start of a line, so no need to loop now
app/src/main/java/ca/unb/mobiledev/reflexrevolution/activities/GameActivity.java
Show resolved
Hide resolved
app/src/main/java/ca/unb/mobiledev/reflexrevolution/instructions/Instruction.java
Outdated
Show resolved
Hide resolved
app/src/main/java/ca/unb/mobiledev/reflexrevolution/instructions/TypeInstruction.java
Outdated
Show resolved
Hide resolved
app/src/main/java/ca/unb/mobiledev/reflexrevolution/instructions/TypeInstruction.java
Outdated
Show resolved
Hide resolved
app/src/main/java/ca/unb/mobiledev/reflexrevolution/instructions/TypeInstruction.java
Outdated
Show resolved
Hide resolved
app/src/main/java/ca/unb/mobiledev/reflexrevolution/instructions/TypeInstruction.java
Outdated
Show resolved
Hide resolved
By the way, I tested with an emulator and the keyboard didn't stay up when I force stop the program. The app just closes normally. (also no issues with my real phone) It might be the demon in your emulator acting up again 🤔 |
Ah, I see... well at least it works on your end🤣 |
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.
💯
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.
Nice! Great work :)