ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Revision:
32:1bc731f03a30
Parent:
31:eefa1d23a843
Child:
33:9d34ef219fff
diff -r eefa1d23a843 -r 1bc731f03a30 Ball/Ball.h
--- a/Ball/Ball.h	Wed May 08 12:13:28 2019 +0000
+++ b/Ball/Ball.h	Wed May 08 13:15:45 2019 +0000
@@ -6,21 +6,17 @@
 #include "Gamepad.h"
 #include "Bat.h"
 /** Ball Class
-@author Shahid Zubin Sajid
-@brief Controls the ball in the Hero Cricket Game
-@date May 2019
+* @author Shahid Zubin Sajid
+* @brief Controls the ball in the Hero Cricket Game
+* @date May 2019
 */
 class Ball
 {
 
 public:
-    /**
-    * @brief Constructor for the Ball Class
-    */
+   /** Constructor */
     Ball();
-     /**
-    * @brief Deconstructor for the Ball Class
-    */
+    /** Deconstructor */
     ~Ball();
      /**
     * @brief Initlialises the Bat class
@@ -36,7 +32,7 @@
     * @brief Resets all the variable counters for the ball
     */
     void reset();
-     /**
+    /**
     * @brief Resets the ball count for starting each game
     */
     void reset_ball_count();
@@ -48,7 +44,6 @@
     */
     int ball_start(Gamepad &pad);
 
-    //GETTER METHODS
     void get_direction(Gamepad &pad);
     /**
     * @brief Returns the no. of balls played at the point in the game
@@ -72,40 +67,30 @@
     * @returns an integer value that returns 1 if target co-ordinate is reached and 0 if it hasn't
     */
     int bowler_start(Gamepad &pad);
-     /**
+    /**
     * @brief Increments the _ball_count variable during each call
     */
     void increment_ball_count();
 
 private:
-    struct Fielder{
-        Direction dir;
-        int x;
-        int y;
-        int position;
-    };
-    int fieldNumbers[10];
-    Bat bat;
-
-    //Integer variable that stores the no. of balls played during the game
+    /*Integer variable that stores the no. of balls played during the game*/
     int _ball_count;
-    /*Integer value that dictates if the bowler has bowled the ball
+    /**Integer value that dictates if the bowler has bowled the ball
     the value is set to 1 if the bowler_start returns 1
     */
     int _bowled;
-    //flag used to check if tone has to be played during each round
+    /**flag used to check if tone has to be played during each round*/
     int _set_tone;
     int d;
-    // Integer variable to store the size of the ball
+    /** Integer variable to store the size of the ball*/
     int _size;
-    //Integer variable to store the x co-rdinate of the ball
+    /**Integer variable to store the x co-rdinate of the ball*/
     int _ball_x;
-    //Integer variable to store the y co-ordinate of the ball
+    /**Integer variable to store the y co-ordinate of the ball*/
     int _ball_y;
-
-    // integer variable to store t the x cordinate of the bowler
+    /**Integer variable to store t the x cordinate of the bowler*/
     int _bowler_x;
-    // integer variable to store t the y cordinate of the bowler
+    /**Integer variable to store t the y cordinate of the bowler*/
     int _bowler_y;
 };
 #endif
\ No newline at end of file