private string GetDescriptionFor(TournamentIssues issue) { switch (issue) { case TournamentIssues.NotFillingAllGroupsWithPlayers: return("Current player count does not fill all group(s) to capacity. Add more players or reduce group capacity."); case TournamentIssues.RoundDoesNotSynergizeWithPreviousRound: return("Round does not synergize with previous round. Advancing players from previous round will not fill the groups within the current round to capacity."); case TournamentIssues.AdvancersCountInRoundIsGreaterThanParticipantCount: return("Round can't have advancing per group count equal or greather than players per group count."); case TournamentIssues.LastRoundContainsMoreThanOneGroup: return("Last round should not contain more than one group. Increase group capacity until all players will fit into one group."); case TournamentIssues.LastRoundHasMoreThanOneAdvancers: return("Last round should not have more than one player that advances."); case TournamentIssues.StartDateTimeIsInThePast: return("Start date time must be a future date"); case TournamentIssues.StartDateTimeIncompatibleWithPreviousRound: return("Start date time can't be earlier than any match in previous round."); case TournamentIssues.StartDateTimeIncompatibleWithGroupRules: return("Start date time does not work with group rules"); } // LOG Error: Invalid issue given when fetching issue description return("N/A"); }
public void Report(RoundBase round, TournamentIssues issue) { int roundIndex = GetIndexOf(round); string description = GetDescriptionFor(issue); Issues.Add(TournamentIssue.Create(roundIndex, -1, -1, description)); }
public void Report(GroupBase group, TournamentIssues issue) { int roundIndex = GetIndexOf(group.Round); int groupIndex = GetIndexOf(group); string description = GetDescriptionFor(issue); Issues.Add(TournamentIssue.Create(roundIndex, groupIndex, -1, description)); }
public void Report(Match match, TournamentIssues issue) { int roundIndex = GetIndexOf(match.Group.Round); int groupIndex = GetIndexOf(match.Group); int matchIndex = GetIndexOf(match); string description = GetDescriptionFor(issue); Issues.Add(TournamentIssue.Create(roundIndex, groupIndex, matchIndex, description)); }
public void Report(Tournament tournament, TournamentIssues issue) { string description = GetDescriptionFor(issue); Issues.Add(TournamentIssue.Create(-1, -1, -1, description)); }