boolean perfectMatch = false;
Score bestScore = DefaultHardAndSoftScore.valueOf(Integer.MIN_VALUE, Integer.MIN_VALUE);
Period bestPeriod = null;
Room bestRoom = null;
for (PeriodScoring periodScoring : periodScoringList) {
if (bestScore.compareTo(periodScoring.getScore()) >= 0) {
// No need to check the rest
break;
}
for (ExamToHandle examToHandle : examToHandleList) {
examToHandle.getExam().setPeriod(periodScoring.getPeriod());