勇帜 周
/
2645_Final_project_1
bird
structure_2/structure_2.h@4:cd9a60a75717, 2019-05-05 (annotated)
- Committer:
- 1013373474
- Date:
- Sun May 05 19:00:12 2019 +0000
- Revision:
- 4:cd9a60a75717
- Parent:
- 3:d9c2fc1d5984
- Child:
- 5:6be8521a885a
gjhg
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
1013373474 | 0:3887ebee1b37 | 1 | #include "mbed.h" |
1013373474 | 0:3887ebee1b37 | 2 | #include "N5110.h" |
1013373474 | 0:3887ebee1b37 | 3 | #include "Gamepad.h" |
1013373474 | 0:3887ebee1b37 | 4 | |
1013373474 | 2:fb9c05867677 | 5 | /** |
1013373474 | 2:fb9c05867677 | 6 | *@brief Data struct includes the structure position. |
1013373474 | 2:fb9c05867677 | 7 | */ |
1013373474 | 0:3887ebee1b37 | 8 | |
1013373474 | 0:3887ebee1b37 | 9 | struct Data2{ |
1013373474 | 2:fb9c05867677 | 10 | int mm; /**<int the position of the first structure */ |
1013373474 | 2:fb9c05867677 | 11 | int nn; /**<int the position of the first channel */ |
1013373474 | 2:fb9c05867677 | 12 | int qq; /**<int the position of the second structure */ |
1013373474 | 2:fb9c05867677 | 13 | int oo; /**<int the position of the second channel */ |
1013373474 | 2:fb9c05867677 | 14 | int pp; /**<int the position of the third structure */ |
1013373474 | 2:fb9c05867677 | 15 | int ee; /**<int the position of the third channel */ |
1013373474 | 2:fb9c05867677 | 16 | int tt;/**<int the position of the third channel */ |
1013373474 | 0:3887ebee1b37 | 17 | }; |
1013373474 | 3:d9c2fc1d5984 | 18 | /** structure_2 Class |
1013373474 | 2:fb9c05867677 | 19 | *@brief Data used to make the structure |
1013373474 | 4:cd9a60a75717 | 20 | *@author Zhou Yongzhi |
1013373474 | 4:cd9a60a75717 | 21 | *@date May 2019 |
1013373474 | 2:fb9c05867677 | 22 | */ |
1013373474 | 0:3887ebee1b37 | 23 | class structure_2 |
1013373474 | 0:3887ebee1b37 | 24 | { |
1013373474 | 0:3887ebee1b37 | 25 | public: |
1013373474 | 2:fb9c05867677 | 26 | /** |
1013373474 | 2:fb9c05867677 | 27 | *@brief initialise the parameters |
1013373474 | 2:fb9c05867677 | 28 | *@param size,speed |
1013373474 | 2:fb9c05867677 | 29 | */ |
1013373474 | 0:3887ebee1b37 | 30 | void init(int size,int speed); |
1013373474 | 2:fb9c05867677 | 31 | /** |
1013373474 | 2:fb9c05867677 | 32 | *@brief initialise the parameters |
1013373474 | 2:fb9c05867677 | 33 | *@param lcd |
1013373474 | 2:fb9c05867677 | 34 | *@details The function in N5110 is used |
1013373474 | 2:fb9c05867677 | 35 | */ |
1013373474 | 0:3887ebee1b37 | 36 | void draw(N5110 &lcd); |
1013373474 | 2:fb9c05867677 | 37 | /** |
1013373474 | 2:fb9c05867677 | 38 | *@brief initialise the parameters |
1013373474 | 2:fb9c05867677 | 39 | */ |
1013373474 | 0:3887ebee1b37 | 40 | void init(); |
1013373474 | 2:fb9c05867677 | 41 | /** |
1013373474 | 2:fb9c05867677 | 42 | *@brief The data which are sent to main.cpp |
1013373474 | 2:fb9c05867677 | 43 | */ |
1013373474 | 0:3887ebee1b37 | 44 | Data2 get_data2(); |
1013373474 | 2:fb9c05867677 | 45 | |
1013373474 | 0:3887ebee1b37 | 46 | |
1013373474 | 0:3887ebee1b37 | 47 | private: |
1013373474 | 0:3887ebee1b37 | 48 | int _mm; //障碍物左上角的点的横坐标 |
1013373474 | 0:3887ebee1b37 | 49 | int _nn; // 障碍物间隔左上角点的纵坐标 |
1013373474 | 0:3887ebee1b37 | 50 | int _qq; //the second |
1013373474 | 0:3887ebee1b37 | 51 | int _oo; // the third |
1013373474 | 0:3887ebee1b37 | 52 | int _pp; // the second heng zuobiao |
1013373474 | 0:3887ebee1b37 | 53 | int _ee; // the third heng zuobiao |
1013373474 | 0:3887ebee1b37 | 54 | int _tt; // the score |
1013373474 | 0:3887ebee1b37 | 55 | Data2 _data2; |
1013373474 | 0:3887ebee1b37 | 56 | }; |