mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-22 09:35:08 -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 |
||
|---|---|---|
| .. | ||
| game | ||
| CMakeLists.txt | ||
| room_message_type.h | ||
| server.cpp | ||
| server.h | ||
| server_abstractuserinterface.cpp | ||
| server_abstractuserinterface.h | ||
| server_database_interface.cpp | ||
| server_database_interface.h | ||
| server_player_reference.h | ||
| server_protocolhandler.cpp | ||
| server_protocolhandler.h | ||
| server_remoteuserinterface.cpp | ||
| server_remoteuserinterface.h | ||
| server_response_containers.cpp | ||
| server_response_containers.h | ||
| server_room.cpp | ||
| server_room.h | ||
| serverinfo_user_container.cpp | ||
| serverinfo_user_container.h | ||
| user_level.h | ||