bugfixes, release 1.1
This commit is contained in:
@@ -45,22 +45,27 @@ void ResetChainGame(void)
|
||||
patternIndex = 0;
|
||||
patternFlag = false;
|
||||
firstpattern = false;
|
||||
cheatbutton = NONE;
|
||||
cheatbutton = 0;
|
||||
cheatButtonFlag = false;
|
||||
}
|
||||
|
||||
void HandleChainGame(void)
|
||||
{
|
||||
if (buttonIsPressed(ledpattern[patternIndex]) && !cheatButtonFlag)
|
||||
if (buttonIsPressed(ledpattern[patternIndex]) && !patternFlag && !cheatButtonFlag)
|
||||
{
|
||||
turnOnLed(ledpattern[patternIndex]);
|
||||
patternFlag = true;
|
||||
cheatbutton = 0;
|
||||
}
|
||||
else if (buttonIsPressed(cheatbutton) && !patternFlag && !cheatButtonFlag)
|
||||
{
|
||||
turnOnLed(cheatbutton);
|
||||
cheatButtonFlag = true;
|
||||
}
|
||||
else if (anybutton() && !patternFlag && !cheatButtonFlag )
|
||||
{
|
||||
cheatbutton = 0;
|
||||
}
|
||||
|
||||
if (!buttonIsPressed(ledpattern[patternIndex]))
|
||||
{
|
||||
@@ -71,7 +76,7 @@ void HandleChainGame(void)
|
||||
{
|
||||
turnOffLed(cheatbutton);
|
||||
cheatButtonFlag = false;
|
||||
cheatbutton = NONE;
|
||||
cheatbutton = 0;
|
||||
}
|
||||
|
||||
if (!anybutton())
|
||||
@@ -85,15 +90,15 @@ void HandleChainGame(void)
|
||||
}
|
||||
|
||||
//check cheatbuttons
|
||||
if (buttonIsPressed(1) && (cheatbutton == NONE))
|
||||
if (buttonIsPressed(4) && (cheatbutton == 0))
|
||||
{
|
||||
cheatbutton = 1;
|
||||
}
|
||||
else if (buttonIsPressed(2) && (cheatbutton == NONE))
|
||||
else if (buttonIsPressed(5) && (cheatbutton == 0))
|
||||
{
|
||||
cheatbutton = 2;
|
||||
}
|
||||
else if (buttonIsPressed(3) && (cheatbutton == NONE))
|
||||
else if (buttonIsPressed(6) && (cheatbutton == 0))
|
||||
{
|
||||
cheatbutton = 3;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "led.h"
|
||||
|
||||
#define TIMEOUT 15000 // 15sec * 1000ms
|
||||
#define GAMESELECTTIMEOUT 7000 // 7sec * 1000ms
|
||||
#define GAMESELECTTIMEOUT 5000 // 7sec * 1000ms
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user