aboutsummaryrefslogtreecommitdiff
path: root/src/server/index.js
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-08-23 18:43:47 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-08-23 18:43:47 +0530
commit6036a220e251a9963e62508ae7dfeb68b2f289a2 (patch)
treeb531a5b0e9459e9aade3a55c35f32f0c6902f0a4 /src/server/index.js
parentcf81a281889a7f498632b6545acb3ee310f4a4e3 (diff)
changed draw message and now the winner doesn't get extra turn
Diffstat (limited to 'src/server/index.js')
-rw-r--r--src/server/index.js2
1 files changed, 1 insertions, 1 deletions
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
});