AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

Revision:
10:afc22465169e
Parent:
9:b587bae22691
Child:
11:50572814f73e
diff -r b587bae22691 -r afc22465169e Airsofttimer.cpp
--- a/Airsofttimer.cpp	Sat Dec 13 13:59:28 2014 +0000
+++ b/Airsofttimer.cpp	Sun Dec 14 11:50:19 2014 +0000
@@ -1,5 +1,6 @@
 
 #include "Airsofttimer.h"
+#include "games/GameSelector.h"
 
 //    buttonPin   = P0_4;    //P0.4
 //    keyPin      = P0_5;    //P0.5
@@ -43,19 +44,7 @@
 
 // show a list of games, and select one
 int Airsofttimer::select_game(){
-    board->lcd->cls();
-    board->lcd->printf("  DummyGame 1      \x02");
-    board->lcd->printf("  DummyGame 2       ");
-    board->lcd->printf("  DummyGame 3       ");
-    board->lcd->printf("  DummyGame 4      \x03");
-    
-    // draw arrows (refactor this later)
-    board->lcd->locate(0,0);
-    board->lcd->putc('\x00');
-    board->lcd->locate(0,19);
-    board->lcd->putc('\x02');
-    board->lcd->locate(3,19);
-    board->lcd->putc('\x03');
-    while(true){} // wait until selection is done
+    GameSelector* selector = new GameSelector(board);
+    selector->run();
     return 0;
 }
\ No newline at end of file