Przeglądaj źródła

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

tarfeef101 6 lat temu
rodzic
commit
8fcf1230e7
2 zmienionych plików z 2 dodań i 2 usunięć
  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 **
         /*