Chen Zirui Project 201235448

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Board.h Source File

Board.h

00001 #ifndef BOARD_H
00002 #define BOARD_H
00003 #define LENGTH 84
00004 #include "mbed.h"
00005 #include "N5110.h"
00006 #include "Gamepad.h"
00007 #include "Bullet.h"
00008 /** Board Class
00009 @author Chen Zirui, University of Leeds
00010 @brief Board data and its functions list
00011 @date  May 2020
00012 */ 
00013 class Board
00014 {
00015 public:
00016 
00017     void init(int x,int y,int length,int width);            //initial the first data of board
00018     void draw(N5110 &lcd);                                  //use screeen function to draw a board
00019     void update(Direction d,float mag);                     //update borad to position to realise the effect of speed
00020     void add_score();                                       //score generation function
00021     int get_score();                                        //score reading function
00022     Vector2D get_pos();                                     //position reading function
00023 
00024 private:
00025     //all parameters about board
00026     int _length;
00027     int _width;
00028     int _x;
00029     int _y;
00030     int _speed;
00031     int _score;
00032     
00033 };
00034 #endif