Cockatrice/libcockatrice_protocol/libcockatrice/protocol/pb/event_tournament_state.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

22 lines
No EOL
572 B
Protocol Buffer

syntax = "proto2";
import "game_event.proto";
import "serverinfo_tournament.proto";
message Event_TournamentState {
extend GameEvent {
optional Event_TournamentState ext = 2027;
}
enum TournamentPhase {
PHASE_DECK_BUILDING = 0;
PHASE_PLAYING = 1;
PHASE_FINISHED = 2;
}
optional TournamentPhase phase = 1;
optional uint32 current_round = 2;
optional uint32 total_rounds = 3;
repeated TournamentPlayer players = 4;
repeated TournamentPairing pairings = 5;
optional TournamentSettings settings = 6;
}