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

game bugfix: game isnt stopped after stalemate

This commit is contained in:
TiynGER 2020-12-15 18:09:27 +01:00
parent 8e918aebb7
commit 7caa4db120

View File

@ -6,7 +6,7 @@ import ./chess
proc runGame(): void =
var game = initGame()
game.echoBoard(game.toMove)
while not game.isCheckmate(game.toMove):
while not game.isCheckmate(game.toMove) and not game.isStalemate(game.toMove):
echo "Make a move"
echo game.toMove
var move = readLine(stdin)