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; } }
public IEnumerable<Fixture> CreateFixtures(TournamentSeason season, IEnumerable<DateTime> dates) { var scheduler = new Scheduler(); return scheduler.ScheduleLeagueFixtures(season, dates, HasReturnRound, Teams); }