ELEC2645 (2016/17) / Mbed 2 deprecated Bomb_WeixiTao_el16wt

Dependencies:   mbed

Revision:
0:1465fd20e75b
Child:
1:83459533ff72
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hole.cpp	Wed Apr 26 16:38:33 2017 +0000
@@ -0,0 +1,35 @@
+#include "Treasure.h"
+#include "N5110.h"
+#include "hole.h"
+extern N5110 lcd;
+
+void hole::hole_place()
+{
+
+    //top left
+    holeX = rand()%27+5;
+    holeY = rand()%14+5;
+
+    // top right
+    holeX1 = rand()%27+47;
+    holeY1 = rand()%14+5;
+    
+    // button left
+    holeX2 = rand()%27+5;
+    holeY2 = rand()%14+29;
+    
+    //button right
+    holeX3 = rand()%27+47;
+    holeY3 = rand()%14+29;        
+}
+
+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);
+
+
+}
\ No newline at end of file