ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18lg

Dependencies:   mbed

Revision:
8:59b01b57f0da
Parent:
5:e0f08e8022de
Child:
9:f3259d652208
--- a/Body/Body.cpp	Sun May 31 14:12:45 2020 +0000
+++ b/Body/Body.cpp	Sun May 31 16:06:31 2020 +0000
@@ -29,4 +29,12 @@
 for (int k = 0; k < _nbody; k++){                            //Snake tail
             lcd.drawRect(bodyx[k], bodyy[k], 2, 2, FILL_BLACK); 
         }      
-        }
\ No newline at end of file
+        }
+        
+        Vector2D Body::get_pos() {
+            
+            for (int j = 0; j < _nbody; j++) {
+    Vector2D b = {bodyx[j], bodyy[j]};
+    return b;    
+}
+}
\ No newline at end of file