function removeCounterFromPlayer(playerTaken) {
  if (playerTaken == "X") {
    countersX--;
  } else {
    countersY--;
  }

  //Update server
  fetch('/numberCounters', {
      method: 'POST',
      headers: new Headers({
        'Content-Type': 'application/json'
      }),
      body: JSON.stringify({
        countersX,
        countersY
      })
    })

    .catch(err => console.log(err));

}
/**
 * @function removeCounterFromPlayer - If a player is overtaken remove the piece from thier count and update the server
 */
@function removeCounterFromPlayer - If a player is overtaken remove the piece from thier count and update the server
@function removeCounterFromPlayer - If a player is overtaken remove the piece from thier count and update the server
function removeCounterFromPlayer(playerTaken) {
  if (playerTaken == "X") {
    countersX--;
  } else {
    countersY--;
  }
  fetch('/numberCounters', {
      method: 'POST',
      headers: new Headers({
        'Content-Type': 'application/json'
      }),
      body: JSON.stringify({
        countersX,
        countersY
      })
    })
    .catch(err => console.log(err));
}
function removeCounterFromPlayer ( playerTaken ) { if ( playerTaken == "X" ) { countersX -- ; } else { countersY -- ; } fetch ( '/numberCounters' , { method : 'POST' , headers : new Headers ( { 'Content-Type' : 'application/json' } ) , body : JSON . stringify ( { countersX , countersY } ) } ) . catch ( err => console . log ( err ) ) ; }
@function removeCounterFromPlayer - If a player is overtaken remove the piece from thier count and update the server
@function removeCounterFromPlayer - If a player is overtaken remove the piece from thier count and update the server
//Update server