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:
- 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;
}