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.
lib/GameEngine/GameEngine.cpp
- Committer:
- Kern_EL17KJTF
- Date:
- 2019-05-07
- Revision:
- 10:28575a6eaa13
- Child:
- 11:b288d01533cc
File content as of revision 10:28575a6eaa13:
/* 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); } }