示例#1
0
        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");
        }
示例#2
0
        public void Report(RoundBase round, TournamentIssues issue)
        {
            int    roundIndex  = GetIndexOf(round);
            string description = GetDescriptionFor(issue);

            Issues.Add(TournamentIssue.Create(roundIndex, -1, -1, description));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }
示例#5
0
        public void Report(Tournament tournament, TournamentIssues issue)
        {
            string description = GetDescriptionFor(issue);

            Issues.Add(TournamentIssue.Create(-1, -1, -1, description));
        }