mirror of
https://github.com/tiyn/yeschess.git
synced 2025-04-02 23:17:47 +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 =
|
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…
x
Reference in New Issue
Block a user