ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_ll17lrc_v2

Dependencies:   mbed

Revision:
13:fd290d2fd917
Parent:
8:10eb578dd754
--- a/Ball/Ball.h	Tue May 26 18:16:31 2020 +0000
+++ b/Ball/Ball.h	Tue May 26 22:41:23 2020 +0000
@@ -6,28 +6,57 @@
 #include "Gamepad.h"
 
 /** Ball Class
-@author Dr Craig A. Evans, University of Leeds
-@brief Controls the ball in the Pong game 
-@date Febraury 2017
+@author Lewis Cheadle
+@brief Controls the ball in the Impossible game 
+@date May 2020
 */ 
 class Ball
 {
 
 public:
+
+    /** Constructor */
     Ball();
+    
+    /** Destructor */
     ~Ball();
+    
+    /** Initialises the ball
+         * @param x initial X position of ball
+         * @param y initial Y position of ball
+         */
     void init(int x,int y);
+    
+    /** Draws the ball
+         * @param lcd N5110 object
+         */
     void draw(N5110 &lcd);
+    
+    /** Updates position of the ball
+         * @param d Direction of the joystick
+         * @param pad object
+         */
     void update(Direction d,Gamepad &pad);
+    
+    /** Resets ball position of level is complete
+         */
     void level_finish();
+    
+    /** Returns ball X co-ordinate
+         */
     int get_ball_x_pos();
+    
+    /** Returns ball Y co-ordinate
+         */
     int get_ball_y_pos();
-    /// accessors and mutators
     
 private:
 
+    /* sprite to store ball drawing */
     int ball;
+    /* Stores ball X co-ordinate */
     int ball_x_pos;
+    /* Stores ball Y co-ordinate */
     int ball_y_pos;
 
 };