AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

Revision:
8:e9fb60f5a56f
Parent:
5:be598835bab0
Child:
9:b587bae22691
diff -r baf207d88603 -r e9fb60f5a56f Airsofttimer.cpp
--- a/Airsofttimer.cpp	Sat Dec 13 12:43:59 2014 +0000
+++ b/Airsofttimer.cpp	Sat Dec 13 12:48:28 2014 +0000
@@ -13,12 +13,7 @@
 Airsofttimer::Airsofttimer(Pinouts pinouts){
     board = new Board(pinouts);   
     init();
-    
-    while(true){
-        Game* game = Game::create_game(board, 0);
-        game->run();
-        delete game;
-    }
+    start();
 }
 
 const char* Airsofttimer::LOGO[16] = {
@@ -35,3 +30,12 @@
     wait(5.0);
     board->lcd->cls(); 
 }
+
+void Airsofttimer::start(){
+    while(true){
+        // first we need to select a game from the available games list
+        Game* game = Game::create_game(board, 0);
+        game->run();
+        delete game;
+    }
+}
\ No newline at end of file