Chess is a board game in which players take turns moving one piece at a time. Each type of piece has its own powers of movement and may capture another piece by moving to its space. The object of the game is to checkmate your opponent's King, which means to put it into a position in which it is attacked (in check) and is unable to legally move. If a player is ever unable to move without being in check, that is stalemate, and the game ends in a draw. The game may also draw through three-times repetition of the same position or by 50 turns going by without either player moving a Pawn or capturing a piece.
Rooks start in the corners and can pass over any number of empty spaces to reach another space on the same rank or file. Knights start beside the Rook, and they leap in an L shape to a space at the other corner of a 2x3 rectangle. In making this leap, a Knight may pass over occupied spaces. Bishops start on the other side of the Knights, and they may pass over any number of empty spaces to reach another space on the same diagonal. The Queen, beginning in the center on its own color, can move as a Rook or a Bishop. The King, beginning next to the Queen, can move one space in any orthogonal or diagonal direction. Unlike other pieces, the King may not move to a space from which it may be captured. Nor may any other piece move in a way that leaves its King open to capture. One time in the game, an unmoved King may castle with an unmoved Rook by moving two spaces in the Rook's direction, after which the Rook will leap to the other side of the King. The King may only castle when it is not checked, there are no occupied spaces between it and the Rook, and its castling move does not pass it through check. Pawns begin on each player's second rank, and they normally move forward one space at a time. A Pawn may move to the space right in front of it if it is empty, and it captures by moving one space diagonally forward. On its first move, a Pawn may move forward two spaces in the same file as long as its path is unobstructed. If this double move passes by a space from which the opponent's Pawn could capture it, that Pawn may capture it on the next turn by moving to the space it passed over, capturing it en passant. When a Pawn reaches the last rank of the board, it may promote to any piece except a King.