send tournament bracket updates when any match is complete

This commit is contained in:
Martin Michelsen
2022-12-12 21:54:53 -08:00
parent e858b2101d
commit 391a70f68d
5 changed files with 67 additions and 31 deletions
+4
View File
@@ -515,6 +515,10 @@ shared_ptr<Tournament::Team> Tournament::team_for_serial_number(
throw logic_error("serial number registered in tournament but not in any team");
}
const set<uint32_t>& Tournament::get_all_player_serial_numbers() const {
return this->all_player_serial_numbers;
}
void Tournament::start() {
if (this->current_state != State::REGISTRATION) {
throw runtime_error("tournament has already started");
+1
View File
@@ -107,6 +107,7 @@ public:
std::shared_ptr<Match> next_match_for_team(std::shared_ptr<Team> team) const;
std::shared_ptr<Match> get_final_match() const;
std::shared_ptr<Team> team_for_serial_number(uint32_t serial_number) const;
const std::set<uint32_t>& get_all_player_serial_numbers() const;
void start();