Yufan Zhong / Mbed 2 deprecated GOLD_MINER

Dependencies:   mbed

Revision:
16:e3ecfcd2a389
Parent:
8:c5969685cf02
Child:
17:3ba4ec25c4c5
diff -r c90c1c35ae5c -r e3ecfcd2a389 Claw/Claw.h
--- a/Claw/Claw.h	Mon May 11 13:23:33 2020 +0000
+++ b/Claw/Claw.h	Tue May 12 09:13:04 2020 +0000
@@ -8,25 +8,71 @@
 #include "Monster.h"
 
 /** Claw Class
-@author Dr Craig A. Evans, University of Leeds
-@brief Controls the claw in the Pong game 
-@date Febraury 2017
+@author Yufan Zhong, University of Leeds and SWJTU
+@brief Controls the claw in the gold miner game 
+@date May 2020
 */ 
+
+
 class Claw
 {
 
 public:
+    /** Constructor */
     Claw();
+    /** Destructor */
     ~Claw();
+    /** Initialise the claw
+    *
+    *   This function initialises the components of claw.
+    *   @param  winch_width - The width of the winch
+    */
     void init(int winch_width);
+    /** Draw the claw
+    *
+    *   This function draws the claw.
+    *   @param  lcd - N5110 library
+    */
     void draw(N5110 &lcd);
+    /** Update the data
+    *
+    *   This function gets the new position of the claw.
+    *   @param  d - the direction of the joystick
+    *   @param  mag - the magnitude of the joystick
+    *   @param  winch_pos - the position of the winch
+    */
     void update(Direction d,float mag,Vector2D winch_pos);
-    /// accessors and mutators
+    /** Add the current score
+    *
+    *   This function adds the current score.
+    */
     void add_now_score();
+    /** Get the current score
+    *
+    *   This function gets the current score.
+    */
     int get_now_score();
+    /** Set the velocity of claw
+    *
+    *   This function set the velocity of the claw.
+    *   @param  v - the velocity of the claw
+    */
     void set_velocity(float v);
+    /** Get the velocity
+    *
+    *   This function gets the velocity of the claw.
+    */
     float get_velocity();
+    /** Get the position of the claw
+    *
+    *   This function gets the position of the claw.
+    */
     Vector2D get_pos();
+    /** Set position of the claw
+    *
+    *   This function set the position of the claw.
+    *   @param  p - position of the claw
+    */
     void set_pos(Vector2D p);