38 lines
824 B
C++
38 lines
824 B
C++
//======================================================
|
|
// MAIN PROGRAM LOOP
|
|
//======================================================
|
|
|
|
/* game selector is the main function that tell the game groutine
|
|
* which game to be JSONed and at what parameters
|
|
*/
|
|
|
|
void game_selector(String game, String settings)
|
|
{
|
|
// Kick Counter Game
|
|
if(game == "ct") {
|
|
terminal(GM_COUNTER);
|
|
game_counter_bluetooth(settings);
|
|
return;
|
|
}
|
|
|
|
// Time Attack Game
|
|
else if(game == "ta") {
|
|
terminal(GM_TATTACK);
|
|
time_attack_bluetooth(settings);
|
|
return;
|
|
}
|
|
|
|
// Time Attack Game
|
|
else if(game == "ra") {
|
|
terminal(GM_REACTION);
|
|
game_reaction_bluetooth(settings);
|
|
return;
|
|
}
|
|
|
|
// Unknown Game
|
|
else {
|
|
dualcomm(UNKNOWN_GAME);
|
|
return;
|
|
}
|
|
}
|