James Heavey / Mbed 2 deprecated EL17JH

Dependencies:   mbed

Revision:
129:b47c28c7eaaf
Parent:
91:c01a736fb0d9
Child:
130:46f3fac2bdf9
--- a/Brick/Brick.h	Wed May 08 21:32:23 2019 +0000
+++ b/Brick/Brick.h	Wed May 08 23:09:59 2019 +0000
@@ -8,7 +8,7 @@
 #define BRICK_WIDTH 12
 #define BRICK_HEIGHT 4
 
-/* Ball Class
+/** Brick Class
 @author James Heavey, University of Leeds
 @brief Controls the bricks in the Breakout game
 @date May 2019
@@ -18,15 +18,48 @@
 {
 public:
 
+    /** Constructor declaration */
     Brick();
+    
+    /** Destructor declaration */
     ~Brick();
+    
+    /** Initialise Brick attributes
+    * @param x @details initialises x coordinate
+    * @param y @details initialises y coordinate
+    * @param lives @details initialises the number of lives
+    */
     void init(int x,int y, int lives);
+    
+    /** Draws the Brick on the LCD, at current coordinates with a fill that is dependant on _lives
+    * @param &lcd @details a N5110 pointer
+    */
     void draw(N5110 &lcd);
+    
+    /** Sets the Brick's x coordinate
+    * @param x @details set the member variable _x to the new local x
+    */
+    void set_posx(int x);
+    
+    /** Resets the lives after victory
+    * @param inc @details additional lives added on t o the _base_lives (additional lives come from _multiplier)
+    */
+    void reset_lives(int inc);
+    
+    /** Decrements the member variable _lives
+    * @return returns a bool; true if brick is destroyed, false if not
+    */
     bool hit();
+    
+    /** Retrieves the Brick's x coordinate
+    * @returns integer _x coordinate
+    */
     int get_x();
+    
+    /** Retrieves the Brick's y coordinate
+    * @returns integer _y coordinate
+    */
     int get_y();
-    void set_posx(int x);
-    void reset_lives(int inc);
 
 private: