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.
Map/Map.h@5:12c179da4788, 2019-03-26 (annotated)
- Committer:
- kocemax
- Date:
- Tue Mar 26 09:16:35 2019 +0000
- Revision:
- 5:12c179da4788
- Child:
- 6:39bda45efeed
Made a struct to store centerpoints, from which I can generate the map by storing the x and y in a struct within a vector. Now need to introduce collision between bricks and ball.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| kocemax | 5:12c179da4788 | 1 | #ifndef MAP_H |
| kocemax | 5:12c179da4788 | 2 | #define MAP_H |
| kocemax | 5:12c179da4788 | 3 | |
| kocemax | 5:12c179da4788 | 4 | #include "mbed.h" |
| kocemax | 5:12c179da4788 | 5 | #include "N5110.h" |
| kocemax | 5:12c179da4788 | 6 | #include "Gamepad.h" |
| kocemax | 5:12c179da4788 | 7 | #include "PlayerControl.h" |
| kocemax | 5:12c179da4788 | 8 | #include "Ball.h" |
| kocemax | 5:12c179da4788 | 9 | |
| kocemax | 5:12c179da4788 | 10 | /** Map Class |
| kocemax | 5:12c179da4788 | 11 | @author Kostadin Chakarov, University of Leeds |
| kocemax | 5:12c179da4788 | 12 | @brief Creates the map in the Breakout++ game |
| kocemax | 5:12c179da4788 | 13 | @date March 2019 |
| kocemax | 5:12c179da4788 | 14 | */ |
| kocemax | 5:12c179da4788 | 15 | |
| kocemax | 5:12c179da4788 | 16 | struct Centerpoints |
| kocemax | 5:12c179da4788 | 17 | { |
| kocemax | 5:12c179da4788 | 18 | int x; |
| kocemax | 5:12c179da4788 | 19 | int y; |
| kocemax | 5:12c179da4788 | 20 | }; |
| kocemax | 5:12c179da4788 | 21 | |
| kocemax | 5:12c179da4788 | 22 | class Map |
| kocemax | 5:12c179da4788 | 23 | { |
| kocemax | 5:12c179da4788 | 24 | |
| kocemax | 5:12c179da4788 | 25 | public: |
| kocemax | 5:12c179da4788 | 26 | Map(); |
| kocemax | 5:12c179da4788 | 27 | ~Map(); |
| kocemax | 5:12c179da4788 | 28 | void setCenterpoints(); |
| kocemax | 5:12c179da4788 | 29 | void drawMap(N5110 &lcd); |
| kocemax | 5:12c179da4788 | 30 | |
| kocemax | 5:12c179da4788 | 31 | private: |
| kocemax | 5:12c179da4788 | 32 | |
| kocemax | 5:12c179da4788 | 33 | |
| kocemax | 5:12c179da4788 | 34 | }; |
| kocemax | 5:12c179da4788 | 35 | #endif |