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.
MazeEngine/MazeEngine.h@20:041affa5e242, 2018-05-08 (annotated)
- Committer:
- ahmedhedait
- Date:
- Tue May 08 11:57:19 2018 +0000
- Revision:
- 20:041affa5e242
- Parent:
- 19:c6ebd1394bda
- Child:
- 21:bcc84d5cb068
The ball is now capable of moving through the screen with the joystick.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ahmedhedait | 17:68d4b4095d80 | 1 | #ifndef MAZEENGINE_H |
| ahmedhedait | 17:68d4b4095d80 | 2 | #define MAZEENGINE_H |
| ahmedhedait | 17:68d4b4095d80 | 3 | |
| ahmedhedait | 17:68d4b4095d80 | 4 | #include "mbed.h" |
| ahmedhedait | 17:68d4b4095d80 | 5 | #include "N5110.h" |
| ahmedhedait | 17:68d4b4095d80 | 6 | #include "Gamepad.h" |
| ahmedhedait | 18:d18b9185fa4f | 7 | #include "Maze.h" |
| ahmedhedait | 18:d18b9185fa4f | 8 | #include "Ball.h" |
| ahmedhedait | 17:68d4b4095d80 | 9 | |
| ahmedhedait | 17:68d4b4095d80 | 10 | class MazeEngine |
| ahmedhedait | 17:68d4b4095d80 | 11 | { |
| ahmedhedait | 17:68d4b4095d80 | 12 | public: |
| ahmedhedait | 17:68d4b4095d80 | 13 | |
| ahmedhedait | 17:68d4b4095d80 | 14 | MazeEngine(); |
| ahmedhedait | 17:68d4b4095d80 | 15 | ~MazeEngine(); |
| ahmedhedait | 17:68d4b4095d80 | 16 | |
| ahmedhedait | 19:c6ebd1394bda | 17 | void init(); |
| ahmedhedait | 19:c6ebd1394bda | 18 | void read_input(Gamepad &pad); |
| ahmedhedait | 19:c6ebd1394bda | 19 | void draw(N5110 &lcd); |
| ahmedhedait | 20:041affa5e242 | 20 | void update(Gamepad &pad); |
| ahmedhedait | 19:c6ebd1394bda | 21 | |
| ahmedhedait | 17:68d4b4095d80 | 22 | private: |
| ahmedhedait | 17:68d4b4095d80 | 23 | |
| ahmedhedait | 19:c6ebd1394bda | 24 | Maze _maze; |
| ahmedhedait | 20:041affa5e242 | 25 | Direction _dir; |
| ahmedhedait | 20:041affa5e242 | 26 | Ball _ball; |
| ahmedhedait | 19:c6ebd1394bda | 27 | |
| ahmedhedait | 17:68d4b4095d80 | 28 | }; |
| ahmedhedait | 17:68d4b4095d80 | 29 | #endif |