Ahmed Adamjee / Mbed 2 deprecated SnakeVSBlock

Dependencies:   mbed

Revision:
32:3a3bdeffdf62
Parent:
30:461231877c89
Child:
33:249cf423fb18
--- a/SnakeFood/SnakeFood.cpp	Mon Apr 15 06:27:23 2019 +0000
+++ b/SnakeFood/SnakeFood.cpp	Mon Apr 15 13:58:09 2019 +0000
@@ -47,8 +47,8 @@
      if(n == 0){
         _fx = (rand() % 82);  //change the number here so that there is always an unsurity(a little) if the food will come or not(change the limits for this)
         _fy = -2;
-        if((blockbuff>=11)&&(blockbuff<=blockgap-11))  { //this makes sure that the snake food appears seperated from the block
-            _fy = -2;
+        if(blockbuff==0)  { //this makes sure that the snake food appears seperated from the block
+            _fy = -24;
         }
         n = n+1;  
         }