Laws of Chess - The completion of the game
The game is drawn upon agreement between the two players during the game. This immediately ends the game. A player wishing to offer a draw shall do so after having made a move on the chessboard. No conditions can be attached to the offer. The offer cannot be withdrawn and remains valid until the opponent accepts it, rejects it with the intention of moving or capturing it.
The game may be drawn if any identical position is about to appear or has appeared on the chessboard at least three times.
Positions as are considered the same, if the same player has the move, pieces of the same kind and colour occupy the same squares, and the possible moves of all the pieces of both players are the same.
Positions are not the same if a pawn that could have been captured en passant can no longer be captured or if the right to castle has been changed temporarily or permanently.
b) the last
50 consecutive moves have been made by each player without the movement
of any pawn and without the capture of any piece.
The game is won by the player whose opponent declares he resigns. This immediately ends the game.