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

Committer:
yfkwok
Date:
Mon Apr 29 20:59:49 2019 +0000
Revision:
25:31111e6e13ad
Parent:
17:5d8ff39a0e49
29/04/2019 - Class documentation update

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yfkwok 5:bc0691d02fd5 1 #ifndef EXAM_H
yfkwok 5:bc0691d02fd5 2 #define EXAM_H
yfkwok 5:bc0691d02fd5 3
yfkwok 5:bc0691d02fd5 4 #include "mbed.h"
yfkwok 5:bc0691d02fd5 5 #include "N5110.h"
yfkwok 5:bc0691d02fd5 6 #include "Gamepad.h"
yfkwok 5:bc0691d02fd5 7 #include "Score.h"
yfkwok 5:bc0691d02fd5 8
yfkwok 25:31111e6e13ad 9 /** Exam Class
yfkwok 25:31111e6e13ad 10 * @brief This class is the game engine for the mini-game EXAM
yfkwok 25:31111e6e13ad 11 * @version 1.0
yfkwok 25:31111e6e13ad 12 * @author Yiu Fai Kwok
yfkwok 25:31111e6e13ad 13 * @date April, 2019
yfkwok 25:31111e6e13ad 14 */
yfkwok 25:31111e6e13ad 15
yfkwok 5:bc0691d02fd5 16 class Exam
yfkwok 5:bc0691d02fd5 17 {
yfkwok 5:bc0691d02fd5 18
yfkwok 5:bc0691d02fd5 19 public:
yfkwok 17:5d8ff39a0e49 20 /** Constructor */
yfkwok 5:bc0691d02fd5 21 Exam();
yfkwok 17:5d8ff39a0e49 22 /** Deconstructor */
yfkwok 5:bc0691d02fd5 23 ~Exam();
yfkwok 5:bc0691d02fd5 24
yfkwok 17:5d8ff39a0e49 25 /**
yfkwok 17:5d8ff39a0e49 26 * @brief EXAM title
yfkwok 17:5d8ff39a0e49 27 * @details The function draws the EXAM title and plays the introduction music to the EXAM mini game
yfkwok 17:5d8ff39a0e49 28 */
yfkwok 5:bc0691d02fd5 29 void exam_title(Gamepad &pad, N5110 &lcd);
yfkwok 17:5d8ff39a0e49 30
yfkwok 17:5d8ff39a0e49 31 /**
yfkwok 17:5d8ff39a0e49 32 * @brief Exam questions for year 1
yfkwok 17:5d8ff39a0e49 33 * @param the value of point (int)
yfkwok 17:5d8ff39a0e49 34 * @return the number of correct answers (int)
yfkwok 17:5d8ff39a0e49 35 * @details The function takes in the number of successful missions (point) and display the answers to the questions accordingly. Then returns the amount of questions answered correctly to determine if the player passed the exam for year 1.
yfkwok 17:5d8ff39a0e49 36 */
yfkwok 5:bc0691d02fd5 37 int exam_q_one(Gamepad &pad, N5110 &lcd, int point);
yfkwok 17:5d8ff39a0e49 38
yfkwok 17:5d8ff39a0e49 39 /**
yfkwok 17:5d8ff39a0e49 40 * @brief Exam questions for year 2
yfkwok 17:5d8ff39a0e49 41 * @param the value of point (int)
yfkwok 17:5d8ff39a0e49 42 * @return the number of correct answers (int)
yfkwok 17:5d8ff39a0e49 43 * @details The function takes in the number of successful missions (point) and display the answers to the questions accordingly. Then returns the amount of questions answered correctly to determine if the player passed the exam for year 2.
yfkwok 17:5d8ff39a0e49 44 */
yfkwok 5:bc0691d02fd5 45 int exam_q_two(Gamepad &pad, N5110 &lcd, int point);
yfkwok 17:5d8ff39a0e49 46
yfkwok 17:5d8ff39a0e49 47 /**
yfkwok 17:5d8ff39a0e49 48 * @brief Exam questions for year 3
yfkwok 17:5d8ff39a0e49 49 * @param the value of point (int)
yfkwok 17:5d8ff39a0e49 50 * @return the number of correct answers (int)
yfkwok 17:5d8ff39a0e49 51 * @details The function takes in the number of successful missions (point) and display the answers to the questions accordingly. Then returns the amount of questions answered correctly to determine if the player passed the exam for year 3.
yfkwok 17:5d8ff39a0e49 52 */
yfkwok 5:bc0691d02fd5 53 int exam_q_three(Gamepad &pad, N5110 &lcd, int point);
yfkwok 5:bc0691d02fd5 54
yfkwok 5:bc0691d02fd5 55 private:
yfkwok 5:bc0691d02fd5 56
yfkwok 5:bc0691d02fd5 57 Score music;
yfkwok 5:bc0691d02fd5 58
yfkwok 5:bc0691d02fd5 59 };
yfkwok 5:bc0691d02fd5 60
yfkwok 5:bc0691d02fd5 61 #endif