Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.

Dependencies:   mbed FXOS8700CQ mbed-rtos

Revision:
33:f7ec806e14b6
Parent:
31:0d2c19a285f6
diff -r 58def659f463 -r f7ec806e14b6 Exam/Exam.cpp
--- a/Exam/Exam.cpp	Wed May 08 15:14:55 2019 +0000
+++ b/Exam/Exam.cpp	Wed May 08 23:57:04 2019 +0000
@@ -56,7 +56,6 @@
     };
     
     while(pad.check_event(Gamepad::START_PRESSED) == false){
-        //music.gym(pad, !finished);
         switch (currentPage) {
             case PAGE_1:
                 lcd.clear();
@@ -86,6 +85,7 @@
             break;
             case PAGE_3:
                 lcd.clear();
+                // Disable answers when no mission is successful
                 if (point > 0){
                     lcd.printString("A. 26.5kHz",0,2);
                     lcd.printString("B. 2.61MHz",0,3);
@@ -140,6 +140,7 @@
             break;
             case PAGE_6:
                 lcd.clear();
+                // Disable answers when only 1 mission is successful
                 if(point > 1) {
                     lcd.printString("A. 0.1354",0,2);
                     lcd.printString("B. 2.617",0,3);
@@ -193,6 +194,7 @@
             break;
             case PAGE_9:
                 lcd.clear();
+                // Disable answers when only 2 missions are successful
                 if(point > 2) {
                     lcd.printString("A. -ln|cos(x)|",0,2);
                     lcd.printString("B. -arctan(x)",0,3);
@@ -285,6 +287,7 @@
             break;
             case PAGE_3:
                 lcd.clear();
+                // Disable answers when no mission is successful
                 if (point > 0){
                     lcd.printString("A. 913.52nm",0,2);
                     lcd.printString("B. 875.44nm",0,3);
@@ -341,6 +344,7 @@
             break;
             case PAGE_6:
                 lcd.clear();
+                // Disable answers when only 1 mission is successful
                 if(point > 1) {
                     lcd.printString("A. 10kHz",0,2);
                     lcd.printString("B. 100kHz",0,3);
@@ -395,6 +399,7 @@
             break;
             case PAGE_9:
                 lcd.clear();
+                // Disable answers when only 2 missions are successful
                 if(point > 2) {
                     lcd.printString("A. x(0)",0,2);
                     lcd.printString("B. x(1)",0,3);
@@ -461,6 +466,7 @@
         switch (currentPage) {
             case PAGE_1:
                 lcd.clear();
+                // Disable answers and questions when no mission is successful
                 if (point > 0){
                     lcd.printString("Question 1",0,0);
                     lcd.printString("The answer is",0,1);
@@ -510,6 +516,7 @@
             break;
             case PAGE_3:
                 lcd.clear();
+                // Disable answers and questions when only 1 mission is successful
                 if (point > 1){
                     lcd.printString("Question 2",0,0);
                     lcd.printString("The answer is",0,1);
@@ -529,6 +536,7 @@
             break;
             case PAGE_4:
                 lcd.clear();
+                // Disable answers and questions when only 2 missions are successful
                 if (point > 1){
                     lcd.printString("A. ",0,2);
                     lcd.printString("B. ",0,3);