Workshop › Chess › Step 48 of 48
Your game, your rules. Real chess has one more way to draw: if fifty moves by each side (100 moves in total) pass without any capture or pawn move, the game is a draw. Add it.
halfmoves: the number of moves since the last capture or pawn move (0 after reset()).play: a move that captures or moves a pawn sets it to 0; any other move adds 1.halfmoves reaches 100 and the game is not already over, state becomes 'draw', the top says
Draw by the fifty-move rule. Click to play again, and a click starts a new game.Skills: Game states