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: ELEC2645_JoystickLCD_LPC1768_2021
lib/Road.h@2:18fd28044860, 2021-03-18 (annotated)
- Committer:
- alex_20
- Date:
- Thu Mar 18 13:21:12 2021 +0000
- Revision:
- 2:18fd28044860
- Parent:
- 1:2ae7a8b01771
- Child:
- 3:cbe2dcca5058
Still separated if statements for each road. All functions within Road written
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alex_20 | 1:2ae7a8b01771 | 1 | #ifndef ROAD_H |
alex_20 | 1:2ae7a8b01771 | 2 | #define ROAD_H |
alex_20 | 1:2ae7a8b01771 | 3 | |
alex_20 | 1:2ae7a8b01771 | 4 | #include "mbed.h" |
alex_20 | 2:18fd28044860 | 5 | #include "N5110.h" |
alex_20 | 1:2ae7a8b01771 | 6 | #include "GameEngine.h" |
alex_20 | 1:2ae7a8b01771 | 7 | |
alex_20 | 1:2ae7a8b01771 | 8 | class Road |
alex_20 | 1:2ae7a8b01771 | 9 | { |
alex_20 | 1:2ae7a8b01771 | 10 | public: |
alex_20 | 1:2ae7a8b01771 | 11 | |
alex_20 | 1:2ae7a8b01771 | 12 | Road(); |
alex_20 | 2:18fd28044860 | 13 | void init(); |
alex_20 | 2:18fd28044860 | 14 | void draw(N5110 &lcd, int i); |
alex_20 | 2:18fd28044860 | 15 | void set_inclination(int inclination); |
alex_20 | 2:18fd28044860 | 16 | void set_direction(int direction); |
alex_20 | 1:2ae7a8b01771 | 17 | |
alex_20 | 1:2ae7a8b01771 | 18 | private: |
alex_20 | 1:2ae7a8b01771 | 19 | |
alex_20 | 1:2ae7a8b01771 | 20 | int _inclination; |
alex_20 | 1:2ae7a8b01771 | 21 | int _direction; |
alex_20 | 2:18fd28044860 | 22 | void _draw_warn(N5110 &lcd, int warn_position); |
alex_20 | 1:2ae7a8b01771 | 23 | |
alex_20 | 1:2ae7a8b01771 | 24 | }; |
alex_20 | 2:18fd28044860 | 25 | #endif |