api for dealing with game logic for snake

Dependents:   snake

Files at this revision

API Documentation at this revision

Comitter:
lucoby
Date:
Thu Oct 11 20:23:38 2012 +0000
Parent:
0:3668e8f103be
Commit message:
fixed wall bug

Changed in this revision

game.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/game.cpp	Thu Oct 11 18:54:54 2012 +0000
+++ b/game.cpp	Thu Oct 11 20:23:38 2012 +0000
@@ -16,7 +16,7 @@
         }
         phere = phere->next;
     }
-    if(head->row < 0 || head->row > ROW-1 || head-> col < 0 || head->col > COL-1){
+    if(head->row < 0 || head->row > ROW || head-> col < 0 || head->col > COL){
         return 0;
     }
     return 1;