ELEC2645 (2017/18) / Mbed 2 deprecated el15ww

Dependencies:   mbed

Revision:
18:e58a1f8e72ad
Parent:
15:47ea86f1ed70
Child:
19:dfa241957855
--- a/Fruit/Fruit.cpp	Tue May 08 11:38:55 2018 +0000
+++ b/Fruit/Fruit.cpp	Tue May 08 12:38:36 2018 +0000
@@ -15,8 +15,8 @@
 
 void Fruit::reborn(){//randomise the location of the fruit after it is ate by the sanke
     srand(time(NULL));
-    _posx = rand() % (WIDTH-5)+10;
-    _posy = rand() % (HEIGHT-10)+5;
+    _posx = rand() % (WIDTH-5)+1;
+    _posy = rand() % (HEIGHT-10)+1;
     
 }