James Cummins / Mbed 2 deprecated el17jnc

Dependencies:   mbed

Revision:
40:a1cdb6ab08af
Parent:
39:dfc489594f11
--- a/main.cpp	Thu May 09 01:58:36 2019 +0000
+++ b/main.cpp	Thu May 09 10:52:00 2019 +0000
@@ -17,7 +17,7 @@
 #include "SDFileSystem.h"
 
 #ifdef WITH_TESTS
-    #include "tests.h"
+#include "tests.h"
 #endif
 
 #define RADIUS 3
@@ -64,13 +64,13 @@
 int fps = 16;   //declared globally so it doesn't have to be passed to
                 //the different game mode functions
 int main(){
-    
+    init();             //first initialise all objects   
+     
 #ifdef WITH_TESTS                                   //run tests to check code is correct
     int test_failures = no_of_tests_failed();
-    if(test_failures > 0){ return test_failures; }      //main function returns no of failures
+    if(test_failures > 0) return test_failures;      //main function returns no of failures
 #endif
-    
-    init();             //first initialise all objects
+
     startscreen();      //then display the introductory screen
     while(1){                //keep game running until power is removed
         StartOption choice_selected = menu();           //get which mode user wants from the start menu