void getWinner() { if (Data.Team1Scores == Data.SCORES_TO_WIN) { winner = Data.Team.TEAM_1; } else { winner = Data.Team.TEAM_2; } }
void onScored(Data.Team team) { if (team == Data.Team.TEAM_1) { Data.Team1Scores++; } else { Data.Team2Scores++; } hud.UpdateScore(); if (Data.Team1Scores == Data.SCORES_TO_WIN || Data.Team2Scores == Data.SCORES_TO_WIN) { handleVictory(); } }