ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18ac

Dependencies:   mbed

Revision:
3:c61d0c70eda4
Parent:
2:7fa08670b1fc
Child:
4:17d5b53b8815
--- a/Game/Game.cpp	Tue May 26 16:26:12 2020 +0000
+++ b/Game/Game.cpp	Tue May 26 16:52:17 2020 +0000
@@ -79,16 +79,16 @@
     }
 }
 
-bool Game::death(N5110 &lcd,Gamepad &pad)
+int Game::death(N5110 &lcd,Gamepad &pad)
 {
     if (x < 1 || x > WIDTH-2) {                                 //if you hit the side walls you die
         while (1) {
             gameover(lcd, pad);
             if (pad.B_held()) {
-                return true;
+                return 2;
             }
             if (pad.start_held()) {
-                return false;
+                return 1;
             }
         }
     }
@@ -97,10 +97,10 @@
         while (1) {
             gameover(lcd, pad);
             if (pad.B_held()) {
-                return true;
+                return 2;
             }
             if (pad.start_held()) {
-                return false;
+                return 1;
             }
         }
     }
@@ -109,15 +109,15 @@
             while (1) {
                 gameover(lcd, pad);
                 if (pad.B_held()) {
-                    return true;
+                    return 2;
                 }
                 if (pad.start_held()) {
-                    return false;
+                    return 1;
                 }
             }
         }
     }
-    return false;
+    return 0;
 }
 
 void Game::draw(N5110 &lcd,Gamepad &pad)