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: Level/Level.h
- Revision:
- 13:32d580b3935c
- Parent:
- 12:5549a299d41e
diff -r 5549a299d41e -r 32d580b3935c Level/Level.h
--- a/Level/Level.h Mon May 06 14:52:05 2019 +0000
+++ b/Level/Level.h Mon May 06 15:07:28 2019 +0000
@@ -13,11 +13,12 @@
* @brief Struct for storing the current location/state of any moving blocks
*/
struct MovingBlock {
- int index;
- int distance;
+ int index; /**< index of the block that moves in the block array.*/
+ int distance; /**< Distance the block moves*/
- int initial_pos;
- bool extending;
+ int initial_pos; /**< Inital x coord of the block*/
+ bool extending; /**< True if the block is currently in its extending phase
+ false if retracting.*/
};
@@ -47,7 +48,7 @@
int number_of_moving_blocks);
void update_moving_blocks();
void render(N5110 &lcd);
- void declare_moving_block(int index,bool extending,int distance);
+
Block * get_blocks();
int get_number_of_blocks();
Vector2D get_goal();
@@ -55,6 +56,8 @@
private:
+ void declare_moving_block(int index,bool extending,int distance);
+
Block _blocks [20] ;
int _number_of_blocks;
int _number_of_moving_blocks;