contains my game for the embedded systems project 2645

Dependencies:   mbed FXOS8700CQQQ

Committer:
OmarAlebiary
Date:
Wed Apr 24 10:19:07 2019 +0000
Revision:
28:39607fb67e88
Parent:
Tests/tests.h@26:35714debc45f
Child:
29:e660274d8222
added doxygen comments to RocketRacer.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
OmarAlebiary 26:35714debc45f 1 #ifndef TESTS_H
OmarAlebiary 26:35714debc45f 2 #define TESTS_H
OmarAlebiary 26:35714debc45f 3 #include "RocketRacer.h"
OmarAlebiary 26:35714debc45f 4 #include "Menus.h"
OmarAlebiary 28:39607fb67e88 5 #include "GameTones.h"
OmarAlebiary 26:35714debc45f 6
OmarAlebiary 26:35714debc45f 7
OmarAlebiary 26:35714debc45f 8 /** Menus class
OmarAlebiary 26:35714debc45f 9
OmarAlebiary 26:35714debc45f 10 @brief C++ class containing the tests for methods
OmarAlebiary 26:35714debc45f 11
OmarAlebiary 26:35714debc45f 12 @version 1.0
OmarAlebiary 26:35714debc45f 13
OmarAlebiary 26:35714debc45f 14 @author Omar Alebiary
OmarAlebiary 26:35714debc45f 15
OmarAlebiary 26:35714debc45f 16 @date April 2019
OmarAlebiary 26:35714debc45f 17
OmarAlebiary 26:35714debc45f 18 @code
OmarAlebiary 26:35714debc45f 19
OmarAlebiary 26:35714debc45f 20 #include "mbed.h"
OmarAlebiary 26:35714debc45f 21 #include "N5110.h"
OmarAlebiary 26:35714debc45f 22 #include "Gamepad.h"
OmarAlebiary 26:35714debc45f 23 #include "RocketRacer.h"
OmarAlebiary 26:35714debc45f 24
OmarAlebiary 26:35714debc45f 25 // objects
OmarAlebiary 26:35714debc45f 26 Gamepad pad;
OmarAlebiary 26:35714debc45f 27 RocketRacer rc;
OmarAlebiary 26:35714debc45f 28 Menus menus;
OmarAlebiary 26:35714debc45f 29 tests test;
OmarAlebiary 26:35714debc45f 30
OmarAlebiary 26:35714debc45f 31
OmarAlebiary 26:35714debc45f 32
OmarAlebiary 26:35714debc45f 33 int main(){
OmarAlebiary 26:35714debc45f 34
OmarAlebiary 26:35714debc45f 35
OmarAlebiary 26:35714debc45f 36 setup();
OmarAlebiary 26:35714debc45f 37 test.test_welcomeMenu(pad,lcd);
OmarAlebiary 28:39607fb67e88 38 test.test_Play_Welcome_Melody(pad);
OmarAlebiary 28:39607fb67e88 39 test.test_End_Game_Melody(Gamepad &pad);
OmarAlebiary 26:35714debc45f 40 test.test_drawMenu(lcd, pad);
OmarAlebiary 26:35714debc45f 41 test.test_credits_page(lcd,pad);
OmarAlebiary 26:35714debc45f 42 test.test_loading_menu(lcd);
OmarAlebiary 26:35714debc45f 43 test.test_InstructionsMenu(pad,lcd);
OmarAlebiary 26:35714debc45f 44 test.test_Game_Loop(pad,lcd);
OmarAlebiary 26:35714debc45f 45
OmarAlebiary 26:35714debc45f 46
OmarAlebiary 26:35714debc45f 47
OmarAlebiary 26:35714debc45f 48
OmarAlebiary 26:35714debc45f 49
OmarAlebiary 26:35714debc45f 50 }
OmarAlebiary 26:35714debc45f 51
OmarAlebiary 26:35714debc45f 52 @endcode
OmarAlebiary 26:35714debc45f 53 */
OmarAlebiary 26:35714debc45f 54
OmarAlebiary 26:35714debc45f 55
OmarAlebiary 26:35714debc45f 56 class tests{
OmarAlebiary 26:35714debc45f 57
OmarAlebiary 26:35714debc45f 58 public:
OmarAlebiary 28:39607fb67e88 59 tests();
OmarAlebiary 26:35714debc45f 60 /**
OmarAlebiary 26:35714debc45f 61 * @brief method to test welcome menu
OmarAlebiary 26:35714debc45f 62 * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 63 * @param lcd @details calls the lcd object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 64 */
OmarAlebiary 26:35714debc45f 65 void test_welcomeMenu(Gamepad &pad,N5110 &lcd);
OmarAlebiary 26:35714debc45f 66 /**
OmarAlebiary 26:35714debc45f 67 * @brief method to test tones played in the game
OmarAlebiary 26:35714debc45f 68 * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 69 */
OmarAlebiary 28:39607fb67e88 70 void test_Play_Welcome_Melody(Gamepad &pad);
OmarAlebiary 28:39607fb67e88 71 /**
OmarAlebiary 28:39607fb67e88 72 * @brief method to test tones played in the game over screen
OmarAlebiary 28:39607fb67e88 73 * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
OmarAlebiary 28:39607fb67e88 74 */
OmarAlebiary 28:39607fb67e88 75 void test_End_Game_Melody(Gamepad &pad);
OmarAlebiary 26:35714debc45f 76 /**
OmarAlebiary 26:35714debc45f 77 * @brief method to test the draw main menu method
OmarAlebiary 26:35714debc45f 78 * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 79 * @param lcd @details calls the lcd object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 80 */
OmarAlebiary 26:35714debc45f 81 void test_drawMenu(N5110 &lcd,Gamepad &pad);
OmarAlebiary 26:35714debc45f 82 /**
OmarAlebiary 26:35714debc45f 83 * @brief method to test the credits page on the menu
OmarAlebiary 26:35714debc45f 84 * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 85 * @param lcd @details calls the lcd object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 86 */
OmarAlebiary 26:35714debc45f 87 void test_credits_page(N5110 &lcd,Gamepad &pad);
OmarAlebiary 26:35714debc45f 88 /**
OmarAlebiary 26:35714debc45f 89 * @brief method to test the loading page
OmarAlebiary 26:35714debc45f 90 * @param lcd @details calls the lcd object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 91 */
OmarAlebiary 26:35714debc45f 92 void test_loading_menu(N5110 &lcd);
OmarAlebiary 26:35714debc45f 93 /**
OmarAlebiary 26:35714debc45f 94 * @brief method to test the instructions page
OmarAlebiary 26:35714debc45f 95 * @param lcd @details calls the lcd object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 96 * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 97 */
OmarAlebiary 26:35714debc45f 98 void test_InstructionsMenu(Gamepad &pad,N5110 &lcd);
OmarAlebiary 26:35714debc45f 99 /**
OmarAlebiary 26:35714debc45f 100 * @brief method to test the game loop which has all the game methods calls in it
OmarAlebiary 26:35714debc45f 101 * @param lcd @details calls the lcd object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 102 * @param pad @details calls the Gamepad object to be passed to the methods called inside this method
OmarAlebiary 26:35714debc45f 103 */
OmarAlebiary 26:35714debc45f 104 void test_Game_Loop(Gamepad &pad,N5110 &lcd);
OmarAlebiary 26:35714debc45f 105
OmarAlebiary 28:39607fb67e88 106 private:
OmarAlebiary 28:39607fb67e88 107 Menus menu;
OmarAlebiary 28:39607fb67e88 108 RocketRacer Rocket_Racing;
OmarAlebiary 28:39607fb67e88 109 GameTones Game_Tones;
OmarAlebiary 28:39607fb67e88 110
OmarAlebiary 26:35714debc45f 111 };
OmarAlebiary 26:35714debc45f 112
OmarAlebiary 26:35714debc45f 113 #endif