Threefold repetition not including initial position
rulojuka opened this issue · comments
Alessandro Palmeira commented
Just "moving" this bug: lichess-org/lila#7009 to this repository, in order to submit a Pull Request fixing it.
There is an old broken test that is commented "3fold on initial position - broken"
that seems to be the exact functionality to fix.
It seems that the initial position is never added to the positionHashes
in the History
as this is only added in Move.finalizeAfter
and Drop.finalizeAfter
and is created with the default value of Array.empty
when called via the usual Board.init(variant: Variant)
that is called inside Game.apply(variant: chess.variant.Variant)