[chore:] cleaned up some rubbish
This commit is contained in:
-38
@@ -659,44 +659,6 @@ public class CourseCrafter
|
||||
.FirstOrDefault(sport => sport.AlternativeNames.Contains(selectedCourseName));
|
||||
}
|
||||
|
||||
int getSemesterForSport2(Sport sp, List<string> 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<string> interestedStudents)
|
||||
{
|
||||
int[] totalCoursesPerSemester = new int[4];
|
||||
|
||||
Reference in New Issue
Block a user