-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix rules for chess game template, see game of chess template issue #27 #29
base: master
Are you sure you want to change the base?
Conversation
Thank you very much for your suggestion! It is a nice start you have written there. Unfortunately, the code of that prototype is quite messy, game rules have been encoded in a rather bad manner. The fix you suggested could work in theory, but in practice because of how exsiting functions have been defined, the fix you suggested causes an infinite recursion loop, that makes the game crash. You can see this phenomenon if you try to run the game with two A.I. s playing. Error message after crash:
To fix this requires quite a lot of refactoring, but once a few new functions are available, it will become feasible to rewrite rules properly without falling into the infinite recursion loop trap. I've pushed a few commits to ease a final problem resolution :) |
Information after files that still require modifications, after the small refactoring:
comments that start with |
linked to issue #27 . Handy idea: to ensure the issue will be solved, it would be nice to have a way of testing a specific configuration of the chessboard and print out all valid moves computed by the game |
I have modified the code for the chess rules to fix the issue with the castling move. Please check and let me know if it is in line with your vision for the engine.
Also, I did not update the version number in this change for the setup.py as I am not sure on how you handle the versioning for the package deployment.