fix results screen for final tournament match
This commit is contained in:
@@ -145,6 +145,8 @@ shared_ptr<const ServerBase> Server::base() const {
|
||||
}
|
||||
|
||||
int8_t Server::get_winner_team_id() const {
|
||||
// Note: This function is not part of the original implementation.
|
||||
|
||||
parray<size_t, 2> team_player_counts(0);
|
||||
parray<size_t, 2> team_win_flag_counts(0);
|
||||
for (size_t client_id = 0; client_id < 4; client_id++) {
|
||||
|
||||
@@ -345,6 +345,10 @@ shared_ptr<Tournament::Match> Tournament::next_match_for_team(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
shared_ptr<Tournament::Match> Tournament::get_final_match() const {
|
||||
return this->final_match;
|
||||
}
|
||||
|
||||
void Tournament::start() {
|
||||
if (this->current_state != State::REGISTRATION) {
|
||||
throw runtime_error("tournament has already started");
|
||||
|
||||
@@ -104,6 +104,7 @@ public:
|
||||
std::shared_ptr<Team> get_team(size_t index) const;
|
||||
std::shared_ptr<Team> get_winner_team() const;
|
||||
std::shared_ptr<Match> next_match_for_team(std::shared_ptr<Team> team) const;
|
||||
std::shared_ptr<Match> get_final_match() const;
|
||||
void start();
|
||||
|
||||
void print_bracket(FILE* stream) const;
|
||||
|
||||
Reference in New Issue
Block a user