Mochu Yao explorer game

Dependencies:   mbed

Revision:
30:65e639ace415
Parent:
27:354d91d59b6d
Child:
33:ea83f08fa466
diff -r 2d592452e3fb -r 65e639ace415 explorer/explorer.h
--- a/explorer/explorer.h	Tue Apr 28 18:26:20 2020 +0000
+++ b/explorer/explorer.h	Wed Apr 29 03:18:13 2020 +0000
@@ -76,34 +76,86 @@
 
 class Explorer {
  public:
+  // Constructor and destructor.
+  /**
+  * @brief Constructor @details Non user specified.
+  */
  Explorer();
- //Constructor
+  /**
+  * @brief Destructor @details Non user specified.
+  */
  ~Explorer();
- //Destructor
 void init();
+
+  // Mutators.
+  /**
+  * @brief Sets the X coordinate of the Explorer.
+  * @param joy_x @details The horizontal value of the joystick x.
+  * @param speed @details The player's speed to move.
+  * @param Player_direction direction @details The current direction the skater is facing from the enum class
+  */
 void set_x_coordinate(float joy_x, int speed, Player_direction direction);
+  /** 
+  * @brief Sets the Y coordinate of the Explorer.
+  * @param ifjump @details B boolean flag that is true only if the B button is pressed
+  * @param jump_height @details the height when player jumps and which level to stay
+  */
 void set_y_coordinate(bool ifjump, int jump_height);
+  /** 
+  * @brief get y coordinate.
+  * @returns The y coordinate of the explorer
+  */
 int get_y();
- 
+   /** 
+  * @brief get x coordinate.
+  * @returns The x coordinate of the explorer
+  */
 int get_x();
-
+  /** 
+  * @brief get speed.
+  * @returns The moving speed of the explorer
+  */
 int get_speed();
-
+   /** 
+  * @brief get jump height.
+  * @returns the increasing height of the explorer.
+  */
 int get_jump_height();
-
+   /** 
+  * @brief get player's direction.
+  * @returns direction of the player.
+  */
 Player_direction get_direction();
-
+   /** 
+  * @brief get sprite.
+  * @returns four different sprites.
+  */
 Explorer_sprite get_explorer_sprite();
-
+   /** 
+  * @brief get the players form and print on the screen (same as the item file)
+  * @returns the sprite of the explorer
+  */
 int * get_form(Explorer_sprite sprite);
-//this function is used to get the players form and print on the screen (same as the item file)
-
+    /** 
+  * @brief get the fall flag
+  * @param &gamepad @details The gamepad object from Gamepad class.
+  * @param f_flag @details the fall flag.
+  */
 void fall(bool f_flag, Gamepad &gamepad);
-//the fall flag need to add music to hint the player that the game is over
+    /** 
+  * @brief get the reset flag
+  * @param flag @details the reset flag.
+  */
 void reset_flag(bool flag);
-//the reset flag also need to add music to hint the player that the game has been reseted
+/**
+  * @brief Gets the fall flag.
+  * @returns The fall flag of the explorer.
+  */
 bool get_fall_flag();
-
+/**
+  * @brief Gets the reset flag.
+  * @returns The reset flag of the explorer.
+  */
 bool get_reset_flag();
  
  private: