zhangxinyu01text

Dependencies:   mbed

Revision:
23:b9b98e400e8b
Parent:
21:a5292aacb38f
Child:
24:8b1494a6bdbe
--- a/cxkEngine/cxkEngine.cpp	Mon May 06 09:14:15 2019 +0000
+++ b/cxkEngine/cxkEngine.cpp	Mon May 06 09:22:20 2019 +0000
@@ -125,12 +125,7 @@
     Vector2D cxkp_pos = _cxkp.get_pos();
 
     // see if ball has hit the CXK 
-    if ((ball_pos.y - cxkp_pos.y >= -5) && 
-        (ball_pos.y - cxkp_pos.y <= 5) &&
-        (ball_pos.x - cxkp_pos.x >= -5) && 
-        (ball_pos.x - cxkp_pos.x <=  5)
-         ) //right
-     {
+    
         // if it has, change the position and reflect x,y  velocity
         ball_pos.x= ball_pos.x + 3;
         ball_pos.y = ball_pos.y + 1;