You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @erjoalgo, unfortunately no, this feature hasn't been implemented.
To make it work, a chessboard representation should be kept in memory, so the library can simulate all the moves and return a FEN string.
We should also keep in mind that a FEN string also report castling availability and en passant target square, so the library also needs to calculate possible moves… Not as simple as it sounds…
https://github.com/wolfraam/chess-game I'm integrating this library, which does the heavy lifting in terms of keeping track of game state and listing legal moves. Perhaps the best option to provide this feature would be to use chess-game internally, and this would avoid duplicating effort.
Return the FEN notation for a given half-move coordinate.
Given a PGN with 1. e4 e5 2. Nf3 Nc6
Example (pseudo code):
See https://en.wikipedia.org/wiki/Forsyth–Edwards_Notation
The text was updated successfully, but these errors were encountered: