Update games.py - allow query_player to get user input before returning#1078
Closed
SandersLin wants to merge 1 commit into
Closed
Update games.py - allow query_player to get user input before returning#1078SandersLin wants to merge 1 commit into
SandersLin wants to merge 1 commit into
Conversation
The original code bails when user fail to input valid moves. One consequence of this when the user inputs invalid string (typo ect.) , query_player returns None and this messes up the entire playing sequence.
Member
|
Thanks @SandersLin! Your fork branch was gone, so we rebased this onto master and merged it as the new PR (authorship preserved). Closing in favor of it. |
dmeoli
added a commit
that referenced
this pull request
Jun 26, 2026
Loop query_player until the entered move is legal. Supersedes #1078 by @SandersLin.
This file contains hidden or 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
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.
The original code bails when user fail to input valid moves. One consequence of this when the user inputs invalid string (typo ect.) ,
query_playerreturns None and this messes up the entire playing sequence. (the other player gets to play two ply in a row)