ELEC2645 (2016/17) / Mbed 2 deprecated Bomb_WeixiTao_el16wt

Dependencies:   mbed

Revision:
1:83459533ff72
Parent:
0:1465fd20e75b
Child:
2:23b20cbd3330
diff -r 1465fd20e75b -r 83459533ff72 hole.cpp
--- a/hole.cpp	Wed Apr 26 16:38:33 2017 +0000
+++ b/hole.cpp	Mon May 01 15:20:26 2017 +0000
@@ -26,10 +26,31 @@
 void hole::hole_show()
 {
         
-    lcd.drawCircle(holeX,holeY,5,FILL_BLACK);
-    lcd.drawCircle(holeX1,holeY1,5,FILL_BLACK);
-    lcd.drawCircle(holeX2,holeY2,5,FILL_BLACK);
-    lcd.drawCircle(holeX3,holeY3,5,FILL_BLACK);
+    lcd.drawCircle(holeX,holeY,3,FILL_BLACK);
+//    lcd.drawCircle(holeX1,holeY1,3,FILL_BLACK);
+//    lcd.drawCircle(holeX2,holeY2,3,FILL_BLACK);
+//    lcd.drawCircle(holeX3,holeY3,3,FILL_BLACK);
+
+
+}
 
 
-}
\ No newline at end of file
+bool hole::test(int _x, int _y)
+{
+    
+    int x = _x;
+    int y = _y;
+    
+    bool check = false;
+    
+    if(x+41-3 <=holeX && holeX <=41+x+1+3 && y+24-3 <=holeY && y+24+6 >=holeY)
+    {
+        printf("Check");
+        check = true;
+    }
+    
+    return check;
+}
+    
+
+    
\ No newline at end of file