Basics
Chess is a board game for two players. At the beginning, each player has 16 pieces of one color — white or black. The game is started by the player with white pieces. Players take turns making a single move at a time. The game is played on a board with dimensions of 8 by 8. The basic setup of the pieces is defined as follows:
Just like the pieces, the chessboard squares are white and black. Nonetheless, all squares can be used by both players. Square a1 is in the lower left corner from the white player's perspective. This square is black, colors of other squares alternate regularly in vertical as well as in horizontal direction.
Each move means moving one own piece onto a square that is either empty or occupied by an opponent's piece (in this case, the opponent's piece is removed from the board). There is a special move called castling that allows two pieces to be moved in one turn (see below). Pieces are not allowed to pass over occupied squares, except for knights (anytime) and rooks during castling.
Piece types and their moves
Each color has six types of pieces, which differ by their movement options.
Pawn
In the basic setup, pawns are located in the second and seventh row.
This piece can only move forward, i.e., from the basic setup towards the other end of the chessboard. If a pawn moves from the square where it stood at the beginning of the game, it can be moved either one or two squares forward, as the player decides. Such move keeps the pawn in the starting column (e.g., move from b2 to b3, or from b2 to b4). After leaving the starting square, pawns can only move one square forward. These straight-forward moves require that the target square is empty, the same holds for the passed square if the pawn moves by two squares. Additionally to these moves, a pawn can capture an opponent's piece if such piece stands one square diagonally ahead of the pawn (e.g., from b2 to c3, or from b2 to a3).
Capturing en passant This is a special move that is available to pawns that threaten the square that an opponent's pawn passed when moving two squares ahead from its starting position. Such pawn is allowed to capture the opponent's pawn as if it was only moved one square forward. This move must be done in an immediate response to the opponent's move two squares forward.
Knight (N)
In the basic setup, knights are located in columns b and g of rows 1 and 8.
This piece moves one square vertically or horizontally and continues in motion one square diagonally. In the diagonal part of the move, the piece must go away from its previous location, not back towards it. Knight may jump over own and opponent's pieces at the squares it passes. Simply said, the movement has an L-shape.
Bishop (B)
In the basic setup, knights are located in columns c and f of rows 1 and 8.
Bishops move diagonally. They can always move in one direction over any number of unoccupied squares. Bishops that start on white squares move only over white squares throughout the game; black bishops likewise.
Rook (R)
In the basic setup, rooks are located in the corners of the chessboard.
A rook can move over arbitrary number of unoccupied squares horizontally or vertically, i.e., in the row or in the column where it stands.
Queen (Q)
In the basic setup, the queen stands next to the king. "Queen gets her color" rule holds, thus white queen starts on a white square, black queen starts on a black square. This is always the d column.
Queens may move over any number of unoccupied squares in any direction — horizontally, vertically, or diagonally. However, they always have to move straight, the directions cannot be combined in a single move. This means that a queen has the union of movement possibilities of a rook and a bishop.
King (K)
In the basic setup, the white king stands on the square e1 and the black king stands on the square e8.
The king can move in any direction (horizontally, vertically, or diagonally) onto a neighbor square that is not threatened by any piece of the opponent.
Castling is a special move that allows a player to move two pieces in one turn: the king and one rook. Nonetheless, it counts as a move of the king. The king moves from its starting position two squares horizontally towards its own rook which has not been moved yet. Then the rook is moved over the king onto the square that the king jumped over. Castling can be done only if all of these conditions are fulfilled:
- The king and the rook have not been moved yet.
- The field where the king stands before castling, after the castling, and the passed field must not be threatened by any piece of the opponent.
- All fields between the king and the rook must be empty.
Pawn promotion
A pawn that reaches the last row of the opposite side of the board is immediately promoted to a queen, rook, bishop, or knight — as the player chooses.
Check
A king is in check if the square where it stands is threatened by at least one piece of the opponent, i.e., this piece could enter the king's square in the next move. If the king is checked after opponent's move, then it must escape the check in the immediately following move (by moving the king, capturing the checking piece or moving an own piece in the way of the checking piece). Moves that leave own king checked are not legal.
Checkmate
If a player cannot escape the check in the immediately following move then the game ends and the checked player loses. This situation is referred to as checkmate.
End of the game
Victory
Player that checkmates the opponent wins. Also, if a player deems his situation hopeless, they can finish the game by giving up. In that case, the opponent wins without a checkmate.
Draw
The game is drawn if either player is unable to win. Particularly in these situations:
- No pieces on the board, but two kings.
- King with a bishop against a king.
- King with a knight against a king.
- King with a bishop against a king with a bishop, the two bishops being the same color.
- The same position repeated three times.
- Fifty consecutive moves without a capture or pawn advancement.
- A player cannot make any move (no legal moves are available — any move would put own king in check) while his king is not in check. This situation is called a stalemate.