ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Revision:
29:f7a2d2a755ec
Parent:
28:d0b0a64a832d
Child:
30:43aace0fdbdf
--- a/Cricket/Cricket.cpp	Tue May 07 17:50:58 2019 +0000
+++ b/Cricket/Cricket.cpp	Tue May 07 18:38:54 2019 +0000
@@ -41,7 +41,6 @@
    _loft_check=0;
    _check_hit=0;
    _set_hit=0;
-   ballHit=0;
    _set_loft=0;
    _init_field_counter=0;
    init_positions();
@@ -69,7 +68,6 @@
      if (_new_round==1){  
         if (game_status(lcd)==false){
             game_reset();
-            ux.second_menu(lcd);
         }
         else{
           check_ball_count(lcd);
@@ -153,11 +151,11 @@
         _check_bowled=ball.ball_start(pad);
     }
     else{
+        set_ball_direction(dir);
         update_game(_set_hit, _set_loft, dir,pad,lcd);
     }
 }
 void Cricket::update_game(int checkHit,int loft_check, Direction dir,Gamepad &pad,N5110 &lcd){
-  set_ball_direction(dir);
   int fielder_check=check_fielder(_ball_direction); 
   if (checkHit!=1)
       batsman_out(2,pad,lcd);
@@ -236,7 +234,6 @@
     }
 }
 int Cricket::check_fielder(Direction dir){
-    Vector2D p;
     if (dir==N){
         return -1;
     }