To castle, move your King two squares to the right for short castling, or two squares to the left for long castling. Casting is only permitted under the following conditions:
- all the squares between the King and the Rook must be empty
- neither the King nor the Rook must have previously moved from their initial square
- the King must not be in check at the time of castling or afterwards
- the King must not "pass over under a check" by performing the castling
In Fischer Random mode, castling is done by keeping "the King on the Rook" with which he wishes to castle.