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:
- 44:e29458976114
- Parent:
- 42:d81c008b0436
- Child:
- 45:bad704c546d4
--- a/main.cpp Wed Apr 17 02:00:31 2019 +0000 +++ b/main.cpp Wed Apr 17 19:57:33 2019 +0000 @@ -43,8 +43,6 @@ game.update(lcd, pad); restart(); wait(0.1); - - } @@ -66,6 +64,7 @@ { game.draw_l1(lcd, pad); game.draw_l2(lcd, pad); + game.draw_l3(lcd, pad); leds(); } @@ -95,7 +94,13 @@ lcd.printString("Score ",4,2); lcd.printString("Press reset to try again! ",0,4); lcd.printString("try again! ",16,5); - wait(1); + } + if (game.game_complete(lcd) == true) { + lcd.clear(); + game.get_score(lcd); + lcd.printString("YOU WIN!!! ",12,0); + lcd.printString("Score ",4,2); + lcd.printString("Well done!!!",12,4); } } @@ -103,7 +108,7 @@ { int l_leds[4] = {0b111,0b110,0b100,0b000}; int r_leds[4] = {0b111,0b110,0b100,0b000}; - + oxygen = l_leds[game.oxygen_leds()]; lives = r_leds[game.lives_leds()]; } \ No newline at end of file