function countdown() {
    if (!runningGame) {
      runningGame = true;
      setTimeout(() => {
        countdownInput.value = 3;
        countDownAudio.play();
      }, 1000);
      setTimeout(() => (countdownInput.value = 2), 2000);
      setTimeout(() => (countdownInput.value = 1), 3000);
      setTimeout(() => {
        countdownInput.value = "Fight!";
        startGame();
      }, 4000);
    }
  }
//runningGame prevents you from starting multiple times

runningGame prevents you from starting multiple times
runningGame prevents you from starting multiple times
function countdown() {
    if (!runningGame) {
      runningGame = true;
      setTimeout(() => {
        countdownInput.value = 3;
        countDownAudio.play();
      }, 1000);
      setTimeout(() => (countdownInput.value = 2), 2000);
      setTimeout(() => (countdownInput.value = 1), 3000);
      setTimeout(() => {
        countdownInput.value = "Fight!";
        startGame();
      }, 4000);
    }
  }
function countdown ( ) { if ( ! runningGame ) { runningGame = true ; setTimeout ( ( ) => { countdownInput . value = 3 ; countDownAudio . play ( ) ; } , 1000 ) ; setTimeout ( ( ) => ( countdownInput . value = 2 ) , 2000 ) ; setTimeout ( ( ) => ( countdownInput . value = 1 ) , 3000 ) ; setTimeout ( ( ) => { countdownInput . value = "Fight!" ; startGame ( ) ; } , 4000 ) ; } }
runningGame prevents you from starting multiple times
runningGame prevents you from starting multiple times