勇帜 周
/
2645_Final_project_1
bird
structure/structure.h@3:d9c2fc1d5984, 2019-05-05 (annotated)
- Committer:
- 1013373474
- Date:
- Sun May 05 18:52:46 2019 +0000
- Revision:
- 3:d9c2fc1d5984
- Parent:
- 2:fb9c05867677
- Child:
- 4:cd9a60a75717
bird
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
1013373474 | 0:3887ebee1b37 | 1 | #include "bird.h" |
1013373474 | 0:3887ebee1b37 | 2 | |
1013373474 | 2:fb9c05867677 | 3 | /** |
1013373474 | 2:fb9c05867677 | 4 | *@brief Data struct includes the structure position. |
1013373474 | 2:fb9c05867677 | 5 | */ |
1013373474 | 0:3887ebee1b37 | 6 | |
1013373474 | 0:3887ebee1b37 | 7 | struct Data1{ |
1013373474 | 2:fb9c05867677 | 8 | int m; /**<int the position of the first structure */ |
1013373474 | 2:fb9c05867677 | 9 | int n; /**<int the position of the first channel */ |
1013373474 | 2:fb9c05867677 | 10 | int q; /**<int the position of the second structure */ |
1013373474 | 2:fb9c05867677 | 11 | int o; /**<int the position of the second channel */ |
1013373474 | 2:fb9c05867677 | 12 | int p; /**<int the position of the third structure */ |
1013373474 | 2:fb9c05867677 | 13 | int e; /**<int the position of the third channel */ |
1013373474 | 2:fb9c05867677 | 14 | int t; /**<int the score of the player*/ |
1013373474 | 0:3887ebee1b37 | 15 | }; |
1013373474 | 3:d9c2fc1d5984 | 16 | /** structure Class |
1013373474 | 2:fb9c05867677 | 17 | *@brief Data used to make the structure |
1013373474 | 2:fb9c05867677 | 18 | *@anthor Zhou Yongzhi |
1013373474 | 2:fb9c05867677 | 19 | *@data May 2019 |
1013373474 | 2:fb9c05867677 | 20 | */ |
1013373474 | 0:3887ebee1b37 | 21 | |
1013373474 | 0:3887ebee1b37 | 22 | |
1013373474 | 0:3887ebee1b37 | 23 | |
1013373474 | 0:3887ebee1b37 | 24 | class structure |
1013373474 | 0:3887ebee1b37 | 25 | { |
1013373474 | 0:3887ebee1b37 | 26 | public: |
1013373474 | 2:fb9c05867677 | 27 | /** |
1013373474 | 2:fb9c05867677 | 28 | *@brief initialise the parameters |
1013373474 | 2:fb9c05867677 | 29 | *@param size,speed |
1013373474 | 2:fb9c05867677 | 30 | */ |
1013373474 | 0:3887ebee1b37 | 31 | void init(int size,int speed); |
1013373474 | 2:fb9c05867677 | 32 | /** |
1013373474 | 2:fb9c05867677 | 33 | *@brief initialise the parameters |
1013373474 | 2:fb9c05867677 | 34 | *@param lcd |
1013373474 | 2:fb9c05867677 | 35 | *@details The function in N5110 is used |
1013373474 | 2:fb9c05867677 | 36 | */ |
1013373474 | 0:3887ebee1b37 | 37 | void draw(N5110 &lcd); |
1013373474 | 2:fb9c05867677 | 38 | /** |
1013373474 | 2:fb9c05867677 | 39 | *@brief initialise the parameters |
1013373474 | 2:fb9c05867677 | 40 | */ |
1013373474 | 0:3887ebee1b37 | 41 | void init(); |
1013373474 | 2:fb9c05867677 | 42 | /** |
1013373474 | 2:fb9c05867677 | 43 | *@brief The data which are sent to main.cpp |
1013373474 | 2:fb9c05867677 | 44 | */ |
1013373474 | 0:3887ebee1b37 | 45 | Data1 get_data1(); |
1013373474 | 2:fb9c05867677 | 46 | |
1013373474 | 0:3887ebee1b37 | 47 | |
1013373474 | 0:3887ebee1b37 | 48 | |
1013373474 | 0:3887ebee1b37 | 49 | private: |
1013373474 | 0:3887ebee1b37 | 50 | int _m; //障碍物左上角的点的横坐标 |
1013373474 | 0:3887ebee1b37 | 51 | int _n; // 障碍物间隔左上角点的纵坐标 |
1013373474 | 0:3887ebee1b37 | 52 | int _q; //the second |
1013373474 | 0:3887ebee1b37 | 53 | int _o; // the third |
1013373474 | 0:3887ebee1b37 | 54 | int _p; // the second heng zuobiao |
1013373474 | 0:3887ebee1b37 | 55 | int _e; // the third heng zuobiao |
1013373474 | 0:3887ebee1b37 | 56 | int _t; // the score |
1013373474 | 0:3887ebee1b37 | 57 | Data1 _data1; |
1013373474 | 0:3887ebee1b37 | 58 | }; |