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:
22:f8f36e88b2ca
Parent:
12:71683453f66a
Child:
25:31111e6e13ad
--- a/Characters/Bulbasaur.cpp	Sun Apr 28 18:04:23 2019 +0000
+++ b/Characters/Bulbasaur.cpp	Sun Apr 28 18:58:10 2019 +0000
@@ -353,7 +353,8 @@
                 lcd.printString("do actual work",0,4);
                 lcd.drawSprite(39, 44, 4, 7, (int*)instruct_data);
                 lcd.refresh();
-                if(pad.get_direction() == S){currentPage = PAGE_2;}
+                if(pad.get_direction() == S){currentPage = PAGE_2; pad.init_input();}
+                if(pad.get_direction() == N){currentPage = PAGE_1; pad.init_input();}
                 wait(1.0f/fps);
             break;
             case PAGE_2:
@@ -365,7 +366,8 @@
                 lcd.printString("him so that he",0,4);
                 lcd.drawSprite(39, 44, 4, 7, (int*)instruct_data);
                 lcd.refresh();
-                if(pad.get_direction() == S){currentPage = PAGE_3;}
+                if(pad.get_direction() == S){currentPage = PAGE_3; pad.init_input();}
+                if(pad.get_direction() == N){currentPage = PAGE_1; pad.init_input();}
                 wait(1.0f/fps);
             break;
             case PAGE_3:
@@ -373,7 +375,9 @@
                 lcd.printString("can graduate!",0,0);
                 lcd.printString("Press B",0,5);
                 lcd.refresh();
+                if(pad.get_direction() == N){currentPage = PAGE_2; pad.init_input();}
                 wait(1.0f/fps);
+            break;
         }
     }
 }
\ No newline at end of file