lichess.org
Donate

Bug: As white, if the a1 rook enters f1 or g1 during the game it forfeits short castling rights.

I'm a retired software engineer. I see how that could happen. A flag is set on the square, indicating that a rook - any rook - has been on f1 or g1, rather than a flag set for the piece, ie the king's rook, indicating if it has moved. Using flags on the squares makes sense, since you want to check the squares for being under attack, or occupied by a piece of either color. The fix could be a bugger.
Nice analysis owltune.
This is a consequence of the application of murphy's law.
It happens whenever like here when the developper wants to make the code simpler, for different reasons, than the exact rule.
Pretty sure you mean a direct consequence of Morphy's Law.

This topic has been archived and can no longer be replied to.