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

Replace GameReader implementation with JSON #26

Open
zxul767 opened this issue Mar 20, 2022 · 1 comment
Open

Replace GameReader implementation with JSON #26

zxul767 opened this issue Mar 20, 2022 · 1 comment

Comments

@zxul767
Copy link
Owner

zxul767 commented Mar 20, 2022

There is no point in creating our own format when we could use JSON to store the configuration. Parsing it could be easily done with a library like https://github.com/nlohmann/json

@zxul767
Copy link
Owner Author

zxul767 commented Mar 22, 2022

After reviewing the implementation of python-chess, I'm inclined to believe that maybe we should just use an existing persistence format (such as FEN notation or some variant that can fully capture the state of a game--including castling privileges, en-passant capture possibility, etc.)

It is important to say that our current format doesn't actually account for all possibilities. For example, in a game loaded from our format, it is impossible to tell whether a position has been repeated more than once (so as to be able to claim a draw by 3-fold repetition). One format that does support this is the Portable Game Notation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant