api for dealing with game logic for snake
Revision 1:fae551b1bd58, committed 2012-10-11
- 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 |
diff -r 3668e8f103be -r fae551b1bd58 game.cpp --- 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;