game bugfix: game isnt stopped after stalemate

master
TiynGER 4 years ago
parent 8e918aebb7
commit 7caa4db120

@ -6,7 +6,7 @@ import ./chess
proc runGame(): void = proc runGame(): void =
var game = initGame() var game = initGame()
game.echoBoard(game.toMove) 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 "Make a move"
echo game.toMove echo game.toMove
var move = readLine(stdin) var move = readLine(stdin)

Loading…
Cancel
Save