diff --git a/crafter.cs b/crafter.cs index 92d420b..008bffc 100644 --- a/crafter.cs +++ b/crafter.cs @@ -659,44 +659,6 @@ public class CourseCrafter .FirstOrDefault(sport => sport.AlternativeNames.Contains(selectedCourseName)); } - int getSemesterForSport2(Sport sp, List interestedStudents) - { - int[] semcount = new int[4]; - - foreach (var inst in GeneratedCourses) - semcount[inst.Semester - 1]++; - - int bestSem = 0; - int minCourses = int.MaxValue; - - for (int i = 0; i < 4; i++) - { - if (sp.Semester[i] == 0) continue; - - int sportCoursesInSemester = GeneratedCourses - .Count(g => g.Semester == i + 1 && g.Instance.Sport.Name == sp.Name); - - if (sportCoursesInSemester >= sp.Semester[i]) - continue; - - int freeInterestedStudents = interestedStudents - .Distinct() - .Count(studentId => !students_in_semester[i].Contains(studentId)); - - if (freeInterestedStudents < getEffectiveMinStudents(sp, i + 1)) - continue; - - if (semcount[i] < Settings.Instance.NumCoursesPerSemester && - semcount[i] < minCourses) - { - minCourses = semcount[i]; - bestSem = i + 1; - } - } - - return bestSem; - } - int getSemesterForSport(Sport sp, List interestedStudents) { int[] totalCoursesPerSemester = new int[4];