Skip to content

Update games.py - allow query_player to get user input before returning#1078

Closed
SandersLin wants to merge 1 commit into
aimacode:masterfrom
SandersLin:games
Closed

Update games.py - allow query_player to get user input before returning#1078
SandersLin wants to merge 1 commit into
aimacode:masterfrom
SandersLin:games

Conversation

@SandersLin

Copy link
Copy Markdown
Contributor

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. (the other player gets to play two ply in a row)

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.
@dmeoli

dmeoli commented Jun 26, 2026

Copy link
Copy Markdown
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.
@dmeoli dmeoli closed this Jun 26, 2026
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.

2 participants