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.cpp
- 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; }