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

Implemented Typing and Dialing Instructions #13

Merged
merged 8 commits into from Mar 17, 2022

Conversation

carterjmoore
Copy link
Collaborator

  • 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
@fredy20501
Copy link
Owner

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 🤔

@carterjmoore
Copy link
Collaborator Author

Ah, I see... well at least it works on your end🤣

Copy link
Owner

@fredy20501 fredy20501 left a comment

Choose a reason for hiding this comment

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

💯

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.

Nice! Great work :)

@fredy20501 fredy20501 merged commit 1d7c183 into main Mar 17, 2022
@fredy20501 fredy20501 deleted the Integrate-Type-Instruction branch March 17, 2022 01:19
@carterjmoore carterjmoore restored the Integrate-Type-Instruction branch March 17, 2022 19:03
@carterjmoore carterjmoore deleted the Integrate-Type-Instruction branch March 17, 2022 19:05
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