function buttonAnimation(boxClass) {
  if (gameInProgress === true) {
    userInput.push(boxClass);
    $('.' + boxClass).addClass('button-press');
    makeSound(boxClass);
    setTimeout(function() {
      $('.' + boxClass).removeClass('button-press');
    }, 500);
  }
}
// Button animation for user input w/ sound
Button animation for user input w/ sound
Button animation for user input w / sound
function buttonAnimation(boxClass) {
  if (gameInProgress === true) {
    userInput.push(boxClass);
    $('.' + boxClass).addClass('button-press');
    makeSound(boxClass);
    setTimeout(function() {
      $('.' + boxClass).removeClass('button-press');
    }, 500);
  }
}
function buttonAnimation ( boxClass ) { if ( gameInProgress === true ) { userInput . push ( boxClass ) ; $ ( '.' + boxClass ) . addClass ( 'button-press' ) ; makeSound ( boxClass ) ; setTimeout ( function ( ) { $ ( '.' + boxClass ) . removeClass ( 'button-press' ) ; } , 500 ) ; } }
Button animation for user input w/ sound
Button animation for user input w / sound