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: Tank/Tank.h
- Revision:
- 17:cb39d9fa08dc
- Parent:
- 16:a2c945279b79
- Child:
- 21:44e87d88afe2
--- a/Tank/Tank.h Wed Apr 24 13:44:12 2019 +0000 +++ b/Tank/Tank.h Sat Apr 27 17:43:46 2019 +0000 @@ -5,41 +5,39 @@ #include "N5110.h" #include "Gamepad.h" - class Tank { public: - Tank(); - ~Tank(); + Tank(); + ~Tank(); + + //Accessors + int get_position_x(); + int get_position_y(); + int get_hitbox(int i); + int get_health(); + //Mutators + void set_position(int x, int y); + void set_movement_limits(int left, int right); + void set_health(int h); + void set_speed(int s); + //Other Methods + void move_position(int d); + void lose_health(); + void generate_hitbox(); + +private: - //Accessors - int get_position_x(); - int get_position_y(); - int get_hitbox(int i); - int get_health(); - //Mutators - void set_position(int x, int y); - void set_movement_limits(int left, int right); - void set_health(int h); - void set_speed(int s); - //Other Methods - void move_position(int d); - void lose_health(); - void generate_hitbox(); - -private: - - int _position_x; - int _position_y; - int _left_lim; - int _right_lim; - int _move_counter; - int _speed; - int _health; - int _hitbox[40]; - + int _position_x; + int _position_y; + int _left_lim; + int _right_lim; + int _move_counter; + int _speed; + int _health; + int _hitbox[40]; }; #endif // TANK_H \ No newline at end of file