ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Revision:
26:6427f09cf8d3
Parent:
24:23fd6b451db7
Child:
28:d0b0a64a832d
--- a/Cricket/Cricket.h	Wed May 01 09:08:03 2019 +0000
+++ b/Cricket/Cricket.h	Wed May 01 11:56:36 2019 +0000
@@ -9,9 +9,9 @@
 #include "UX.h"
 
 /** Ball Class
-@author Dr Craig A. Evans, University of Leeds
-@brief Controls the ball in the Pong game 
-@date Febraury 2017
+@author Shahid Zubin Sajid
+@brief Controls the ball in the Cricket team 
+@date May 2019
 */ 
 class Cricket
 {
@@ -21,9 +21,13 @@
     ~Cricket();
     void init();
     void draw(N5110 &lcd);
+    
+    //Setters
     void set_field(N5110 &lcd);
     void set_init_positions(int x,int y, Direction direction,int no);
     void set_ball_direction(Direction dir);
+    
+    //
     void draw_field(N5110 &lcd);
     void update_game(int checkHit,int loft_check, Direction dir,Gamepad &pad,N5110 &lcd);
     void play_game(N5110 &lcd,Gamepad &pad);
@@ -60,27 +64,23 @@
         int position;
     };
     Fielder field[5];
-    int direction_set;
-    Vector2D ball_position;
-    Direction ball_direction;
-    int check_bowled;
-    int init_field_counter;
-    int outfield_fielder;
-    int fieldersCount;
-    int new_round;
-    int fieldNumbers[10];
+
+    Direction _ball_direction;
+    int _check_bowled;
+    int _init_field_counter;
+    int _fielders_count;
+    int _new_round;
+    int field_numbers[10];
     int _position_no;
     int ballHit;
-    int check_hit;
-      int _ball_limit;
-      int new_game;
-    int check_update;
-    int set_hit;
-    int set_loft;
-    int loft_check;
-    int d;
-    int _size;
-    int _x;
-    int _y;
+    int _ball_limit;
+    int _new_game;
+    int _check_update;
+    int _check_hit;
+    int _set_hit;
+    int _set_loft;
+    int _direction_set;
+    int _loft_check;
+    //int d;
 };
 #endif
\ No newline at end of file