1
0
mirror of https://github.com/tiyn/yeschess.git synced 2025-04-01 14:47:44 +02:00

game bugfix: after castling toMove wasnt changed

If you castle correctly the toMove attribute of the game object wasnt changed.
This is now fixed.
This commit is contained in:
TiynGER 2020-12-14 22:50:28 +01:00
parent 67a3ab4579
commit 1cc88f6bf9

View File

@ -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: