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.cpp@19:c6ebd1394bda, 2018-05-08 (annotated)
- Committer:
- ahmedhedait
- Date:
- Tue May 08 11:32:13 2018 +0000
- Revision:
- 19:c6ebd1394bda
- Parent:
- 17:68d4b4095d80
- Child:
- 20:041affa5e242
I have implemented the drawing of the maze into its own class.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ahmedhedait | 17:68d4b4095d80 | 1 | #include "MazeEngine.h" |
ahmedhedait | 17:68d4b4095d80 | 2 | // nothing doing in the constructor and destructor |
ahmedhedait | 17:68d4b4095d80 | 3 | MazeEngine::MazeEngine() |
ahmedhedait | 17:68d4b4095d80 | 4 | { |
ahmedhedait | 17:68d4b4095d80 | 5 | |
ahmedhedait | 17:68d4b4095d80 | 6 | } |
ahmedhedait | 17:68d4b4095d80 | 7 | |
ahmedhedait | 17:68d4b4095d80 | 8 | MazeEngine::~MazeEngine() |
ahmedhedait | 17:68d4b4095d80 | 9 | { |
ahmedhedait | 17:68d4b4095d80 | 10 | |
ahmedhedait | 19:c6ebd1394bda | 11 | } |
ahmedhedait | 19:c6ebd1394bda | 12 | |
ahmedhedait | 19:c6ebd1394bda | 13 | void MazeEngine::init() |
ahmedhedait | 19:c6ebd1394bda | 14 | { |
ahmedhedait | 19:c6ebd1394bda | 15 | |
ahmedhedait | 19:c6ebd1394bda | 16 | } |
ahmedhedait | 19:c6ebd1394bda | 17 | |
ahmedhedait | 19:c6ebd1394bda | 18 | void MazeEngine::read_input(Gamepad &pad) |
ahmedhedait | 19:c6ebd1394bda | 19 | { |
ahmedhedait | 19:c6ebd1394bda | 20 | _d = pad.get_direction(); |
ahmedhedait | 19:c6ebd1394bda | 21 | } |
ahmedhedait | 19:c6ebd1394bda | 22 | |
ahmedhedait | 19:c6ebd1394bda | 23 | void MazeEngine::draw(N5110 &lcd) |
ahmedhedait | 19:c6ebd1394bda | 24 | { |
ahmedhedait | 19:c6ebd1394bda | 25 | // draw the elements in the LCD buffer |
ahmedhedait | 19:c6ebd1394bda | 26 | // maze |
ahmedhedait | 19:c6ebd1394bda | 27 | _maze.draw(lcd); |
ahmedhedait | 17:68d4b4095d80 | 28 | } |