ajax333221 / isepic-chess

♞ JavaScript chess utility library.
MIT License
16 stars 3 forks source link

Threefold repetition not detected in Mock-moves #22

Closed ajax333221 closed 3 years ago

ajax333221 commented 3 years ago

The move.canDraw in the returned object from board.playMove(... , {isMockMove : true}) and Ic.fenApply(... , "playMove" , ...) fails to take Threefold repetition into account for mocked moves.

This happens because the position is passed into a new temporal board with the current fen and the move list is lost in the process.

This bug also affects board.getDrawMoves() and pretty much leaves that method unusable for now.