Aiming Wu
/
2645_Assignment
Doxyjen of the Bird.h
Copter/Copter.h@6:0912dfea40f5, 2019-05-05 (annotated)
- Committer:
- Wuuu
- Date:
- Sun May 05 17:46:26 2019 +0000
- Revision:
- 6:0912dfea40f5
- Parent:
- 5:abe12cabd0b7
Final Submission. I have read and agreed with Statement of Academic Integrity.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Wuuu | 0:0aea7b9ba421 | 1 | #ifndef COPTER_H |
Wuuu | 0:0aea7b9ba421 | 2 | #define COPTER_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 "Bitmap.h" |
Wuuu | 0:0aea7b9ba421 | 8 | |
Wuuu | 1:76cbc2429c1a | 9 | /** Copter class |
Wuuu | 1:76cbc2429c1a | 10 | |
Wuuu | 1:76cbc2429c1a | 11 | *@brief Library to draw the copter |
Wuuu | 6:0912dfea40f5 | 12 | *@author Wu Aiming |
Wuuu | 6:0912dfea40f5 | 13 | *@date May 2019 |
Wuuu | 1:76cbc2429c1a | 14 | */ |
Wuuu | 1:76cbc2429c1a | 15 | |
Wuuu | 0:0aea7b9ba421 | 16 | class Copter |
Wuuu | 0:0aea7b9ba421 | 17 | { |
Wuuu | 0:0aea7b9ba421 | 18 | public: |
Wuuu | 1:76cbc2429c1a | 19 | |
Wuuu | 1:76cbc2429c1a | 20 | /**Constructor*/ |
Wuuu | 0:0aea7b9ba421 | 21 | Copter(); |
Wuuu | 1:76cbc2429c1a | 22 | /**Destructor*/ |
Wuuu | 0:0aea7b9ba421 | 23 | ~Copter(); |
Wuuu | 2:ffa13a6fec22 | 24 | /** |
Wuuu | 5:abe12cabd0b7 | 25 | *@brief Initialise all parameters of the Copter |
Wuuu | 1:76cbc2429c1a | 26 | */ |
Wuuu | 0:0aea7b9ba421 | 27 | void init(); |
Wuuu | 1:76cbc2429c1a | 28 | /** Gets raw cartesian co-ordinates of joystick |
Wuuu | 1:76cbc2429c1a | 29 | *@param pad |
Wuuu | 1:76cbc2429c1a | 30 | *@returns a struct with x,y members, each in the range 0.0 to 1.0 |
Wuuu | 1:76cbc2429c1a | 31 | */ |
Wuuu | 0:0aea7b9ba421 | 32 | Vector2D get_coord(Gamepad &pad); |
Wuuu | 1:76cbc2429c1a | 33 | /** |
Wuuu | 1:76cbc2429c1a | 34 | *@brief Draw the bird |
Wuuu | 2:ffa13a6fec22 | 35 | *@param lcd |
Wuuu | 2:ffa13a6fec22 | 36 | *@details Use the method to use function within N5110.h file |
Wuuu | 1:76cbc2429c1a | 37 | */ |
Wuuu | 0:0aea7b9ba421 | 38 | void draw(N5110 &lcd); |
Wuuu | 1:76cbc2429c1a | 39 | /** |
Wuuu | 1:76cbc2429c1a | 40 | *@brief Get the live score |
Wuuu | 1:76cbc2429c1a | 41 | *@return The live score |
Wuuu | 1:76cbc2429c1a | 42 | */ |
Wuuu | 0:0aea7b9ba421 | 43 | int get_score(); |
Wuuu | 1:76cbc2429c1a | 44 | /** |
Wuuu | 1:76cbc2429c1a | 45 | *@brief Get the position of copter |
Wuuu | 1:76cbc2429c1a | 46 | *@return The position of copter |
Wuuu | 1:76cbc2429c1a | 47 | */ |
Wuuu | 0:0aea7b9ba421 | 48 | int get_h(); |
Wuuu | 0:0aea7b9ba421 | 49 | |
Wuuu | 0:0aea7b9ba421 | 50 | private: |
Wuuu | 0:0aea7b9ba421 | 51 | |
Wuuu | 0:0aea7b9ba421 | 52 | int _score; |
Wuuu | 0:0aea7b9ba421 | 53 | int _h; |
Wuuu | 0:0aea7b9ba421 | 54 | Vector2D _ans; |
Wuuu | 0:0aea7b9ba421 | 55 | }; |
Wuuu | 5:abe12cabd0b7 | 56 | #endif |
Wuuu | 6:0912dfea40f5 | 57 |