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:
- 17:cb39d9fa08dc
- Parent:
- 16:a2c945279b79
- Child:
- 21:44e87d88afe2
--- a/TanksEngine/TanksEngine.h Wed Apr 24 13:44:12 2019 +0000 +++ b/TanksEngine/TanksEngine.h Sat Apr 27 17:43:46 2019 +0000 @@ -15,52 +15,52 @@ public: - TanksEngine(); - ~TanksEngine(); + TanksEngine(); + ~TanksEngine(); - void initgame(Menus &menus); - void game_loop(Graphics &graphics, N5110 &lcd, Gamepad &pad, Menus &menus, Scores &scores); + void initgame(Menus &menus); + void game_loop(Graphics &graphics, N5110 &lcd, Gamepad &pad, + Menus &menus, Scores &scores); private: // Game Flow - void _left_tank_turn(Graphics &graphics, Gamepad &pad); - void _right_tank_turn(Graphics &graphics, Gamepad &pad); - void _projectile_phase(N5110 &lcd, Gamepad &pad); - void _change_turn(); - void _end(Graphics &graphics, N5110 &lcd, Gamepad &pad, Scores &scores); + void _left_tank_turn(Graphics &graphics, Gamepad &pad); + void _right_tank_turn(Graphics &graphics, Gamepad &pad); + void _projectile_phase(N5110 &lcd, Gamepad &pad); + void _change_turn(); + void _end(Graphics &graphics, N5110 &lcd, Gamepad &pad, Scores &scores); // Game Mechanics - void _tank_shoots(int x, int y, int turn, Gamepad &pad); - void _object_hit(int x, int y, N5110 &lcd, Gamepad &pad); - bool _collision_pl(Tank _tankl, Projectile _proj); - bool _collision_pr(Tank _tankr, Projectile _proj); - bool _collision_pm(int x, int y, N5110 &lcd, Projectile _proj); + void _tank_shoots(int x, int y, int turn, Gamepad &pad); + void _object_hit(int x, int y, N5110 &lcd, Gamepad &pad); + bool _collision_pl(Tank _tankl, Projectile _proj); + bool _collision_pr(Tank _tankr, Projectile _proj); + bool _collision_pm(int x, int y, N5110 &lcd, Projectile _proj); // Game Inputs - void _read_input(Gamepad &pad); - void _decrement_cooldowns(); + void _read_input(Gamepad &pad); + void _decrement_cooldowns(); // Game Outputs - void _draw(Graphics graphics, N5110 &lcd); - void _sounds(int n, Gamepad &pad); + void _draw(Graphics graphics, N5110 &lcd); + void _sounds(int n, Gamepad &pad); - Tank _tankl; - Tank _tankr; + Tank _tankl; + Tank _tankr; - Projectile _proj; + Projectile _proj; - int _initial_health; - int _cooldown_l; - int _cooldown_r; - int _move; - int _turn; - int _turn_counter; - bool _fire; - bool _mute; - float _angle; - float _mag; - float _vel; - float _grav; - float _wind; - + int _initial_health; + int _cooldown_l; + int _cooldown_r; + int _move; + int _turn; + int _turn_counter; + bool _fire; + bool _mute; + float _angle; + float _mag; + float _vel; + float _grav; + float _wind; }; #endif // TANKSENGINE_H \ No newline at end of file