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:
- 4:fcd80b40f257
- Parent:
- 3:53f0365461c0
- Child:
- 6:a0f3dbbc8d33
--- a/main.cpp Wed May 08 20:13:48 2019 +0000 +++ b/main.cpp Wed May 08 20:49:24 2019 +0000 @@ -14,7 +14,7 @@ #include "Engine.h" #define WALL_WIDTH 2 -#define WALL_GAP 8 +#define WALL_GAP 10 #define AVENGER_SIZE 2 #define STONE_SIZE 1 #define SPEED 2 @@ -34,12 +34,12 @@ void update_game(UserInput input); void render(); void welcome(); - +void endgame(); ///////////// functions //////////////// int main() { int fps = 10; - int avenger_score = _avenger.get_score(); + int avenger_score = eng.get_score(); init(); // initialise and then display welcome screen... welcome(); @@ -47,10 +47,9 @@ wait(1.0f/fps); // and wait for one frame period while (avenger_score >= 0) { - + int avenger_score = eng.get_score(); eng.read_input(pad); eng.update(pad); - render(); wait(1.0f/fps); } @@ -104,5 +103,4 @@ pad.tone(554.4,0.6); pad.tone(587.3,0.3); wait(0.1); - } } \ No newline at end of file