Snake - the game: Difference between revisions

From JSXGraph Wiki
(New page: <html> <link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> <script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jqu...)
 
No edit summary
Line 16: Line 16:
         hitSelf: function(x,y) {
         hitSelf: function(x,y) {
             for (var i=0;i<this.size-1;i++) {
             for (var i=0;i<this.size-1;i++) {
                 if (x==this.points[0][i] && y==this.points[1][i]) {
                 if (x==this.points[0][i]) if (y==this.points[1][i]) {
                     return true;
                     return true;
                 }
                 }

Revision as of 13:56, 8 February 2009