diff options
-rw-r--r-- | draughts/app.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/draughts/app.js b/draughts/app.js index b5a9fa5..5a4bab7 100644 --- a/draughts/app.js +++ b/draughts/app.js @@ -80,7 +80,9 @@ wss.on("connection", ws => { } }, ws) game.move(msg.body) - game.nextTurn() + + if (!game.nextTurn()) + env.removeGame(game) break } }) |