// Naive schedule fill - ensure all rules are met. Won't work with odd number of shifts public void FillSchedule() { bool tryAgain; do { tryAgain = false; _schedule.ClearSchedule(); try { for (int i = 0; i < _schedule.Shifts.Count / 2; i++) { PickTwo(); } } catch (Exception) { tryAgain = true; } } while (tryAgain); ScheduleFilled = true; }