AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
Diff: Airsofttimer.cpp
- Revision:
- 8:e9fb60f5a56f
- Parent:
- 5:be598835bab0
- Child:
- 9:b587bae22691
--- 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