Skip to content

Commit

Permalink
[FIX] 솝커톤 세션 판별 메소드 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
dragontaek-lee committed Feb 28, 2024
1 parent ad1063b commit b100117
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ private Attendance getNowAttendance(List<Attendance> attendances) {
}

private int getAttendanceIndex(List<Attendance> attendances) {
val isMultipleAttendance = (
LocalDateTime.now().getHour() >= valueConfig.getHACKATHON_LECTURE_START_HOUR()
&& attendances.size() == valueConfig.getMAX_LECTURE_COUNT()
);
val isMultipleAttendance = getIsMultipleAttendance(attendances.size());
return isMultipleAttendance ? 1 : 0;
}
private boolean getIsMultipleAttendance(int lectureCount) {
return LocalDateTime.now().getHour() >= valueConfig.getHACKATHON_LECTURE_START_HOUR()
&& lectureCount == valueConfig.getMAX_LECTURE_COUNT();
}

private SubAttendance getNowSubAttendance(List<SubAttendance> subAttendances, Lecture lecture) {
val index = getSubAttendanceIndex(lecture);
Expand Down

0 comments on commit b100117

Please sign in to comment.