Josh Davy / Mbed OS Flip_OS_5

Dependencies:   el17jd

Revision:
13:32d580b3935c
Parent:
11:db27d3838514
Child:
14:1e6f74233e8e
diff -r 5549a299d41e -r 32d580b3935c LevelDefinitions/LevelDefinitions.h
--- a/LevelDefinitions/LevelDefinitions.h	Mon May 06 14:52:05 2019 +0000
+++ b/LevelDefinitions/LevelDefinitions.h	Mon May 06 15:07:28 2019 +0000
@@ -1,51 +1,63 @@
-
-
+/**
+* @brief Struct for storing a blocks location
+*/
 struct Block {
-    Vector2D first; 
-    Vector2D second;
+    Vector2D first; /**< Coord of the top left of the block. */
+    Vector2D second; /**<Coord of the bottom right of the block */
+};
+
+/**
+* @brief Struct for defining moving blocks
+*/
+struct MovingBlockDefinition {
+    int index;  /**< Index of the moving block*/
+    bool extending;/**< True if to start in the extending phase. False if not.*/
+    int distance; /** Distance to extend*/
 };
 
-// Struct for defining moving blocks
-struct MovingBlockDefinition {
-    int index;
-    bool extending;
-    int distance;
-};
-// Struct for defining levels.
+/**
+* @brief Struct for defining levels.
+*/
 struct LevelDefinition {
-    Block blocks [20];
-    int number_of_blocks;
-    MovingBlockDefinition moving_blocks [10];
-    int number_of_moving_blocks ;
-    Vector2D initial_pos;
-    Vector2D goal;
+    Block blocks [20]; /**< Array of blocks*/
+    int number_of_blocks; /**< Number of blocks */
+    MovingBlockDefinition moving_blocks [10]; /** Array of moving block
+                                                  definitions*/
+    int number_of_moving_blocks ; /**< Number of moving blocks*/
+    Vector2D initial_pos; /**< Initial Positon*/
+    Vector2D goal; /**< Goal location*/
 };
-///////////////// EXAMPLE DEFINITION /////////////////////////
-// const LevelDefinition level_1 = {
-//    // Define Blocks         // Array of blocks
-//    {                        // Blocks are defined by their top left followed
-//        { {5,30},{80,40} },  // by there bottom right coord. MUST be in that 
-//        { {5,5}, {80,10} },  // order.
-//        { {10,24},{20,34} },
-//        { {40,24},{44,26} }
-//    },
-//    // Number Of Blocks
-//    4,
-//    // Moving Blocks          // Movingblocks are defined as:
-//    {                         // {index,extending,distance}
-//        {3,true,25},          // index is the index in the block array 
-//    },                        // of the block which you want to move
-//    // Number Of Moving blocks   extending is a bool if the block starts in
-//    1,                        // its extending/retracting phase
-//    // Initial Position       // distance is the horizontal distance the block
-//    {32,10},                  // moves.
-//    // Goal
-//    {70,19}
-//};
-//
-//      NOTE: MAX no. of blocks is 20 MAX no. of moving blocks is 10
-//
+/**
+@code
+/////////////// EXAMPLE DEFINITION /////////////////////////
+ const LevelDefinition level_1 = {
+    // Define Blocks         // Array of blocks
+    {                        // Blocks are defined by their top left followed
+        { {5,30},{80,40} },  // by there bottom right coord. MUST be in that 
+        { {5,5}, {80,10} },  // order.
+        { {10,24},{20,34} },
+        { {40,24},{44,26} }
+    },
+    // Number Of Blocks
+    4,
+    // Moving Blocks          // Movingblocks are defined as:
+    {                         // {index,extending,distance}
+        {3,true,25},          // index is the index in the block array 
+    },                        // of the block which you want to move
+    // Number Of Moving blocks   extending is a bool if the block starts in
+    1,                        // its extending/retracting phase
+    // Initial Position       // distance is the horizontal distance the block
+    {32,10},                  // moves.
+    // Goal
+    {70,19}
+};
+
+      NOTE: MAX no. of blocks is 20 MAX no. of moving blocks is 10
+
 //////////////////////////////////////////////////////////////
+@endcode
+*/
+
  const LevelDefinition level_1 = {
     // Define Blocks
     {