var scoreboard = new Scoreboard(); scoreboard.countdown(60); scoreboard.score(); scoreboard.help( 'Arrow Keys to Move. ' + 'Watch for the shaking tree.' + 'Run into the odd tree before time runs out!' ); var game_over = false; scoreboard.onTimeExpired(function() { scoreboard.message("Game Over!"); game_over = true; });