function handleUpdate(board, pieceParam) {
    funcSetBoard(board)
    funcSetTurn(pieceParam)
    if (handleWin(board)) {
      var winner = piece === 'O' ? players[0] : players[1]
      socket.emit('win', winner)
    } else if (handleOver(board)) {
      socket.emit('over')
    } else {
      funcSetMessage()
    }
  }
//Setting the states each move when the game haven't ended (no wins or draw)

Setting the states each move when the game haven't ended (no wins or draw)
Setting the states each move when the game haven ' t ended ( no wins or draw )
function handleUpdate(board, pieceParam) {
    funcSetBoard(board)
    funcSetTurn(pieceParam)
    if (handleWin(board)) {
      var winner = piece === 'O' ? players[0] : players[1]
      socket.emit('win', winner)
    } else if (handleOver(board)) {
      socket.emit('over')
    } else {
      funcSetMessage()
    }
  }
function handleUpdate ( board , pieceParam ) { funcSetBoard ( board ) funcSetTurn ( pieceParam ) if ( handleWin ( board ) ) { var winner = piece === 'O' ? players [ 0 ] : players [ 1 ] socket . emit ( 'win' , winner ) } else if ( handleOver ( board ) ) { socket . emit ( 'over' ) } else { funcSetMessage ( ) } }
Setting the states each move when the game haven't ended (no wins or draw)
Setting the states each move when the game haven ' t ended ( no wins or draw )