ELEC2645 (2018/19) / Mbed 2 deprecated EL17MCD

Dependencies:   mbed

Revision:
15:fa5282fcd134
Parent:
13:feadff02d3f7
Child:
16:a2c945279b79
--- a/Tank/Tank.cpp	Wed Apr 17 17:24:02 2019 +0000
+++ b/Tank/Tank.cpp	Fri Apr 19 15:58:51 2019 +0000
@@ -7,14 +7,14 @@
 
 Tank::Tank()
 {
-    
+    _speed = 1;
 }
 
 Tank::~Tank()
 {
 
 }
-
+// Accessors
 int Tank::get_position_x()
 {
     return _position_x;
@@ -34,7 +34,7 @@
 {
     return _health;
 }
-
+// Mutators
 void Tank::set_position(int x, int y)
 {
     _position_x = x;
@@ -56,12 +56,7 @@
 {
     _speed = s;
 }
-
-void Tank::set_angle(float angle)
-{
-    _angle = angle;
-}
-
+// Movement
 void Tank::_limit_movement()
 {
     if (_position_x == _left_lim - 1) {
@@ -85,12 +80,10 @@
     }
     _limit_movement(); 
 }
-
+// Other Methods
 void Tank::lose_health()
 {
     _health--;
-/*    if (_health <= 0) right player wins
-{} */
 }
 
 void Tank::generate_hitbox()