game bugfix: after castling toMove wasnt changed

If you castle correctly the toMove attribute of the game object wasnt changed.
This is now fixed.
master
TiynGER 4 years ago
parent 67a3ab4579
commit 1cc88f6bf9

@ -644,6 +644,7 @@ proc castling(game: var Game, kstart: int, dest_kingside: bool,
return false
game.uncheckedMove(kstart, kdest)
game.uncheckedMove(rstart, rdest)
game.toMove = Color(ord(game.toMove)*(-1))
return true
return false
except IndexDefect, ValueError:

Loading…
Cancel
Save