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.
Dependencies: mbed
Diff: Floors/Floors.cpp
- Revision:
- 26:d16a5b1e0ace
- Parent:
- 24:67dc71a8f009
- Child:
- 29:15e9640646b7
diff -r f122e1862cd1 -r d16a5b1e0ace Floors/Floors.cpp
--- a/Floors/Floors.cpp Wed May 08 15:07:04 2019 +0000
+++ b/Floors/Floors.cpp Wed May 08 17:24:35 2019 +0000
@@ -25,12 +25,12 @@
// when they leave the screen they will re-appear in random x-coordinate so that 10 floors are always on screen
//rectangle (1-82 & 9 - 48 )
if (_position.y > 45 ){
- _position.y = 9;
- _position.x = 1 + (rand()% 70);
- place = rand()% 8;
- if (place == 2){ // 1/8 chance of placing an enemy
- _eny.init(_position.x, _position.y);
- }
+ _position.y = 9;
+ _position.x = 1 + (rand()% 70);
+ place = rand()% 8;
+ if (place == 2){ // 1/8 chance of placing an enemy
+ _eny.init(_position.x, _position.y);
+ }
}
if (doodler_pos_y < 25){ // shift floors once doodler reaches over halfway the screen
_position.y += 1;