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:
parent
8e918aebb7
commit
7caa4db120
2
game.nim
2
game.nim
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user