Difference between revisions of "Snake - the game"

From JSXGraph Wiki
Jump to navigationJump to search
Line 47: Line 47:
 
         else if (code==39) { snake.dir = [1,0]; }
 
         else if (code==39) { snake.dir = [1,0]; }
 
         else if (code==40) { snake.dir = [0,-1]; }
 
         else if (code==40) { snake.dir = [0,-1]; }
         return true;
+
         return false;
 
     }
 
     }
 
     document.onkeydown = keyDown;
 
     document.onkeydown = keyDown;

Revision as of 15:02, 8 February 2009