-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Quantum RPG] allow action selections to be modified #182
Conversation
This change adds a function to get multiple user inputs, each with its own prompt function. Once all inputs have been collected, user gets a chance to confirm selection by providing empty input (press enter) or enter "r" to select again.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
- fixed type annotations to support python 3.9 - fixed remaining broken tests - reformatted changed files
other than the unrelated lint errors (fixed in a different PR) this is ready to go. |
while True: | ||
inputs = [p() for p in prompts] | ||
print("[enter]) Confirm selection.", file=file) | ||
print("r) Select again.", file=file) |
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.
Maybe we could change this to "Redo selection" so that the choice of 'r' is more obvious?
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.
done
""" | ||
while True: | ||
inputs = [p() for p in prompts] | ||
print("[enter]) Confirm selection.", file=file) |
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.
I am conflicted about making the user do an extra prompt at the end for every action. Let's discuss at the next unitary meeting.
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.
LGTM. If you feel adventurous (pun intended), then feel free to follow up with a "fast-mode"
This change adds a function to get multiple user inputs, each with its own prompt function. Once all inputs have been collected, user gets a chance to confirm selection by providing empty input (press enter) or enter "r" to select again.