It is possible to move the King and the Rook at once. The king moves two squares towards the rook and the rook is placed on other side of the king. 2 kinds of castling is possible: short castling and long castling .
Rules of the castling
Castling with the king or the rook that has already moved is illegal.
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.
before en passant
after en passant
If a pawn advances two squares at its first move and comes next to the opponent's pawn , it may be captured by the opponent as it is pretended that it moved one square. It is called "en passant". But this capture must be made after the pawn moves two squares . If a player doesn't use this right and does another move , he will loose his "en passant right" and can not capture it again by using "en passant" right.
In the diagram Black pawn moved 2 squares and White captured it as it moved 1 square according to the "en passant" rule.