![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Adam Baker 201166301
Dependencies: mbed Gamepad N5110
BlockheadEngine/BlockheadEngine.cpp
- Committer:
- adambakerwa
- Date:
- 2019-04-22
- Revision:
- 27:c0fa8e41743b
- Parent:
- 26:3319ddd5111d
- Child:
- 28:934bb0da48ab
File content as of revision 27:c0fa8e41743b:
#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.gameoverFlag(_move); return _gameover; }