Musallam Bseiso / Friendly
Revision:
10:b856d73db923
Parent:
9:3c411d37d390
Child:
11:4c4a0fe18ac2
--- a/Friendly.cpp	Mon May 01 13:01:20 2017 +0000
+++ b/Friendly.cpp	Tue May 02 22:12:52 2017 +0000
@@ -29,8 +29,6 @@
 void Friendly::update(Direction d,float mag)
 {
     _speed = int(mag*4.0f); 
-
-    // eight-directional movement
     if (d == N) {
         _y-=_speed;
     } else if (d == S) {
@@ -52,8 +50,9 @@
         _y+=_speed;
         _x+=_speed;
     }
+}
 
-    // position check so the ship doesn't go out of bounds
+void Friendly::check_pos() {
     if (_y < 1) {
         _y = 1;
     }
@@ -71,6 +70,7 @@
     }
 }
 
+
 Vector2D Friendly::get_pos() {
     Vector2D p = {_x,_y};
     return p;