castle queenside even if Black is attacking b1; Black can castle queenside even if White is attacking b8.) The king may have been in check earlier in the game. Tournament rules Under the rules used by FIDE and enforced in most tournaments, castling is considered a king move, so the king must be touched first; if the rook is touched first, a rook move must be made instead. As usual, the player may choose another legal destination square for the king until releasing it. When the two-square king move is completed, however, the player is committed to castling if it is legal, and the rook must be moved accordingly. The entire move must be completed with one hand. A player who illegally attempts to castle must return the king and the rook to their original places and then make a legal king move if possible (which may include castling on the other side). If there is no legal king move, the touch-move rule does not apply to the rook. Under US Chess Federation rules, a player who intends to castle and touches the rook first would suffer no penalty and would be permitted to castle, provided castling is legal in the position. These tournament rules are not commonly enforced in or commonly known by casual players. Castling rights An unmoved king has castling rights with an unmoved rook of the same color on the same rank. In the context of threefold and fivefold repetition, two positions with different castling rights are considered to be different positions. Example of castling rights In a 1986 game between Anatoly Karpov and Tony Miles, play continued from the diagrammed position as follows: 22... Ra4 23. Nc3 Ra8 24. Nb5 Ra4 25. Nc3 Ra8 26. Nb5 With his 26th move, Karpov attempted to claim a draw by threefold repetition, thinking that the positions after his 22nd, 24th, and 26th moves were the same. However, it was pointed out to him that the position after his 22nd move had different castling rights than the positions after his 24th and 26th moves, rendering his claim illegal. As a result, Karpov was penalized three minutes on his clock. The game ended in a draw. Notation Both algebraic notation and descriptive notation indicate kingside castling as 0-0 and queenside castling as 0-0-0 (with the digit zero). Portable Game Notation and some publications instead use O-O for kingside castling and