Mochu Yao explorer game

Dependencies:   mbed

Revision:
28:4a1260ad0346
Parent:
26:4d193529b447
Child:
31:8e92b65e0779
--- a/item/item.h	Tue Apr 28 17:58:00 2020 +0000
+++ b/item/item.h	Tue Apr 28 18:21:22 2020 +0000
@@ -4,21 +4,17 @@
 #include "mbed.h"
 
 /** item Class
-* @1 generate an item in random position after one disappear
-* @2 build the item's structer
-* @3 build a barrier to increase difficulty
 * @date April 13th 2020
 * @author Yaomochu
 
-
 @code
 
 #include "mbed.h"
 #include "N5110.h"
 #include "Gamepad.h"
 #include "item.h"
-#include <cstdlib> //the standard library by which we need the rand() and srand() function
-#include <ctime> //in order to generate random number we need <ctime>
+#include <cstdlib> 
+#include <ctime> 
 
 N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
 Gamepad gamepad;
@@ -54,24 +50,47 @@
   }
 }
 
-* @ endcode
+@endcode
 */
 
 class item
 {
 public:
     // Constructor and Destructor.
-    item();
-    ~item();
-
-    // Initialises object.*/
-    void init();
-    //Sets the item coordinates.
-    //rand_x = a random number that determines the x coordinate
-    //rand_y = a random number that determines if the item's generated level
+    /**
+  * @brief Constructor @details Non user specified.
+  */
+  item();
+   /**
+  * @brief Destructor @details Non user specified.
+  */
+  ~item();
+  // Mutators.
+  /** 
+  * @breif Initialises item object. 
+  */
+  void init();
+  /**
+  * @breif Sets the item coordinates.
+  * @param rand_x = a random number that determines the x coordinate.
+  * @param rand_y = a random number that determines if the item's generated level.
+  */
     void set_item(int random_x, int random_y);
-    int *get_item_form();//
+  // Accessors.
+  /**
+  * @breif get the item form.
+  * @return and draw the item form.
+  */
+    int *get_item_form();
+  /**
+  * @breif Gets the x coordinate.
+  * @returns The x coordinate of the item.
+  */
     int get_item_x();
+  /**
+  * @breif Gets the y coordinate.
+  * @returns The y coordinate of the item.
+  */  
     int get_item_y();