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:
- 11:f481ec642cc5
- Parent:
- 10:6c6e09023942
- Child:
- 12:954da4f4e565
--- a/Cricket/Cricket.cpp Mon Apr 22 17:34:11 2019 +0000 +++ b/Cricket/Cricket.cpp Mon Apr 22 19:57:01 2019 +0000 @@ -18,25 +18,27 @@ float f; new_round=0; } -void Cricket::game(N5110 &lcd){ +void Cricket::game(N5110 &lcd,Gamepad &pad){ if (new_round==0){ //ball.reset(); set_field(lcd); - //play_game(lcd); + play_game(lcd,pad); } /* else { - play_game(lcd); + play_game(lcd,pad); } */ } + +void Cricket::play_game(N5110 &lcd,Gamepad &pad){ + int check_hit=bat.get_hitBall(); + int check_bowled=ball.ball_start(); + printf("BOWLED %i ",check_bowled); +} /* -void Cricket::play_game(N5110 &lcd){ - int check_hit=bat.get_hitBall(); - int check_bowled=ball.start(lcd,check_hit,pad.get_direction()); -} void Cricket::update_game(int checkHit, Direction dir){ int check_bowled= if (direction_set!=1){