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
Revision 17:9f7ff626210b, committed 2019-05-09
- Comitter:
- MYY
- Date:
- Thu May 09 05:08:02 2019 +0000
- Parent:
- 16:eedfe331cd22
- Commit message:
- Final submission, i guarantee there is no plagiarism in the project.
Changed in this revision
| Detect/Detect.cpp | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Detect/Detect.cpp Thu May 09 04:54:18 2019 +0000
+++ b/Detect/Detect.cpp Thu May 09 05:08:02 2019 +0000
@@ -12,7 +12,8 @@
level_1_x, level_1_y : Coordinates for gold/rock in level 1. Random coordinates will mess up with the difficulty of game.
level_1_X, level_1_Y : centre point for gold/rock which we will draw a circle with.
- They are global variables stored in "Global_my"
+
+ !They are global variables stored in "Global_my"
This is same for level 2 and level 3.
*/
--- a/main.cpp Thu May 09 04:54:18 2019 +0000
+++ b/main.cpp Thu May 09 05:08:02 2019 +0000
@@ -1,5 +1,13 @@
+/*
+Yuyang Miao
+201089114
+Electrical and Electronic Engineering
+Misery Miner
+*/
+
#include "Level.h"
+//objects
N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
Menu Menu;
Level Level;
@@ -16,7 +24,7 @@
InterruptIn Back(PTB19);
Gamepad Gamepad;
-void init();
+void init();//initialization lcd, gamepad, and debut value
int main()
{ //initialize lcd, gamepad, and debut values
@@ -29,7 +37,7 @@
break;
case 2:
- Menu.TNT_m(lcd, A, B);
+ Menu.TNT_m(lcd, A, B);//print Menu ask you if youwant to buy a TNT
Level.level_2(Image, lcd, Rotate, Release, detect, Pull, A, B, logistic, Level, Tool);
break;
@@ -45,7 +53,7 @@
{ Gamepad.init();
lcd.init();
int ii;
- for(ii=0; ii<3; ii=ii+1) {
+ for(ii=0; ii<3; ii=ii+1) {//set debut value
Rotate.return_angle[ii]=PI;
Rotate.return_flag[ii]=1;
}