Add `Threefold Repetition` draw option
ramou opened this issue ยท 0 comments
Detect threefold repetition
. If the board is in this state, give either side the option to declare a draw. Tournament Chessboard and above should support this.
Threefold repetition: The same board position has occurred three times with the same player to move and all pieces having the same rights to move, including the right to castle or capture en passant.
--Rules of Chess
Players lose the option to claim a draw if they don't take it on the turn it arrives, or don't claim it with their move. This implies that if they expect a claim with their move, the board must allow them to indicate a draw claim, which would be automatically validated upon play (they would get their draw). The claim before move should be announced, and failure of the claim should also be announced.
If the same board happens five times, the draw is automatic (maybe make that configurable)