Castling in chess, while it involves the king and one rook, is considered a king move. The conditions are as follows:
- the king may not have previously moved
- the rook that the king will castle with may not previously have moved
- the squares between the king and rook it will castle with must be vacant
- the king may not be in check
- the square the king passes over may not be in check
- the square the king lands on may not be in check
If all of those conditions are met, the king moves FIRST two squares towards the rook it will castle with, then the rook moves to the other side of the king.
Note the rook may be under attack, and if castling with the queen rook, the square b1 (or b8 for black) may be under attack.
Note that if you move the rook first, your opponent may hold you to that move only, as your intention to castle must be demonstrated by moving the king first.
Inactive Tutor
Note: you may NOT castle with a promoted rook (even if it has never "moved"). Castling is legal only with one of the original rooks.05/21/21