-
Notifications
You must be signed in to change notification settings - Fork 29
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
Bug fix: Bot move freezes player move #84
base: main
Are you sure you want to change the base?
Conversation
Hello @LucaSain thanks for the contribution the code seems good and logical, do you have any steps to reproduce the bug ? I wasn't able to reproduce it on my computer |
* Add reset the game/ go to the menu by pressing a key * Material difference --------- Signed-off-by: Thomas Mauran <thomasmauran@yahoo.com> Co-authored-by: Thomas Mauran <thomasmauran@yahoo.com>
Hi, sorry for late reply.
Try with this bot. It's slower and the issue should visible: |
Ah yes I do see it now, I tried to play a game and lost but the game didn't end after reading the code maybe this is an edge case, I was able to get the Black Won text after selecting the black queen in this position: |
Fix for player move freeze by bot move computation
Description
On each game tick, the bot move state will be checked and the player move will be rendered first.
This solution relies on a variable exposed through the board enum and an if clause in the app loop. This solution is not perfect and maybe a thread-event approach would be better. Any feedback would be extremely helpful.
Fixes #83
Checklist: