Snake - the game: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
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;
     }
     }
     document.onkeydown = keyDown;
     document.onkeydown = keyDown;

Revision as of 14:02, 8 February 2009