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:
- 16:7b474f873683
- Parent:
- 13:9785f2404045
- Child:
- 18:b391caa5754c
--- a/SnakeFood/SnakeFood.cpp Thu Apr 04 18:50:40 2019 +0000
+++ b/SnakeFood/SnakeFood.cpp Fri Apr 05 05:46:11 2019 +0000
@@ -18,7 +18,6 @@
};
int n = 0;
-int blockgap = 0;
void SnakeFood::init() //Delete Int
{
fooddrop=0;
@@ -98,15 +97,6 @@
if(fooddrop == 2) { //make this a variable multiple of game speed
fooddrop = 0;
}
- if((blockgap==148)||(blockgap==149)||(blockgap==150)||(blockgap==0)||(blockgap==1)||(blockgap==2)||(blockgap==3)||(blockgap==4)||(blockgap==5)||(blockgap==6)||(blockgap==7)||(blockgap==8)||(blockgap==9)||(blockgap==10)||(blockgap==11)||(blockgap==12)||(blockgap==13)) { //change this while changing the block drop gap
- if(_fy <= -2) {
- _fy = -2;
- }
- }
- blockgap++;
- if(blockgap == 150) { //change this while changing the block drop gap
- blockgap = 0;
- }
}