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

Add position.XFENString() #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add position.XFENString() #126

wants to merge 1 commit into from

Conversation

mikeb26
Copy link

@mikeb26 mikeb26 commented May 26, 2023

When working with 3rd party chess APIs these may require positions to be expressed in X-FEN notation rather than FEN. e.g. Notably while some of the lichess.org APIs work with either FEN or X-FEN, some of them require X-FEN. This commit adds position.XFENString() for this purpose. The key difference between X-FEN and FEN is the encoding of the en passant square. X-FEN will only specify it when an opposing pawn is in position to capture, while FEN will always specify it.

When working with 3rd party chess APIs these may require positions to
be expressed in X-FEN notation rather than FEN. e.g. Notably while
some of the lichess.org APIs work with either FEN or X-FEN, some of
them require X-FEN. This commit adds position.XFENString() for this
purpose. The key difference between X-FEN and FEN is the encoding of
the en passant square. X-FEN will only specify it when an opposing
pawn is in position to capture, while FEN will always specify it.
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.

1 participant