Skip to content

Commit

Permalink
fix : 대성 시간표 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
DHkimgit committed Dec 16, 2024
1 parent 48eaafc commit 4533dbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ public final class ExpressBusSchedule {
LocalTime.of(22, 5)
);

public static List<LocalTime> getExpressBusScheduleToKoreaTech() {
public static List<LocalTime> TerminalToKoreaTech() {
return KOREA_TECH_SCHEDULE;
}

public static List<LocalTime> getExpressBusScheduleToTerminal() {
public static List<LocalTime> KoreaTechToTerminal() {
return TERMINAL_SCHEDULE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ExpressBusRouteStrategy implements BusRouteStrategy {

@Override
public List<ScheduleInfo> findSchedule(BusRouteCommand command) {
if(validCourse(command.depart(), command.arrive())) return Collections.emptyList();
if(validRoute(command.depart(), command.arrive())) return Collections.emptyList();
BusDirection direction = getRouteDirection(command.depart(), command.arrive());

return getStaticExpressBusScheduleTimeList(direction).stream()
Expand All @@ -36,8 +36,8 @@ public boolean support(BusRouteType type) {

private List<LocalTime> getStaticExpressBusScheduleTimeList(BusDirection direction) {
return switch (direction) {
case NORTH -> ExpressBusSchedule.getExpressBusScheduleToKoreaTech();
case SOUTH -> ExpressBusSchedule.getExpressBusScheduleToTerminal();
case NORTH -> ExpressBusSchedule.KoreaTechToTerminal();
case SOUTH -> ExpressBusSchedule.TerminalToKoreaTech();
};
}

Expand All @@ -46,7 +46,7 @@ private BusDirection getRouteDirection(BusStation depart, BusStation arrive) {
? BusDirection.NORTH : BusDirection.SOUTH;
}

private boolean validCourse(BusStation depart, BusStation arrive) {
private boolean validRoute(BusStation depart, BusStation arrive) {
return (depart == BusStation.STATION || arrive == BusStation.STATION);
}
}

0 comments on commit 4533dbe

Please sign in to comment.