From 6036a220e251a9963e62508ae7dfeb68b2f289a2 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Mon, 23 Aug 2021 18:43:47 +0530 Subject: changed draw message and now the winner doesn't get extra turn --- src/server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/index.js') diff --git a/src/server/index.js b/src/server/index.js index a5aa97f..004c989 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -89,7 +89,7 @@ io.on('connection', (socket) => { const score = getScore(winner, data.scoreX, data.scoreO, data.board) io.to(room).emit('update-client-data', { board: data.board, - turn: score.winner ? data.turn : (data.turn === 0 ? 1 : 0), + turn: (data.turn === 0 ? 1 : 0), score: score }); -- cgit v1.2.3