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/hole.cpp
- Revision:
- 4:402c27b212c1
- Parent:
- 3:dd4678a85a1a
--- a/Hole/hole.cpp Thu May 04 13:56:12 2017 +0000
+++ b/Hole/hole.cpp Fri May 05 12:53:09 2017 +0000
@@ -2,15 +2,18 @@
#include "hole.h"
extern N5110 lcd;
-//lot out the screen in four parts and the bomb would produce in random place of four parts
+//
+/** Hole place *
+* lot out the screen in four parts and the bomb would produce in random place of four parts
+* @param holex - the column number of bomb center
+* @param holey - the row number of bomb center */
void hole::hole_place()
{
int four = ((rand())%4)+1;
switch(four){
case 1:
//top left
- /* @X - the abscissa of circle center
- * @Y - the ordinate of circle center*/
+
holeX = rand()%27+5;
holeY = rand()%14+5;
break;
@@ -41,7 +44,9 @@
}
-
+/** Hole test *
+* Test when human touch the hole
+ */
bool hole::test(int _x, int _y)
{
int x = _x;