function keyPress(e) {
  if (e.key === 'Enter' || e.key === ' ') {
    if (document.getElementById('start').style.display !== 'none') {
      startGame();
      e.preventDefault();
    }
  }
}
// Human pressed space or enter to start game.
Human pressed space or enter to start game.
Human pressed space or enter to start game .
function keyPress(e) {
  if (e.key === 'Enter' || e.key === ' ') {
    if (document.getElementById('start').style.display !== 'none') {
      startGame();
      e.preventDefault();
    }
  }
}
function keyPress ( e ) { if ( e . key === 'Enter' || e . key === ' ' ) { if ( document . getElementById ( 'start' ) . style . display !== 'none' ) { startGame ( ) ; e . preventDefault ( ) ; } } }
Human pressed space or enter to start game.
Human pressed space or enter to start game .