![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Adam Baker 201166301
Dependencies: mbed Gamepad N5110
BlockheadEngine/BlockheadEngine.cpp
- Committer:
- adambakerwa
- Date:
- 2019-05-02
- Revision:
- 34:911d7d05a8d2
- Parent:
- 32:06344b45bbab
- Child:
- 35:7d69c0822ea9
File content as of revision 34:911d7d05a8d2:
#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); } void BlockheadEngine::continueInit() { _move = _runner.continue_init(_move); _pos = _lev.init(_pos); } int BlockheadEngine::playgame(N5110 &lcd, Gamepad &pad) { _level = _runner.next_level(); _pos = _lev.whatLevel(lcd, _level); _move = _runner.blockhead(_move, _pos, lcd, pad); _gameover = _runner.gameover_flag(_move, pad); // char buffer[14]; // sprintf(buffer,"%i", _move.go); // lcd.printString(buffer,2,0); return _gameover; }