mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-23 18:06:26 -07:00
[Protocol] Share tournament messages and report draws explicitly
- TournamentPlayer/TournamentPairing/TournamentSettings move into serverinfo_tournament.proto, imported by both the tournament event and the tournament game commands, so Command_CreateGame reaches them without crossing the command/event boundary - Command_CreateGame carries the full TournamentSettings instead of a duplicate games_per_match field, keeping game creation and mid-game changes on one wire representation - draw results are explicit: Command_ReportMatchResult and TournamentPairing gain is_draw, so a report stays distinguishable from an unset -1 winner - pairing match-wins are uint32 like the other game counts
This commit is contained in:
parent
e82b311c8b
commit
dca6fdf17f
5 changed files with 45 additions and 27 deletions
|
|
@ -1,4 +1,5 @@
|
|||
syntax = "proto2";
|
||||
import "serverinfo_tournament.proto";
|
||||
message RoomCommand {
|
||||
enum RoomCommandType {
|
||||
LEAVE_ROOM = 1000;
|
||||
|
|
@ -70,8 +71,8 @@ message Command_CreateGame {
|
|||
// share decklists with all players when selected
|
||||
optional bool share_decklists_on_load = 14;
|
||||
|
||||
// number of games per match in tournament mode (e.g. 3 for best of 3)
|
||||
optional uint32 games_per_match = 15 [default = 1];
|
||||
// tournament settings shared by game creation and mid-game changes
|
||||
optional TournamentSettings tournament_settings = 15;
|
||||
|
||||
// whether this is a tournament game
|
||||
optional bool is_tournament = 16;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue