The aim is not to capture the opponent's king but to checkmate it: the king is attacked, and no move can get it out. This page follows a game from the setup and the six pieces, through answering check, the three special moves, and the ways a game is drawn. Read it through and you can play a full game.

Set up the board
The board has eight files and eight ranks, for a total of sixty-four squares. On each back rank, place the rooks, knights, and bishops from the outside inward, with the queen and king in the center; the eight pawns occupy the rank in front. The rank nearest White is rank 1, and the files run from a to h from White's left. Coordinates describe moves precisely: e2-e4 means the white pawn advances from e2 to e4.
Light square on the right
Orient the board before placing the pieces. The bottom-right square from either player's viewpoint should be light.
Queen on the matching color
The white queen starts on the light square d1 and the black queen on the dark square d8; the kings begin on e1 and e8.
White moves first
The players alternate moving one piece at a time, and a turn may not be passed. After each move, play passes to the other side.
Piece movement
A piece cannot move onto a square occupied by a friendly piece. Except for knights, pieces cannot pass through anything in their path. To capture, a piece moves onto an opponent's occupied square, and the opposing piece is removed from the board.
King
Moves one square in any direction and captures the same way. A king may not move onto an attacked square, so the two kings cannot occupy adjacent squares.
Queen
Moves any number of squares along a rank, file, or diagonal, combining the rook's and bishop's movement. It cannot jump over another piece.
Rook
Moves any number of squares along a rank or file, never diagonally or through another piece. During castling, the rook moves in the same turn as the king.
Bishop
Moves any number of squares diagonally without jumping. Each bishop remains on squares of the same color throughout the game.
Knight
Moves in an L: two squares one way and one square to the side. It is the only piece that jumps, so pieces along the route do not block it.
Pawn
Moves straight forward but captures one square diagonally forward. On its first move it may advance two squares if both are clear; a pawn can never move backward.

Responding to check
A king is in check when an opposing piece attacks its square. The side to move must answer at once, and there are three ways to do it:
- Move the king: move to an adjacent square the opponent does not attack.
- Capture the attacker: the king's square must be safe after the capture.
- Block the line: this works only against a sliding check from a rook, bishop, or queen. A knight check cannot be blocked.
If two pieces give check at once, capturing or blocking answers only one of them, so the only reply is to move the king. When none of the three replies works, it is checkmate and the attacker wins. The king is never taken; the game ends the moment checkmate is reached.
Special moves
Castling
The king moves two squares toward the rook, and the rook moves to the square the king crossed. Neither piece may have moved before, and the squares between them must be empty. The king may not castle out of, through, or into check.
En passant
When an opposing pawn advances two squares from its starting square and lands beside your pawn on the same rank, your pawn may capture it en passant by moving to the square it crossed. The capture is legal only on the immediately following move.
Pawn promotion
A pawn that reaches the far rank must promote at once to a queen, rook, bishop, or knight. It cannot stay a pawn or become a king. Promotion ignores how many of that piece are already on the board, so two queens are allowed. This board always promotes to a queen, which is also the strongest choice in nearly every position.

Checkmate or stalemate?
When the player to move has no legal move, whether the king is in check determines the result. If it is, the position is checkmate and the player loses; if not, the position is stalemate and the game is drawn.
A game can also be drawn in four other ways: neither side has enough material to force checkmate; fifty moves pass with no capture and no pawn move; the same position appears for the third time; or both players agree. In a formal game the fifty-move rule and threefold repetition have to be claimed. This board declares the draw itself for stalemate, insufficient material, and a completed fifty moves. In an online game you can also offer a draw.
Check legality first
Before you move, check whether your own king is in check, whether the move would leave it open to attack, and whether the destination and the path are legal. Compare which move is better only after those three checks. This board accepts only legal moves: if a move breaks the rules, the piece stays put, which is a useful way to learn them.
Practice against AITwo players on one deviceCreate an online room
Questions
Can a king capture a protected piece?
Yes, but only if no opposing piece attacks the king on its new square after the capture. If the piece is protected and the king would still be attacked after taking it, the move is illegal.
Can you castle while in check?
No. You may not castle while the king is in check, through an attacked square, or into check.
Must a pawn move two squares on its first move?
No. A pawn on its starting square may advance one or two squares if the path is clear. After leaving that square, it normally advances only one square at a time.
What is the difference between stalemate and checkmate?
In both cases the player to move has no legal move. If the king is in check, it is checkmate and that player loses; if the king is not in check, it is stalemate and the game is drawn.
What is double check, and how do you answer it?
Double check means two pieces attack the king at once. It usually comes from a discovered check: one piece steps aside and a rook, bishop, or queen behind it gives check as well. Capturing one attacker or blocking one line still leaves the other check, so the only reply is to move the king. If the king has nowhere safe, it is checkmate.
Can a pawn promote to a rook, bishop, or knight?
Yes. A pawn may become a queen, rook, bishop, or knight. A queen is the strongest piece, and that is the usual choice. In a few positions a queen would stalemate the opponent, or a knight would give check at once, so another piece is better. This board currently always promotes to a queen.
How does threefold repetition work?
A draw may be claimed when the same position appears for the third time. The repeats do not have to come one after another. The same position means every piece stands on the same square, the same side is to move, and the rights to castle and to capture en passant match as well.