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.h
- 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;