Cockatrice/libcockatrice_protocol/libcockatrice/protocol/pb/command_tournament.proto
Lukas Brübach dca6fdf17f
[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
2026-09-06 16:15:45 +02:00

31 lines
No EOL
923 B
Protocol Buffer

syntax = "proto2";
import "game_commands.proto";
import "serverinfo_tournament.proto";
message Command_ReportMatchResult {
extend GameCommand {
optional Command_ReportMatchResult ext = 1037;
}
optional sint32 game_id = 1 [default = -1];
// The winning player's ID. A drawn match is reported with is_draw set and
// winner_id left unset so a missing report stays distinguishable from a
// reported draw via has_winner_id().
optional sint32 winner_id = 2 [default = -1];
// Whether the match ended in a draw; winner_id is meaningless then.
optional bool is_draw = 3;
}
message Command_AdvanceTournament {
extend GameCommand {
optional Command_AdvanceTournament ext = 1038;
}
}
message Command_TournamentSettingsSelect {
extend GameCommand {
optional Command_TournamentSettingsSelect ext = 1039;
}
optional TournamentSettings settings = 1;
}