ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Revision:
20:9d21599fe350
Parent:
18:a260ce8db9e7
Child:
23:a16c97a59a41
Child:
26:6427f09cf8d3
--- a/Ball/Ball.cpp	Sat Apr 27 18:16:59 2019 +0000
+++ b/Ball/Ball.cpp	Tue Apr 30 10:27:23 2019 +0000
@@ -83,7 +83,7 @@
 
 int Ball::update_ball(int expected_x,int expected_y){
     if (_y!=expected_y){
-     if (_y>expected_y){
+     if (_y>=expected_y){
          _y--;
      }
      else{
@@ -91,9 +91,8 @@
      }
     }
     if (_x!=expected_x){
-     if (_x>expected_x){
+     if (_x>expected_x)
          _x--;
-     }
      else{
          _x++;
     }