fix(matchmaking): re-enqueue opens a new game, not the caller's own #82
Reference in New Issue
Block a user
Delete Branch "feature/reenqueue-opens-new-game"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
Starting a random-opponent game, then starting another "random opponent" with the same variant and per-turn rule while the first was still
open(no opponent joined yet), returned the same pending game — a fresh game was never created, so the player was stuck in the partment still awaiting an opponent.Fix
Removed the own-open short-circuit (step 1) in
store.OpenOrJoin. A re-enqueue now joins another player's open game (step 2) or opens a fresh one (step 3). Accumulation stays bounded byMaxActiveQuickGames, which already countsopengames.Updated the matchmaker/service/store Go-Doc comments and
docs/ARCHITECTURE.md. Flipped the pinning testTestMatchmakingReEnqueueReturnsOwnOpenGame→TestMatchmakingReEnqueueOpensNewGame.Tests
build/vet/gofmtclean.startingflag.