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:
10:adff3c804985
Parent:
5:bc0691d02fd5
Child:
11:5a6b9dffd78a
--- a/main.cpp	Thu Apr 11 16:17:38 2019 +0000
+++ b/main.cpp	Fri Apr 12 17:19:14 2019 +0000
@@ -157,6 +157,7 @@
                                 currentGame = CHARMANDER;}
                         break;
                         case BULBASAUR:
+                            score = 3;
                             currentGame = EXAM;
                         break;
                         case SQUIRTLE:
@@ -194,6 +195,7 @@
                             
                         break;
                         case CHARMANDER:
+                            score = 2;
                             currentGame = EXAM;
                         break;
                         case EXAM:
@@ -205,7 +207,7 @@
                                 passed();
                                 music.win(pad);
                                 wait(0.5);
-                                year++;
+                                year = year + 2;
                                 if(year == 1){currentGame = YEAR_2;}
                                 else if(year == 2){currentGame = YEAR_3;}
                                 else if(year == 3){currentGame = GRADUATION;}
@@ -416,29 +418,29 @@
         };
         lcd.drawSprite(5, pos_y, 7, 5, arrow_data);
         
-        static int op_one_data[] = {
-            1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,
-            1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,
-            1,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,
-            1,1,1,1,0,0,0,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,0,0,
-            0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,
-            0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,
-            1,1,1,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0
+        int op_one_data[7][26] = {
+            {1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1},
+            {1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0},
+            {1,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0},
+            {1,1,1,1,0,0,0,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,0,0},
+            {0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0},
+            {0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0},
+            {1,1,1,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0},
         };
-        lcd.drawSprite(18, 5, 7, 26, op_one_data);
+        lcd.drawSprite(18, 5, 7, 26, (int *)op_one_data);
         
-        static int op_two_data[] = {
-            1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,
-            0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,
-            0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1,
-            0,1,0,0,1,0,0,1,0,1,1,1,0,0,1,0,0,1,
-            0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1,
-            0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1,
-            1,1,1,0,1,0,0,1,0,1,0,0,0,0,1,1,1,1
+        int op_two_data[7][18] = {
+            {1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1},
+            {0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1},
+            {0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1},
+            {0,1,0,0,1,0,0,1,0,1,1,1,0,0,1,0,0,1},
+            {0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1},
+            {0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1},
+            {1,1,1,0,1,0,0,1,0,1,0,0,0,0,1,1,1,1},
         };
-        lcd.drawSprite(18, 16, 7, 18, op_two_data);
+        lcd.drawSprite(18, 16, 7, 18, (int*) op_two_data);
         
-        static int instruct_data[] = {
+        int instruct_data[] = {
             1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
             1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
             1,0,0,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,0,0,1,0,0,1,0,0,0,0,1,1,1,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,0,