fixed chaingame and made simpleled game follow idx
This commit is contained in:
13
src/main.cpp
13
src/main.cpp
@@ -31,19 +31,26 @@ uint64_t GameSelectTimer = 0;
|
||||
void HandleIdle(void)
|
||||
{
|
||||
//green button first released
|
||||
if (buttonIsPressed(YELLOW) && !buttonIsPressed(RED) && buttonIsPressed(GREEN) && (nextGame == none))
|
||||
if (!buttonIsPressed(YELLOW) && buttonIsPressed(RED) && buttonIsPressed(GREEN) && (nextGame == none))
|
||||
{
|
||||
//prepare for next game
|
||||
nextGame = ChainGame;
|
||||
}
|
||||
|
||||
//yellow button first released
|
||||
if (buttonIsPressed(YELLOW) && buttonIsPressed(RED) && !buttonIsPressed(GREEN) & (nextGame == none))
|
||||
//red button first released
|
||||
if (buttonIsPressed(YELLOW) && !buttonIsPressed(RED) && buttonIsPressed(GREEN) & (nextGame == none))
|
||||
{
|
||||
//prepare for next game
|
||||
nextGame = magicSwitchBoard;
|
||||
}
|
||||
|
||||
//green button first released
|
||||
if (buttonIsPressed(YELLOW) && buttonIsPressed(RED) && !buttonIsPressed(GREEN) & (nextGame == none))
|
||||
{
|
||||
//prepare for next game
|
||||
nextGame = detectLED;
|
||||
}
|
||||
|
||||
//wait for all buttons to be switched off
|
||||
if (!anybutton())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user