The entire point of a FEN is that it describes the entire board state without having to know anything about the history.
> Which of course is annoying to implement, but you do already have to keep state on the history of the game to determine if moves are legal, e.g. you can’t castle twice.
No, that's what the castling rights field in the FEN is for. Once you castle, you zero out both the k and q bits.
> Which of course is annoying to implement, but you do already have to keep state on the history of the game to determine if moves are legal, e.g. you can’t castle twice.
No, that's what the castling rights field in the FEN is for. Once you castle, you zero out both the k and q bits.