score


    
    function updateScore(){
      currentScore += 5;
      score.innerHTML = 'Score: ' + currentScore;
    }
    
    function difficulty(){
      //as the game progresses, increase magnitude of the vertical speed
      if(currentScore % 1000 == 0){
        if(dy > 0)
          dy += 1;
        else
          dy -= 1;
      }
    }
    
    function gameOver(){
      //end the game by clearing the timer, modifying the score label
      clearTimeout(timer);
      score.innerHTML += "  Game Over";
      score.style.backgroundColor = 'rgb(128,0,0)';
    }
  </script>