Movement

Each chess piece has its own style of moving. Moves are made to vacant squares except when capturing an opponent's piece.

With the exception of the knight, pieces cannot jump over each other. When a piece is captured (or taken), the attacking piece replaces the enemy piece on its square (en passant being the only exception). The captured piece is thus removed from the game and may not be returned to play for the remainder of the game.The king cannot be captured, only put in check.

The king can move exactly one square horizontally, vertically, or diagonally. At most once in every game, each king is allowed to make a special move, known as castling. Castling consists of moving the king two squares towards a rook, then placing the rook on the other side of the king, adjacent to it. Castling is only permissible if all of the following conditions hold:

1. The player must never have moved either the king or the rook involved in castling;

2. There must be no pieces between the king and the rook;

3. The king may not currently be in check, nor may the king pass through or end up in a square that is under attack by one or more enemy pieces (though the rook is permitted to be under attack);

4. The king and the rook must be on the same rank (to exclude castling with a rook from a promoted pawn).

In serious play, the king must be touched and moved first when castling; its move of more than one square makes clear that castling is intended.

The rook moves any number of vacant squares vertically or horizontally. It also is moved while castling.

The bishop moves any number of vacant squares in any diagonal direction.

The queen can move any number of vacant squares diagonally, horizontally, or vertically.

The knight moves to the nearest square not on the same rank, file, or diagonal. Equivalently, the knight moves two squares like the rook and then one square perpendicular to that.

Pawns have the most complex rules of movement:

A pawn can move forward one square, if that square is unoccupied. If it has not yet moved, the pawn has the option of moving two squares forward provided both squares in front of the pawn are unoccupied. A pawn cannot move backward.

When such an initial two square advance is made that puts that pawn horizontally adjacent to an opponent's pawn, the opponent's pawn can capture that pawn en passant as if it moved forward only one square rather than two, but only on the immediately subsequent move.

Pawns are the only pieces that capture differently from how they move. They can capture an enemy piece on either of the two spaces adjacent to the space in front of them (i.e., the two squares diagonally in front of them), but cannot move to these spaces if they are vacant.

If a pawn advances all the way to its eighth rank, it is then promoted (converted) to a queen, rook, bishop, or knight of the same color, the choice being at the discretion of its player. In practice, the pawn is almost always promoted to a queen. If it converted to another piece, this is called "underpromotion".


Check and checkmate :

When a player makes a move that threatens the opposing king with capture (not necessarily by the piece that was moved), the king is said to be in check. If a player's king is in check then the player must make a move that eliminates the threat of capture; a player may never leave his king in check at the end of his move. The possible ways to remove the threat of capture are:

Move the king to a square where it is not threatened.

Capture the threatening piece (possibly with the king, if doing so does not put the king in check).

Place a piece between the king and the opponent's threatening piece (not possible if the threatening piece is a knight).

In informal games, it is customary to announce check when making a move that puts the opponent's king in check. However, in formal competitions check is rarely announced.

A player may not make any move which places or leaves his king in check. (This also entails that a player cannot place his king on any square adjacent to the enemy king, because doing so would leave his king able to be taken by the enemy king and therefore in check.)

If a player's king is placed in check and there is no legal move that player can make to escape check, then the king is said to be checkmated, the game ends, and that player loses (unlike other pieces, the king is never actually captured or removed from the board). The diagram to the right shows a typical checkmate position.

The white king is threatened by the black queen; every square to which the king could move is also threatened; and he cannot capture the queen, because he would then be threatened by the rook.

Wikipedia