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.
Diff: main.cpp
- 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