Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: lib/GameEngine/GameEngine.cpp
- Revision:
- 10:28575a6eaa13
- Child:
- 11:b288d01533cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/GameEngine/GameEngine.cpp Tue May 07 22:49:13 2019 +0000 @@ -0,0 +1,33 @@ +/* +ELEC2645 Project +GameEngine.cpp +Class file for GameEngine in Donkey Kong game. +*/ + +#include "GameEngine.h" + + +GameEngine::GameEngine() +{ + +} + +GameEngine::~GameEngine() +{ + +} + +void GameEngine::gameengine_run(Gamepad &pad, N5110 &lcd, Barrel &barrel, Banana &banana, Donkey &dky) { + wait_ms(250); + barrel.running = 1; + while (barrel.running == 1 || (pad.check_event(Gamepad::BACK_PRESSED) == false)) { + //printf("Game State"); + lcd.clear(); + lcd.printString("Game",0,0); + dky.donkeykong_movement(pad, lcd); + barrel.barrel_drop(pad, lcd, dky); + banana.banana_drop(pad, lcd, barrel, dky); + lcd.refresh(); + wait_ms(1.0f/24); + } +}