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

[Quantum RPG] allow action selections to be modified #182

Merged
merged 8 commits into from
Mar 20, 2024

Conversation

solodov
Copy link
Collaborator

@solodov solodov commented Feb 20, 2024

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.

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.
Copy link

google-cla bot commented Feb 20, 2024

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.

@solodov solodov linked an issue Feb 20, 2024 that may be closed by this pull request
@solodov
Copy link
Collaborator Author

solodov commented Mar 5, 2024

other than the unrelated lint errors (fixed in a different PR) this is ready to go.

@solodov solodov changed the title allow action selections to be modified [Quantum RPG] allow action selections to be modified Mar 5, 2024
@solodov solodov requested a review from dstrain115 March 6, 2024 10:06
while True:
inputs = [p() for p in prompts]
print("[enter]) Confirm selection.", file=file)
print("r) Select again.", file=file)
Copy link
Collaborator

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?

Copy link
Collaborator Author

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)
Copy link
Collaborator

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.

Copy link
Collaborator

@dstrain115 dstrain115 left a 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"

@solodov solodov merged commit 97bcb1e into quantumlib:main Mar 20, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quantum RPG: Allow undo in sequential actions
2 participants