ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19zf

Dependencies:   mbed

Revision:
8:8287d2ef965d
Parent:
4:b12a49f0b730
--- a/People/People.cpp	Wed Apr 29 05:10:57 2020 +0000
+++ b/People/People.cpp	Wed Apr 29 15:20:34 2020 +0000
@@ -1,6 +1,6 @@
 #include "People.h"
 #define INIT_x 40
-#define INIT_y 20
+#define INIT_y 43
 
 
 const int people_sprite[4][4] = {
@@ -92,9 +92,9 @@
         if(0.5f < _mag < 0.75f) {   _x -= 3;    _y += 3;} else 
                                 {   _x -= 4;    _y += 4;}}
     //without going off screen
-    if (_x < 0) { _x = 0;} else
-    if (_x > 80) { _x = 80;} else
-    if (_y < 0) {_y = 0;} else
-    if (_y > 44) {_y = 44;} 
+    if (_x < 1) { _x = 1;} else
+    if (_x > 79) { _x = 79;} else
+    if (_y < 1) {_y = 1;} else
+    if (_y > 43) {_y = 43;} 
 }
     
\ No newline at end of file