Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Cricket/Cricket.h
- Revision:
- 32:1bc731f03a30
- Parent:
- 31:eefa1d23a843
- Child:
- 33:9d34ef219fff
diff -r eefa1d23a843 -r 1bc731f03a30 Cricket/Cricket.h
--- a/Cricket/Cricket.h Wed May 08 12:13:28 2019 +0000
+++ b/Cricket/Cricket.h Wed May 08 13:15:45 2019 +0000
@@ -9,22 +9,17 @@
#include "UX.h"
/** Ball Class
-@author Shahid Zubin Sajid el17szs
-@brief Controls the bat in the Hero Cricket Game
-@date May 2019
-
+* @author Shahid Zubin Sajid el17szs
+* @brief Controls the bat in the Hero Cricket Game
+* @date May 2019
*/
class Cricket
{
public:
- /**
- @brief Constructor for the Cricket Object
- */
+ /** Constructor */
Cricket();
- /**
- @brief Deconstructor for the Cricket Object
- */
+ /** Deconstructor */
~Cricket();
/**
* @brief Initlialises the Cricket class Object
@@ -164,40 +159,40 @@
int y;
int position;
};
- //Fielder array that stores the no. of fielders and it's characteristics
+ /**Fielder array that stores the no. of fielders and it's characteristics*/
Fielder field[5];
- //integer variable that checks if direction of ball has been set during gameplay
+ /**integer variable that checks if direction of ball has been set during gameplay*/
int direction_set;
Vector2D ball_position;
- //Direction object to store the ball direction
+ /**Direction object to store the ball direction*/
Direction ball_direction;
- /*integer variable which checks if the ball has been bowled
+ /**integer variable which checks if the ball has been bowled
it is used as a flag */
int _check_bowled;
- //Integer variable sued as counter positions initialised in the field
+ /**Integer variable sued as counter positions initialised in the field**/
int _init_field_counter;
- // Integer value used as a counter for the no. of fielders
+ /**Integer value used as a counter for the no. of fielders*/
int _fielders_count;
- //Integer variable used as a flag to indicate start of new round
+ /**Integer variable used as a flag to indicate start of new round*/
int _new_round;
- //Integer array to store no. of fielders during set_field()
+ /**Integer array to store no. of fielders during set_field()*/
int fieldNumbers[10];
- /*Integer variable used as an array index for the position in the outfield where
+ /**Integer variable used as an array index for the position in the outfield where
the ball has been hit*/
int _position_no;
- //Integer variable that stores no. of balls that are to be played during each game
+ /**Integer variable that stores no. of balls that are to be played during each game*/
int _ball_limit;
//Integer variable used as a flag to indicate start of new game
int _new_game;
- //Integer variable used as a flag to indicate that ball has reached destination fielder
+ /**Integer variable used as a flag to indicate that ball has reached destination fielder*/
int _check_update;
- //Integer variable used to check if the ball has been hit
+ /**Integer variable used to check if the ball has been hit*/
int _check_hit;
- //Integer variable used as a flag to indicate that ball has been hit
+ /**Integer variable used as a flag to indicate that ball has been hit*/
int _set_hit;
- //Integer variable used as a flag to indicate that the hit is lofted
+ /**Integer variable used as a flag to indicate that the hit is lofted*/
int _set_loft;
- //Integer variable used to check if the hit is lofted
+ /**Integer variable used to check if the hit is lofted*/
int _loft_check;
};
#endif
\ No newline at end of file