Threefold repetition draw now checks that the current state is repetition not that any past state was.
Fixed a bug that allowed pieces to make illegal moves in the case where an opponent's piece was on the path.
Fixed bugs in valuing positions.