private bool CrossoverClassroom(Schedule first, Schedule second) { try { Classroom temp; temp = first.classroom; first.classroom = second.classroom; second.classroom = temp; return true; } catch (Exception) { return false; } }
private bool CrossoverClassroom(Schedule first, Schedule second) { try { Classroom temp; temp = first.classroom; first.classroom = second.classroom; second.classroom = temp; first.section.whichCourse.semester.curriculum.isFitnessChanged = true; return true; } catch (Exception) { return false; } }
private bool CrossoverHour(Schedule first, Schedule second) { try { int tempFirst, tempSec; tempFirst = first.startHour; tempSec = first.endHour; first.startHour = second.startHour; first.endHour = second.endHour; second.startHour = tempFirst; second.endHour = tempSec; return true; } catch (Exception) { return false; } }
private bool CrossoverDay(Schedule first, Schedule second) { try { int day; day = first.whichDay; first.whichDay = second.whichDay; second.whichDay = day; first.section.whichCourse.semester.curriculum.isFitnessChanged = true; return true; } catch (Exception) { return false; } }
private bool CrossoverHour(Schedule first, Schedule second) { try { int tempFirst, tempSec; tempFirst = first.startHour; tempSec = first.endHour; first.startHour = second.startHour; first.endHour = second.endHour; second.startHour = tempFirst; second.endHour = tempSec; first.section.whichCourse.semester.curriculum.isFitnessChanged = true; return true; } catch (Exception) { return false; } }