Chess.jl
Chess.jl copied to clipboard
Add draw by repetition support
The player to move may claim a draw if the same position occurs three times, or will occur after an intended move, in any order, with the same player to move.
Two positions are considered same or equal, if all occupied squares and kind of pieces (not necessarily the same piece) they occupy are the same, the castling rights for both sides did not change, and no en passant capture was possible during the first occurrence, even if obviously not played.
https://chessprogramming.wikispaces.com/Repetitions