From 622a695a40373dd9c2c4422bbbbaadab8c6779d3 Mon Sep 17 00:00:00 2001 From: Mizanali Panjwani Date: Fri, 26 Feb 2021 19:27:51 +0530 Subject: [PATCH] Bug fix --- client/src/components/Game.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/src/components/Game.js b/client/src/components/Game.js index 406db10..f6dbe0c 100644 --- a/client/src/components/Game.js +++ b/client/src/components/Game.js @@ -403,7 +403,7 @@ const Game = (props) => { updatedPlayer1Deck.push(drawCard1) updatedPlayer1Deck.push(drawCard2) - playSkipCardSound() + !isSoundMuted && playSkipCardSound() //send new state to server socket.emit('updateGameState', { gameOver: checkGameOver(player1Deck), @@ -416,7 +416,7 @@ const Game = (props) => { }) } else { - playSkipCardSound() + !isSoundMuted && playSkipCardSound() //send new state to server socket.emit('updateGameState', { gameOver: checkGameOver(player1Deck), @@ -447,7 +447,7 @@ const Game = (props) => { updatedPlayer2Deck.push(drawCard1) updatedPlayer2Deck.push(drawCard2) - playSkipCardSound() + !isSoundMuted && playSkipCardSound() //send new state to server socket.emit('updateGameState', { gameOver: checkGameOver(player2Deck), @@ -460,7 +460,7 @@ const Game = (props) => { }) } else { - playSkipCardSound() + !isSoundMuted && playSkipCardSound() //send new state to server socket.emit('updateGameState', { gameOver: checkGameOver(player2Deck), @@ -496,7 +496,7 @@ const Game = (props) => { updatedPlayer1Deck.push(drawCard1) updatedPlayer1Deck.push(drawCard2) - playSkipCardSound() + !isSoundMuted && playSkipCardSound() //send new state to server socket.emit('updateGameState', { gameOver: checkGameOver(player1Deck), @@ -509,7 +509,7 @@ const Game = (props) => { }) } else { - playSkipCardSound() + !isSoundMuted && playSkipCardSound() //send new state to server socket.emit('updateGameState', { gameOver: checkGameOver(player1Deck), @@ -540,7 +540,7 @@ const Game = (props) => { updatedPlayer2Deck.push(drawCard1) updatedPlayer2Deck.push(drawCard2) - playSkipCardSound() + !isSoundMuted && playSkipCardSound() //send new state to server socket.emit('updateGameState', { gameOver: checkGameOver(player2Deck), @@ -553,7 +553,7 @@ const Game = (props) => { }) } else { - playSkipCardSound() + !isSoundMuted && playSkipCardSound() //send new state to server socket.emit('updateGameState', { gameOver: checkGameOver(player2Deck),