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
Fork of el17zl by
Diff: PushingEngine/PushingEngine.h
- Revision:
- 8:83891ea9a5d9
- Parent:
- 7:6f8aeadc4370
- Child:
- 9:1fa7f087051e
--- a/PushingEngine/PushingEngine.h Thu Apr 11 14:14:28 2019 +0000 +++ b/PushingEngine/PushingEngine.h Mon Apr 15 06:55:01 2019 +0000 @@ -6,6 +6,8 @@ #include "Gamepad.h" #include "Ppl.h" #include "Box.h" +#include "Cross.h" + @@ -16,7 +18,8 @@ PushingEngine(); ~PushingEngine(); - void init(int box1_x,int box1_y,int box2_x,int box2_y,int ppl_x,int ppl_y); + void init(int box1_x,int box1_y,int box2_x,int box2_y,int ppl_x,int ppl_y, + int cross1_x,int cross1_y,int cross2_x,int cross2_y); void read_input(Gamepad &pad); void update(Gamepad &pad,int barrier_x,int barrier_y); void draw(N5110 &lcd,int barrier_x,int barrier_y); @@ -29,6 +32,9 @@ void hold_ppl_box1_wall(Gamepad &pad); void hold_ppl_box2_wall(Gamepad &pad); bool ppl_cover_box(Gamepad &pad); + void box_cover_cross1_score(Gamepad &pad); + void box_cover_cross2_score(Gamepad &pad); + int set_score(); Box _b1; @@ -46,6 +52,15 @@ int _pplx; int _pply; + Cross _c1; + Cross _c2; + + // position of the crosses + int _c1x; + int _c2x; + int _c1y; + int _c2y; + //reading of bottom int _bb; int _bx; @@ -57,6 +72,7 @@ int _s; //ppl with b1 int _r; //ppl with b2 int _temp; + int _score; };