bird

Dependencies:   mbed

structure/structure.h

Committer:
1013373474
Date:
2019-05-06
Revision:
6:9bf0273ee25f
Parent:
4:cd9a60a75717

File content as of revision 6:9bf0273ee25f:

#include "bird.h"

/**
*@brief Data struct includes the structure position.
*/

struct Data1{
    int m; /**<int the position of the first structure */
    int n; /**<int the position of the first channel */
    int q; /**<int the position of the second structure */
    int o; /**<int the position of the second channel */
    int p; /**<int the position of the third structure */
    int e; /**<int the position of the third channel */
    int t; /**<int the score of the player*/
    };
/** structure Class
*@brief Data used to make the structure
*@author Zhou Yongzhi
*@date May 2019
*/
    
    
    
class structure
{
public:
   /**
   *@brief initialise the parameters
   *@param size,speed
   */
   void init(int size,int speed);
   /**
   *@brief initialise the parameters
   *@param lcd
   *@details The function in N5110 is used
   */
   void draw(N5110 &lcd);
   /**
   *@brief initialise the parameters
   */
   void init();
     /**
   *@brief The data which are sent to main.cpp
   */
   Data1 get_data1();

 
    
private:
  int _m; //障碍物左上角的点的横坐标
  int _n; // 障碍物间隔左上角点的纵坐标
  int _q; //the second
  int _o; // the third
  int _p; // the second  heng zuobiao
  int _e; // the third  heng zuobiao
  int _t; // the score
  Data1 _data1;
};