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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 29:d85886364643
- Parent:
- 27:e73dd64ef334
- Child:
- 30:6d6b48fe3679
--- a/main.cpp Tue Apr 09 18:46:14 2019 +0000 +++ b/main.cpp Wed Apr 10 00:50:14 2019 +0000 @@ -1,10 +1,10 @@ #include "mbed.h" #include "N5110.h" #include "Gamepad.h" -#include "Levelobjects.h" +#include "Gameengine.h" Key _k; -Levelobjects obj; +Gameengine game; Gamepad pad; N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); AnalogIn pot0(PTB2); @@ -24,7 +24,7 @@ contrast(); render(); - obj.update(lcd, pad); + game.update(lcd, pad); restart(); wait(0.1); } @@ -40,12 +40,12 @@ pad.init(); pad.leds_off(); contrast(); - obj.game_init(); + game.game_init(); } void render() { - obj.draw(_k, lcd, pad); + game.draw(_k, lcd, pad); } void contrast() @@ -71,7 +71,7 @@ void restart() { - if (obj.game_over() == true) { + if (game.game_over() == true) { lcd.clear(); lcd.printString("Game Over! ",16,1); lcd.printString("Press reset to try again! ",0,3);