Rafael Lobão - 2026-09-12

I found a reliable way to reproduce a similar issue.

The statistics work correctly when:

  1. Start a new game.
  2. Make a move.
  3. Close the app.
  4. Reopen the app.
  5. Continue playing.

In this case, the game is not counted as a new attempt.

However, the problem occurs when all moves are undone before closing the app:

  1. Start a new game.
  2. Make a move.
  3. Undo the move, returning the game to its initial state.
  4. Close the app.
  5. Reopen the app.
  6. Make another move.

In this case, the game is counted as a new attempt, even though it was already counted when the first move was made.

I believe the problem is related to "mGameStarted" being restored based on whether "mMoveHistory" is empty.

After making and then undoing a move, the state before closing the app is effectively:

  • "mGameStarted = true"
  • "mMoveHistory" is empty

When the game is loaded again, "mGameStarted" is apparently reconstructed from the move history. Since the history is empty, it becomes "false". The next move then causes "MarkAttempt()" to be called again.