Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: hole.cpp
- Revision:
- 3:dd4678a85a1a
- Parent:
- 2:23b20cbd3330
- Child:
- 4:402c27b212c1
--- a/hole.cpp Mon May 01 16:37:53 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-#include "Treasure.h"
-#include "N5110.h"
-#include "hole.h"
-extern N5110 lcd;
-
-void hole::hole_place()
-{
- int four = ((rand())%4)+1;
- switch(four){
- case 1:
- //top left
- holeX = rand()%27+5;
- holeY = rand()%14+5;
- break;
-
- case 2:
- // top right
- holeX = rand()%27+47;
- holeY = rand()%14+5;
- break;
-
- case 3:
- // button left
- holeX = rand()%27+5;
- holeY = rand()%14+29;
- break;
-
- case 4:
- //button right
- holeX = rand()%27+47;
- holeY = rand()%14+29;
- break;
-}}
-
-void hole::hole_show()
-{
-
- 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);
-
-
-}
-
-
-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