Adam Baker 201166301

Dependencies:   mbed Gamepad N5110

Committer:
adambakerwa
Date:
Mon Apr 22 12:00:44 2019 +0000
Revision:
28:934bb0da48ab
Parent:
27:c0fa8e41743b
Child:
29:b2f63d8c1268
why hello there

Who changed what in which revision?

UserRevisionLine numberNew contents of line
adambakerwa 25:230e4163cb6b 1 #include "mbed.h"
adambakerwa 25:230e4163cb6b 2 #include "Gamepad.h"
adambakerwa 25:230e4163cb6b 3 #include "N5110.h"
adambakerwa 25:230e4163cb6b 4 #include "BlockheadEngine.h"
adambakerwa 25:230e4163cb6b 5
adambakerwa 25:230e4163cb6b 6 BlockheadEngine::BlockheadEngine()
adambakerwa 25:230e4163cb6b 7 {
adambakerwa 25:230e4163cb6b 8
adambakerwa 25:230e4163cb6b 9 }
adambakerwa 25:230e4163cb6b 10
adambakerwa 25:230e4163cb6b 11 BlockheadEngine::~BlockheadEngine()
adambakerwa 25:230e4163cb6b 12 {
adambakerwa 25:230e4163cb6b 13
adambakerwa 25:230e4163cb6b 14 }
adambakerwa 25:230e4163cb6b 15
adambakerwa 26:3319ddd5111d 16 void BlockheadEngine::init()
adambakerwa 26:3319ddd5111d 17 {
adambakerwa 26:3319ddd5111d 18 _move = _runner.init(_move);
adambakerwa 26:3319ddd5111d 19 _pos = _lev.init(_pos);
adambakerwa 28:934bb0da48ab 20
adambakerwa 27:c0fa8e41743b 21
adambakerwa 26:3319ddd5111d 22 }
adambakerwa 26:3319ddd5111d 23
adambakerwa 25:230e4163cb6b 24 int BlockheadEngine::playgame(N5110 &lcd, Gamepad &pad)
adambakerwa 25:230e4163cb6b 25 {
adambakerwa 25:230e4163cb6b 26
adambakerwa 25:230e4163cb6b 27 _move = _runner.nextLevel(_move);
adambakerwa 25:230e4163cb6b 28 _pos = _lev.whatLevel(lcd, _move.l);
adambakerwa 25:230e4163cb6b 29 _move = _runner.blockhead(_move, _pos, lcd, pad);
adambakerwa 27:c0fa8e41743b 30 _gameover = _runner.gameoverFlag(_move);
adambakerwa 27:c0fa8e41743b 31
adambakerwa 25:230e4163cb6b 32
adambakerwa 25:230e4163cb6b 33 return _gameover;
adambakerwa 25:230e4163cb6b 34 }
adambakerwa 25:230e4163cb6b 35