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.
Diff: MazeEngine/MazeEngine.cpp
- Revision:
- 20:041affa5e242
- Parent:
- 19:c6ebd1394bda
- Child:
- 21:bcc84d5cb068
diff -r c6ebd1394bda -r 041affa5e242 MazeEngine/MazeEngine.cpp --- a/MazeEngine/MazeEngine.cpp Tue May 08 11:32:13 2018 +0000 +++ b/MazeEngine/MazeEngine.cpp Tue May 08 11:57:19 2018 +0000 @@ -12,12 +12,17 @@ void MazeEngine::init() { - + _ball.init(); } void MazeEngine::read_input(Gamepad &pad) { - _d = pad.get_direction(); + _dir = pad.get_direction(); +} + +void MazeEngine::update(Gamepad &pad) +{ + _ball.update(_dir); } void MazeEngine::draw(N5110 &lcd) @@ -25,4 +30,7 @@ // draw the elements in the LCD buffer // maze _maze.draw(lcd); + + // ball + _ball.draw(lcd); } \ No newline at end of file