Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
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 /**initial the first data of board*/ 00017 void init(int x,int y,int length,int width); 00018 /**use screeen function to draw a board*/ 00019 void draw(N5110 &lcd); 00020 /**update borad to position to realise the effect of speed*/ 00021 void update(Direction d,float mag); 00022 /**score generation function*/ 00023 void add_score(); 00024 /**score reading function*/ 00025 int get_score(); 00026 /**position reading function*/ 00027 Vector2D get_pos(); 00028 00029 private: 00030 //all parameters about board 00031 int _length; 00032 int _width; 00033 int _x; 00034 int _y; 00035 int _speed; 00036 int _score; 00037 00038 }; 00039 #endif
Generated on Wed Jul 13 2022 04:23:58 by
1.7.2