mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
Adds the server-side tournament mode driven through the strategy and factory interfaces from #7132: - Server_Tournament runs greedy Swiss pairing with rematch avoidance, byes, ceil(log2(n)) rounds, and best-of-N series via gamesPerMatch; match sub-games are spawned through the parent game's Server_MatchGameFactory implementation with players auto-joined and their submitted decks installed - Tournament lifecycle strategy gates the hub game start until all decks are submitted; match result strategy reports sub-game outcomes back to the parent tournament - Server_Game gains tournament state (isTournament flag, settings, parent link), protocol fields in getInfo/game state events, a full-lobby bypass for tournament hubs, and disconnectRemovesPlayer plumbing for upcoming draft modes - Match-game creation is deferred to the owning thread's event loop so room registration never nests lock orders; shared state is guarded by the tournament mutex |
||
|---|---|---|
| .. | ||
| libcockatrice/network | ||
| CMakeLists.txt | ||