Skip to content

Conversation

@mikeb26
Copy link
Contributor

@mikeb26 mikeb26 commented Jul 12, 2025

It looks like your fork of notnil/chess.git is missing this which was merged @b30c7028

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.

(cherry picked from commit b30c7028492205fcea48ad31010dee4b26c80ea6)

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.

(cherry picked from commit b30c7028492205fcea48ad31010dee4b26c80ea6)
@CorentinGS CorentinGS merged commit dc0186c into CorentinGS:main Jul 12, 2025
6 checks passed
@mikeb26 mikeb26 deleted the xfen branch July 12, 2025 18:36
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