Difference between revisions of "Snake - the game"

From JSXGraph Wiki
Jump to navigationJump to search
(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...)
 
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 14:56, 8 February 2009