Zirui Chen 201235448
Dependencies: mbed
Diff: Board/Board.h
- Revision:
- 7:f61ac963eb07
- Parent:
- 6:b393cfe4e0a7
- Child:
- 12:b476186651cf
--- a/Board/Board.h Thu May 28 01:11:47 2020 +0000 +++ b/Board/Board.h Fri May 29 02:55:37 2020 +0000 @@ -1,33 +1,34 @@ #ifndef BOARD_H #define BOARD_H - +#define LENGTH 84 #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Bullet.h" - +/** Board Class +@author Chen Zirui, University of Leeds +@brief Board data and its functions list +@date May 2020 +*/ class Board { public: - Board(); - ~Board();//constructor and destructor - void init(int x,int y,int height,int width);//initial the first data of board - void draw(N5110 &lcd);//use screeen function to draw a board - void update(Direction d,float mag);//update borad to position to realise the effect of speed - void add_score();//score generation function - int get_score(); - Vector2D get_pos(); + void init(int x,int y,int length,int width); //initial the first data of board + void draw(N5110 &lcd); //use screeen function to draw a board + void update(Direction d,float mag); //update borad to position to realise the effect of speed + void add_score(); //score generation function + int get_score(); //score reading function + Vector2D get_pos(); //position reading function private: - - int _height; + //all parameters about board + int _length; int _width; int _x; int _y; int _speed; int _score; - //bullet _bullet; - + }; #endif \ No newline at end of file