diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-08-23 18:43:47 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-08-23 18:43:47 +0530 |
commit | 6036a220e251a9963e62508ae7dfeb68b2f289a2 (patch) | |
tree | b531a5b0e9459e9aade3a55c35f32f0c6902f0a4 /src/components/MultiplayerGrid.js | |
parent | cf81a281889a7f498632b6545acb3ee310f4a4e3 (diff) |
changed draw message and now the winner doesn't get extra turn
Diffstat (limited to 'src/components/MultiplayerGrid.js')
-rw-r--r-- | src/components/MultiplayerGrid.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/components/MultiplayerGrid.js b/src/components/MultiplayerGrid.js index d7eae36..7cd3835 100644 --- a/src/components/MultiplayerGrid.js +++ b/src/components/MultiplayerGrid.js @@ -75,16 +75,13 @@ const MultiplayerGrid = (props) => { const endGame = (data) => { setMessage( - `${data.winner === "Data" ? "" : "WINNER: "}${data.winner}` + `${data.winner === "Draw" ? "" : "WINNER: "}${data.winner}` ); setShowMessage(true); props.setScoreX(data.scoreX); props.setScoreO(data.scoreO); - // socket.emit messes everything up - // and this does the job very well setBoard([2,2,2,2,2,2,2,2,2]); - props.setTurn(data.winner === "Draw" ? turn : (data.winner === "X" ? 1 : 0)); } useEffect(() => { |