![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Adam Baker 201166301
Dependencies: mbed Gamepad N5110
BlockheadEngine/BlockheadEngine.cpp
- Committer:
- adambakerwa
- Date:
- 2019-04-21
- Revision:
- 26:3319ddd5111d
- Parent:
- 25:230e4163cb6b
- Child:
- 27:c0fa8e41743b
File content as of revision 26:3319ddd5111d:
#include "mbed.h" #include "Gamepad.h" #include "N5110.h" #include "BlockheadEngine.h" BlockheadEngine::BlockheadEngine() { } BlockheadEngine::~BlockheadEngine() { } void BlockheadEngine::init() { _move = _runner.init(_move); _pos = _lev.init(_pos); } int BlockheadEngine::playgame(N5110 &lcd, Gamepad &pad) { _move = _runner.nextLevel(_move); _pos = _lev.whatLevel(lcd, _move.l); _move = _runner.blockhead(_move, _pos, lcd, pad); _gameover = _runner.gameover(_move, _pos, lcd); return _gameover; }