Example #1
0
        public override void ScheduleFixtures(Action<Fixture> addFixture)
        {
            if (Phase == TournamentPhase.NotStarted)
            {
                var scheduler = new Scheduler();
                var fixtures = scheduler.ScheduleLeagueFixtures(this, Teams, StartDate, EndDate, DayOfWeek, Frequency, HasReturnRound);

                foreach (var fixture in fixtures)
                {
                    addFixture(fixture);
                }

                Phase = TournamentPhase.InProgress;
                NextSchedulingDate = null;
            }
        }
Example #2
0
 public IEnumerable<Fixture> CreateFixtures(TournamentSeason season, IEnumerable<DateTime> dates)
 {
     var scheduler = new Scheduler();
     return scheduler.ScheduleLeagueFixtures(season, dates, HasReturnRound, Teams);
 }