Originally Posted by
Oracle
You worded it better than I did. King can't pass from, through, or into any square that's being attacked while it's castling. It's just somewhat rare for somebody to try to castle where somebody is attacking a square the king passes through since it's so uncommon for that situation to occur with standard center board starts.
The reason I bring up more specifically the king, is even advanced beginners think the rook can't move through attack when castling.
I just created this position on an engine:
White to move, white is allowed to castle in this position. Some advanced beginners have stopped the clock on OTB games and called for the judge to come over because they thought this was illegal. They thought: oh man, you can't castle, the Rook on H1 is under attack. But he can legally castle.
The total rules are as follows:
1) To initiate a castle, you must move the king first. Castling is a king move, not a rook move.
2) The King cannot have moved
3) The Rook cannot have moved
4) There are no pieces between the King and Rook
5) The king cannot castle if he's in check, he moves through a square where he'd be checked, or ends the castle on a square where he then would be checked.
6) Move the king first, then the knight. Chess annotation for a kingside castle is O-O, and O-O-O for a queenside castle