ELEC2645 (2018/19) / Mbed 2 deprecated el17arm

Dependencies:   mbed

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