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:
- 27:e73dd64ef334
- Parent:
- 23:1ee8686af747
- Child:
- 28:a38070a1cdcf
- Child:
- 29:d85886364643
diff -r bce40bf4c9fc -r e73dd64ef334 main.cpp --- a/main.cpp Tue Apr 09 01:36:47 2019 +0000 +++ b/main.cpp Tue Apr 09 18:46:14 2019 +0000 @@ -1,12 +1,10 @@ #include "mbed.h" #include "N5110.h" #include "Gamepad.h" -#include "Minerengine.h" -#include "Levelengine.h" -#include "Gameengine.h" +#include "Levelobjects.h" Key _k; -Gameengine game; +Levelobjects obj; Gamepad pad; N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); AnalogIn pot0(PTB2); @@ -26,7 +24,7 @@ contrast(); render(); - game.update(lcd, pad); + obj.update(lcd, pad); restart(); wait(0.1); } @@ -42,12 +40,12 @@ pad.init(); pad.leds_off(); contrast(); - game.game_init(); + obj.game_init(); } void render() { - game.draw(_k, lcd, pad); + obj.draw(_k, lcd, pad); } void contrast() @@ -73,7 +71,7 @@ void restart() { - if (game.game_over() == true) { + if (obj.game_over() == true) { lcd.clear(); lcd.printString("Game Over! ",16,1); lcd.printString("Press reset to try again! ",0,3);