![](/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:
- 29:b2f63d8c1268
- Parent:
- 28:934bb0da48ab
- Child:
- 31:bf765e3961f1
File content as of revision 29:b2f63d8c1268:
#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); // char buffer[14]; // sprintf(buffer,"%i", _move.go); // lcd.printString(buffer,2,0); return _gameover; }