ELEC2645 (2018/19) / Mbed 2 deprecated el16y2m

Dependencies:   mbed

Files at this revision

API Documentation at this revision

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;
     }