Before castling
Short castling - Long castling

The King and the Rook move at once.
King moves two squares to right or left and the Rook is placed on other side of the King.

Castling is not permitted
if the King and the Rook you want to use in castling have already moved.

Castling is prevented temporarily :
- when the king is attacked by opponent's piece,
- when the square which the king cross or occupies is attacked by opponent's piece.
- when there is any piece between the King and the Rook.



Full site