Browse Source

food now lies in line with the snake, but randomness doesn't quite seem random...

tarfeef101 6 years ago
parent
commit
8fcf1230e7
2 changed files with 2 additions and 2 deletions
  1. BIN
      assignments/a1/snake
  2. 2 2
      assignments/a1/snake.cc

BIN
assignments/a1/snake


+ 2 - 2
assignments/a1/snake.cc

@@ -86,8 +86,8 @@ class Fruit : public Displayable
 
     void newspot()
     {
-      x = (rand() % 800);
-      y = (rand() % 600);
+      x = (rand() % 32) * 25;
+      y = (rand() % 24) * 25;
     }
         // ** ADD YOUR LOGIC **
         /*