ELEC2645 (2018/19) / Mbed 2 deprecated fy14lkaa

Dependencies:   mbed

Revision:
130:4ce67451d0c1
Parent:
111:e9a048d06690
Child:
131:2084e4a8338f
--- a/Spaceship/Spaceship.cpp	Mon May 06 00:16:25 2019 +0000
+++ b/Spaceship/Spaceship.cpp	Mon May 06 13:47:06 2019 +0000
@@ -29,19 +29,22 @@
 {
     _speed_spaceship = int(mag*10.0f);
  
-        if(d==N)
-        //pong.update(pad);
-        //render();
+        if(d==N){
+   //  printf("North\n");
             _y_spaceship-=2;
+            }
         else
-        if(d==S)
+        if(d==S){
             _y_spaceship+=2;
+            }
         
-        if(_y_spaceship>=30)
+        if(_y_spaceship>=30){
             _y_spaceship=30;
+            }
         else
-        if(_y_spaceship<=0)
+        if(_y_spaceship<=0){
             _y_spaceship=0;
+            }
     
 }