Hacker News new | ask | show | jobs
by HL33tibCe7 761 days ago
I mean technically it still isn’t ambiguous because you could just refer to the starting position to see which rook is allowed to move.

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.

2 comments

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.

You don't have the starting position