Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: SnakeFood/SnakeFood.cpp
- Revision:
- 10:751bd953fa27
- Parent:
- 9:d1d79d4ee673
- Child:
- 11:d6ceff1ff6d7
diff -r d1d79d4ee673 -r 751bd953fa27 SnakeFood/SnakeFood.cpp
--- a/SnakeFood/SnakeFood.cpp	Wed Mar 27 18:20:36 2019 +0000
+++ b/SnakeFood/SnakeFood.cpp	Sat Mar 30 17:09:18 2019 +0000
@@ -66,7 +66,7 @@
         }
     
      if(n == 0){
-        _fx = rand() % 82;
+        _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 = 0;
         n = n+1;  
         }