예제 #1
0
        public IEnumerable <Team> Determine_teams(IEnumerable <Competitor> competitors)
        {
            var shuffled_competitors = ListShuffle.Shuffle_list(competitors.ToArray());
            var pairs = ListPairing.Pairing_list(shuffled_competitors);

            return(Build_teams(pairs));
        }
예제 #2
0
        private IEnumerable <Fixture> Draw_fixtures(Options options, IEnumerable <Team> teams)
        {
            var shuffled_teams  = ListShuffle.Shuffle_list(teams.ToArray());
            var pairs           = ListPairing.Pairing_list(shuffled_teams);
            var max_sets_to_win = Calculate_max_sets_to_play(options.Sets, options.Tied);
            var fixtures        = Build_fixtures(pairs, options.Sets, max_sets_to_win).ToList();

            return(fixtures);
        }