ELEC2645 (2018/19) / Mbed 2 deprecated el17lw

Dependencies:   mbed

Revision:
21:20478f086bc2
Parent:
15:876c047a6ec9
Child:
25:aa145767fda5
--- a/Coin/Coin.h	Tue Apr 16 19:19:43 2019 +0000
+++ b/Coin/Coin.h	Sat Apr 20 14:46:50 2019 +0000
@@ -10,21 +10,55 @@
 
 class Coin {
  public:
+  // Constructor and Destructor.
+  /**
+  * @brief Constructor @details Non user specified.
+  */
   Coin();
+  /**
+  * @brief Destructor @details Non user specified.
+  */
   ~Coin();
   
+  // Mutators.
+  /** 
+  * @breif Initialises Coin object. 
+  */
   void init();
+  /**
+  * @breif Sets the Coin coordinates.
+  * @param rand_x @details a random number that determines the x coordinate
+  * @param rand_y @details a random number that determines if the Coin is generated on the upper or lower platforms
+  */
+  void set_coin(int rand_x, int rand_y);
+  
+  // Accessors.
+  /**
+  * @breif Gets the Coin sprite.
+  * @returns The Coin sprite (an integer array)
+  */
+  int * get_coin_sprite();
+  /**
+  * @breif Gets the x coordinate.
+  * @returns The x coordinate of the Coin
+  */ 
+  int get_coin_x();
+  /**
+  * @breif Gets the y coordinate.
+  * @returns The y coordinate of the Coin
+  */
+  int get_coin_y(); 
+  
+  // Member Methods.
+  /**
+  * @breif Generates the coin. @details Selects the coin sprite
+  */
   void generate_coin();
-  void update_coin(int rand_x, int rand_y);
-  int * get_coin_sprite();
-  int get_coin_x();
-  int get_coin_y(); 
     
  private:
   int _x;
   int _y;
   int _coin_counter;
   bool _rotate_coin;
-  
 };
-#endif
\ No newline at end of file
+#endif