(function (window, document, drawModule, undefined) {

var btn = document.getElementById('btn');
btn.addEventListener("click", function(){ 
	drawModule.init();
	score = 0;
	displayScore(score);
});

	document.onkeydown = function(event) {

        keyCode = window.event.keyCode; 
        keyCode = event.keyCode;

        switch(keyCode) {
	
	// Space to start
	case 32:
	drawModule.init();
	score = 0;
	displayScore(score);
	break;
        
	// WASD keys
	case 65: 
          if (direction != 'right') {
            direction = 'left';
          }
          console.log('left'); 
          break;

        case 68:
          if (direction != 'left') {
          direction = 'right';
          console.log('right');
          }
          break;

        case 87:
          if (direction != 'down') {
          direction = 'up';
          console.log('up');
          }
          break;

        case 83:
          if (direction != 'up') {
          direction = 'down';
          console.log('down');
          }
          break;
	// arrow keys
        case 37: 
          if (direction != 'right') {
            direction = 'left';
          }
          console.log('left'); 
          break;

        case 39:
          if (direction != 'left') {
          direction = 'right';
          console.log('right');
          }
          break;

        case 38:
          if (direction != 'down') {
          direction = 'up';
          console.log('up');
          }
          break;

        case 40:
          if (direction != 'up') {
          direction = 'down';
          console.log('down');
          }
          break;
          }
      }


})(window, document, drawModule);

@@ -167,34 +167,70 @@
  = 0;%0A%09d
-isplayScore(score)
+ocument.getElementById(%22score%22).innerHTML = %22Score: 0%22
 ;%0A%7D);%0A%0A%09
@@ -439,26 +439,62 @@
 ;%0A%09d
-isplayScore(score)
+ocument.getElementById(%22score%22).innerHTML = %22Score: 0%22
 ;%0A%09b

Update app.js