Aiming Wu
/
2645_Assignment
Doxyjen of the Bird.h
Game1/Game1.h@4:bf257e628311, 2019-05-05 (annotated)
- Committer:
- Wuuu
- Date:
- Sun May 05 17:31:17 2019 +0000
- Revision:
- 4:bf257e628311
- Parent:
- 0:0aea7b9ba421
- Child:
- 5:abe12cabd0b7
Doxyjen of the Game1.h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Wuuu | 0:0aea7b9ba421 | 1 | #ifndef GAME1_H |
Wuuu | 0:0aea7b9ba421 | 2 | #define GAME1_H |
Wuuu | 0:0aea7b9ba421 | 3 | |
Wuuu | 0:0aea7b9ba421 | 4 | #include "mbed.h" |
Wuuu | 0:0aea7b9ba421 | 5 | #include "N5110.h" |
Wuuu | 0:0aea7b9ba421 | 6 | #include "Gamepad.h" |
Wuuu | 0:0aea7b9ba421 | 7 | #include "Wall.h" |
Wuuu | 0:0aea7b9ba421 | 8 | #include "Copter.h" |
Wuuu | 0:0aea7b9ba421 | 9 | |
Wuuu | 4:bf257e628311 | 10 | /** Game1 class |
Wuuu | 4:bf257e628311 | 11 | |
Wuuu | 4:bf257e628311 | 12 | *@brief Library to combine the copter and wall |
Wuuu | 4:bf257e628311 | 13 | */ |
Wuuu | 4:bf257e628311 | 14 | |
Wuuu | 0:0aea7b9ba421 | 15 | class Game1 |
Wuuu | 0:0aea7b9ba421 | 16 | { |
Wuuu | 0:0aea7b9ba421 | 17 | public: |
Wuuu | 4:bf257e628311 | 18 | |
Wuuu | 4:bf257e628311 | 19 | /**Constructor*/ |
Wuuu | 0:0aea7b9ba421 | 20 | Game1(); |
Wuuu | 4:bf257e628311 | 21 | /**Destructor*/ |
Wuuu | 0:0aea7b9ba421 | 22 | ~Game1(); |
Wuuu | 4:bf257e628311 | 23 | /** |
Wuuu | 4:bf257e628311 | 24 | *@brief Initialise all parameters of the Game1 |
Wuuu | 4:bf257e628311 | 25 | */ |
Wuuu | 0:0aea7b9ba421 | 26 | void init(); |
Wuuu | 4:bf257e628311 | 27 | /** |
Wuuu | 4:bf257e628311 | 28 | *@brief Draw the bird, wall and live scores |
Wuuu | 4:bf257e628311 | 29 | *@param lcd, pad |
Wuuu | 4:bf257e628311 | 30 | *@returns The number to test whether the copter crash the wall |
Wuuu | 4:bf257e628311 | 31 | *@details Use the method to use function within N5110.h and Gamepad.h file |
Wuuu | 4:bf257e628311 | 32 | */ |
Wuuu | 0:0aea7b9ba421 | 33 | int draw(N5110 &lcd, Gamepad &pad); |
Wuuu | 4:bf257e628311 | 34 | /** |
Wuuu | 4:bf257e628311 | 35 | *@brief Get the live score |
Wuuu | 4:bf257e628311 | 36 | *@return The live score |
Wuuu | 4:bf257e628311 | 37 | */ |
Wuuu | 0:0aea7b9ba421 | 38 | int get_score(); |
Wuuu | 0:0aea7b9ba421 | 39 | |
Wuuu | 0:0aea7b9ba421 | 40 | private: |
Wuuu | 0:0aea7b9ba421 | 41 | |
Wuuu | 0:0aea7b9ba421 | 42 | int _m; |
Wuuu | 0:0aea7b9ba421 | 43 | int _s; |
Wuuu | 0:0aea7b9ba421 | 44 | int _a; |
Wuuu | 0:0aea7b9ba421 | 45 | int _b; |
Wuuu | 0:0aea7b9ba421 | 46 | int _c; |
Wuuu | 0:0aea7b9ba421 | 47 | Copter _Copter; |
Wuuu | 0:0aea7b9ba421 | 48 | Wall _Wall; |
Wuuu | 0:0aea7b9ba421 | 49 | }; |
Wuuu | 0:0aea7b9ba421 | 50 | |
Wuuu | 0:0aea7b9ba421 | 51 | #endif |