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:
- 9:e70179ff61c5
- Parent:
- 3:489437d4ebd7
- Child:
- 10:3af708f38a42
--- a/main.cpp Tue Apr 24 11:17:43 2018 +0000 +++ b/main.cpp Tue Apr 24 15:29:17 2018 +0000 @@ -23,6 +23,7 @@ void init(); void render(); void welcome(); +void gameOver(); ///////////// functions //////////////// int main() @@ -34,15 +35,17 @@ render(); // drawing the initial frame wait(1.0f/fps); // wait for one frame period - + // game loop - while (1) { + while (game.get_gameOver1()!=1) { game.read_input(g_pad); game.update(g_pad,lcd); render(); wait(1.0f/fps); } + lcd.clear(); + gameOver(); } @@ -84,3 +87,15 @@ } +void gameOver() { + + lcd.printString(" Game Over!! ",0,1); + lcd.printString(" Try again ",0,3); + lcd.printString(" 'reset' ",0,5); + lcd.refresh(); + + } + + + +