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.
Board/Board.h@5:7207c9b70108, 2020-05-27 (annotated)
- Committer:
- ChenZirui
- Date:
- Wed May 27 21:13:59 2020 +0000
- Revision:
- 5:7207c9b70108
- Child:
- 6:b393cfe4e0a7
problems
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ChenZirui | 5:7207c9b70108 | 1 | #ifndef BOARD_H |
ChenZirui | 5:7207c9b70108 | 2 | #define BOARD_H |
ChenZirui | 5:7207c9b70108 | 3 | |
ChenZirui | 5:7207c9b70108 | 4 | #include "mbed.h" |
ChenZirui | 5:7207c9b70108 | 5 | #include "N5110.h" |
ChenZirui | 5:7207c9b70108 | 6 | #include "Gamepad.h" |
ChenZirui | 5:7207c9b70108 | 7 | #include "Bullet.h" |
ChenZirui | 5:7207c9b70108 | 8 | |
ChenZirui | 5:7207c9b70108 | 9 | class Board |
ChenZirui | 5:7207c9b70108 | 10 | { |
ChenZirui | 5:7207c9b70108 | 11 | public: |
ChenZirui | 5:7207c9b70108 | 12 | |
ChenZirui | 5:7207c9b70108 | 13 | Board(); |
ChenZirui | 5:7207c9b70108 | 14 | ~Board(); |
ChenZirui | 5:7207c9b70108 | 15 | void init(int x,int y,int height,int width,N5110 &lcd); |
ChenZirui | 5:7207c9b70108 | 16 | void draw(N5110 &lcd); |
ChenZirui | 5:7207c9b70108 | 17 | void update(Direction d,float mag,N5110 &lcd); |
ChenZirui | 5:7207c9b70108 | 18 | void add_score(); |
ChenZirui | 5:7207c9b70108 | 19 | int get_score(); |
ChenZirui | 5:7207c9b70108 | 20 | Vector2D get_pos(); |
ChenZirui | 5:7207c9b70108 | 21 | |
ChenZirui | 5:7207c9b70108 | 22 | private: |
ChenZirui | 5:7207c9b70108 | 23 | |
ChenZirui | 5:7207c9b70108 | 24 | int _height; |
ChenZirui | 5:7207c9b70108 | 25 | int _width; |
ChenZirui | 5:7207c9b70108 | 26 | int _x; |
ChenZirui | 5:7207c9b70108 | 27 | int _y; |
ChenZirui | 5:7207c9b70108 | 28 | int _speed; |
ChenZirui | 5:7207c9b70108 | 29 | int _score; |
ChenZirui | 5:7207c9b70108 | 30 | //bullet _bullet; |
ChenZirui | 5:7207c9b70108 | 31 | |
ChenZirui | 5:7207c9b70108 | 32 | }; |
ChenZirui | 5:7207c9b70108 | 33 | #endif |