ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Revision:
12:954da4f4e565
Parent:
11:f481ec642cc5
Child:
13:924891519a95
--- a/Cricket/Cricket.h	Mon Apr 22 19:57:01 2019 +0000
+++ b/Cricket/Cricket.h	Tue Apr 23 12:46:34 2019 +0000
@@ -23,12 +23,20 @@
     void draw_field(N5110 &lcd);
     void update_game(int checkHit, Direction dir);
     void play_game(N5110 &lcd,Gamepad &pad);
-    void game(N5110 &lcd,Gamepad &pad);
-    
-    
+    void game(N5110 &lcd,Gamepad &pad);   
+    void set_init_positions(int x,int y, Direction direction,int no);
+    void init_positions();
 private:
     Ball ball;
     Bat bat;
+    
+    struct fielder_positions{
+        Direction dir;
+        int x;
+        int y;
+        int no;
+    };
+    fielder_positions positions[7];
     struct Fielder{
         Direction dir;
         int x;
@@ -38,8 +46,13 @@
     Fielder field[5];
     int direction_set;
     Vector2D ball_position;
+    Direction ball_direction;
+    int check_bowled;
+    int init_field_counter;
+    int fieldersCount;
     int new_round;
     int fieldNumbers[10];
+    int fielder_no;
     int ballHit;
     int d;
     int _size;