mirror of
https://github.com/tiennm99/gomoku.git
synced 2026-07-17 00:16:56 +00:00
Server-side tests driving state machine through PVP→leave→PVE in every permutation: - TestFlow_CreatePveAfterPvpLeave: finished PVP game → ClientExit from gameoverState → StateHome → CreatePveRoom → verify PVE room with AI. - TestFlow_CreatePveAfterPvpRematch: the specific residue case flagged in the bug report. PVP → GameReset (rematch, closes RematchCh + fresh GameOverCh) → force game 2 finished → ClientExit → StateHome → CreatePveRoom → verify clean new PVE room state. - TestFlow_CreatePveAfterPvpForfeit: mid-game forfeit via ClientExit from gamePvpState → StateHome (signalGameOver + broadcastForfeit + leaveRoom path) → CreatePveRoom. All pass. The server state machine has no stale residue that blocks PVE creation after a PVP session. If the reported symptom persists after rebuilding both server and client, it is a client-side issue (stale scene state, event handler accumulation) that needs a different repro and isolation.