In Chess960 animation of castlings is suppressed, because the move is encoded
as KxR, so that the to-square in general is not the final destination of the
King. So it is just confusing to the eye to see the King slide to the Rook,
and then jump to an entirely different square. In S-Chess castlings can
similarly be encoded as RxK (to indicate gating at the Rook square), and
animation of those moves should be suppressed for the same reason. But it
wasn't, and in Fischer castlings denoted as RxK this even caused the Rook
to disappear when it didn't need to moved.
Perhaps one day a smart method of animating Fischer castlings can be
designed. (E.g. remove Rook, animate King move to true to-square, place Rook?
But what if the King doesn't move at all? Animate Rook then? Normal castlings
now animate the King, and then just displace the Rook.)
return;
if(board[toY][toX] == WhiteRook && board[fromY][fromX] == WhiteKing ||
- board[toY][toX] == BlackRook && board[fromY][fromX] == BlackKing)
+ board[toY][toX] == BlackRook && board[fromY][fromX] == BlackKing ||
+ board[toY][toX] == WhiteKing && board[fromY][fromX] == WhiteRook || // [HGM] seirawan
+ board[toY][toX] == BlackKing && board[fromY][fromX] == BlackRook)
return; // [HGM] FRC: no animtion of FRC castlings, as to-square is not true to-square
if (fromY < 0 || fromX < 0 || toX < 0 || toY < 0) return;