\begin{definition}[Definition:Chess/Rules/Castling]
'''Castling''' is a special move where, in one move, the king moves two squares towards a rook, and the rook jumps over the king and lands on the next square the other side of the king.
This can only be done if:
:$(1): \quad$ The king and rook have not been moved yet.
:$(2): \quad$ The squares in between the king and rook are empty.
:$(3): \quad$ The king is not in check, and neither of the $2$ squares it moves through are under attack.
{{ChessDiagram|
|'''Position of king and rook before castling'''
|rd|  |  |  |kd|  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |kl|  |  |rl
|
}}
{{ChessDiagram|
|'''Position of king and rook after castling'''
|  |  |kd|rd|  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |rl|kl|  
|
}}
Category:Definitions/Chess
\end{definition}