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
TanksEngine/TanksEngine.h
- Committer:
- el17mcd
- Date:
- 2019-04-13
- Revision:
- 11:4e2eb64031a0
- Parent:
- 7:a3ccabdebe2e
- Child:
- 12:9e6d5d0a0c82
File content as of revision 11:4e2eb64031a0:
//#ifndef TANKENGINE_H //#define TANKENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Projectile.h" #include "TankL.h" class TanksEngine { public: TanksEngine(); ~TanksEngine(); 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; };