Snake - the game: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) 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 | return false; | ||
} | } | ||
document.onkeydown = keyDown; | document.onkeydown = keyDown; |
Revision as of 14:02, 8 February 2009