Originally posted by Ponderable
I can't see in which of your games the problem arises...
In fact it should work if the criteria re fulfilled:
* The King is not in check
* The King doesn't need to travel over a square which is in check
* neither the King nor the Rook have been moved previously.
and moving the King in direction of the rook two squares should do the trick.
one more criteron . .. .if you are castling on the queenside, the path must be clear . . . that is, no pieces on the knight square . . .