Adam Baker 201166301

Dependencies:   mbed Gamepad N5110

Committer:
adambakerwa
Date:
Sun Apr 21 21:55:54 2019 +0000
Revision:
26:3319ddd5111d
Parent:
25:230e4163cb6b
Child:
27:c0fa8e41743b
Got very basic menu working!!!!

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 26:3319ddd5111d 20 }
adambakerwa 26:3319ddd5111d 21
adambakerwa 25:230e4163cb6b 22 int BlockheadEngine::playgame(N5110 &lcd, Gamepad &pad)
adambakerwa 25:230e4163cb6b 23 {
adambakerwa 25:230e4163cb6b 24
adambakerwa 25:230e4163cb6b 25 _move = _runner.nextLevel(_move);
adambakerwa 25:230e4163cb6b 26 _pos = _lev.whatLevel(lcd, _move.l);
adambakerwa 25:230e4163cb6b 27 _move = _runner.blockhead(_move, _pos, lcd, pad);
adambakerwa 25:230e4163cb6b 28 _gameover = _runner.gameover(_move, _pos, lcd);
adambakerwa 25:230e4163cb6b 29
adambakerwa 25:230e4163cb6b 30 return _gameover;
adambakerwa 25:230e4163cb6b 31 }
adambakerwa 25:230e4163cb6b 32