mirror of
https://github.com/tiyn/yeschess.git
synced 2025-04-03 15:37:46 +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:
parent
67a3ab4579
commit
1cc88f6bf9
@ -644,6 +644,7 @@ proc castling(game: var Game, kstart: int, dest_kingside: bool,
|
|||||||
return false
|
return false
|
||||||
game.uncheckedMove(kstart, kdest)
|
game.uncheckedMove(kstart, kdest)
|
||||||
game.uncheckedMove(rstart, rdest)
|
game.uncheckedMove(rstart, rdest)
|
||||||
|
game.toMove = Color(ord(game.toMove)*(-1))
|
||||||
return true
|
return true
|
||||||
return false
|
return false
|
||||||
except IndexDefect, ValueError:
|
except IndexDefect, ValueError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user