James Heavey / Mbed 2 deprecated EL17JH

Dependencies:   mbed

Revision:
124:d635e3154bf3
Parent:
123:39740c246fc2
Child:
127:5994f1a186e0
--- a/main.cpp	Wed May 08 15:59:38 2019 +0000
+++ b/main.cpp	Wed May 08 18:44:16 2019 +0000
@@ -8,6 +8,10 @@
 #include "Sprites.h"
 #include "SDFileSystem.h"
 
+#ifdef WITH_TESTING
+# include "tests.h"
+#endif
+
 /////////////// structs /////////////////
 
 struct UserInput {
@@ -61,6 +65,13 @@
 
 int main()
 {
+    
+#ifdef WITH_TESTING
+    int number_of_failures = run_all_tests();
+
+    if(number_of_failures > 0) return number_of_failures;
+#endif
+
     init();     // initialise the gamepad
     title_screen();  // run the title screen
 }
@@ -386,8 +397,8 @@
 
     char buffer2[14];
     sprintf(buffer2,"%2d",bonus);
-    lcd.printString(buffer2,WIDTH/2 + 14,3);
-    lcd.printString("  BONUS: ",2,3);
+    lcd.printString(buffer2,WIDTH/2 + 12,3);
+    lcd.printString(" BONUS: ",2,3);
 
     lcd.printString("   VICTORY! ",2,0);
     lcd.printString(" CONT = START ",0,4);
@@ -416,8 +427,8 @@
         lcd.clear();
 
         lcd.printString(buffer1,WIDTH/2 - 12,2);
-        lcd.printString(buffer2,WIDTH/2 + 14,3);
-        lcd.printString("  BONUS:",2,3);
+        lcd.printString(buffer2,WIDTH/2 + 12,3);
+        lcd.printString(" BONUS:",2,3);
 
         lcd.printString("   VICTORY! ",2,0);
         lcd.printString(" CONT = START ",0,4);