Skip to content

Commit

Permalink
1.1.1 - Fix of non-fatal bug where resetting the game from a non-hex …
Browse files Browse the repository at this point in the history
…tile after winning would put it in a bad state
  • Loading branch information
scartier committed Feb 10, 2021
1 parent ddf6836 commit c8674f5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions blackout.ino
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,17 @@ void processCommForFace(Command command, byte value, byte f)
if (tileRole == TileRole_Tool)
#endif
{
gameState = GameState_Done;
setupNextRainbowColor(value);
showAnimation_BurstOutward(f);
// BUGFIX : While doing the winning rainbow burst, resetting the tiles by clicking a rune
// tile had a race condition where the hex tile would send out one last 'PuzzleSolved'
// message before resetting, causing the tile you just clicked to go back to
// rainbow. Now, once you reset the game on a tile, it cannot be considered
// solved again.
if (gameState != GameState_Init)
{
gameState = GameState_Done;
setupNextRainbowColor(value);
showAnimation_BurstOutward(f);
}
}
break;

Expand Down

0 comments on commit c8674f5

Please sign in to comment.