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: TanksEngine/TanksEngine.h
- Revision:
- 11:4e2eb64031a0
- Parent:
- 7:a3ccabdebe2e
- Child:
- 12:9e6d5d0a0c82
--- a/TanksEngine/TanksEngine.h Fri Apr 12 12:01:47 2019 +0000 +++ b/TanksEngine/TanksEngine.h Sat Apr 13 16:31:43 2019 +0000 @@ -10,10 +10,34 @@ class TanksEngine { public: + + TanksEngine(); + ~TanksEngine(); - bool collision_pl(TankL tl_obj, Projectile proj_obj); + void initgame(); + void left_tank_turn(Gamepad &pad, N5110 &lcd); + void projectile_phase(N5110 &lcd); + void right_tank_turn(Gamepad &pad, N5110 &lcd); + int get_turn(); private: + + void _read_input(Gamepad &pad); + void _left_tank_shoots(); + bool _collision_pl(TankL _tankl, Projectile _proj); + void _change_turn(); + int _turn; + int _turn_timer; + int _turn_alternater; + int _move; + bool _fire; + float _power; + float _angle; + float _mag; + + TankL _tankl; + + Projectile _proj; };