Ordering is a little off here, but I wanted to writeup about a bug I’m seeing in the ESPChess project (post to come) and how I intend to fix it.
The chessboard uses AWS IoT Shadow Service (MQTT accessed key-value store) to keep track of your and your opponents chess board state. It has a sequence number that’s incremeneted to flag when we should update our current state to match our opponents.
Once a game is finished, it shows who won the game. Once all the pieces are back in their starting position, it attempts to restart the game, and flip the black and white players around. The problem is, when testing this out with my father, that it’s not all that user friendly, and it’s a bit finicky. When a game is finished, the colors show the delta with the old game, and not a new game. I think the new logic should be: