Skip to content

Conversation

@hyunseong0307
Copy link

No description provided.

Copy link

@dradnats1012 dradnats1012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 👍
몇가지 리뷰만 확인해주세요!!

printer.printWinners(game.findWinners());
}

private static List<Car> inputCarNames() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static으로 선언한 이유가 있을까요?
다른 방식은 없었는지 궁금합니당

Comment on lines +39 to +41
} catch (NumberFormatException e) {
throw new IllegalArgumentException("숫자를 입력해야 합니다.");
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

음수가 들어오면 어떻게 될까요?

}

public void move() {
if (Randoms.pickNumberInRange(0, 9) >= 4)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

랜덤 숫자를 만드는 함수로 빼도 좋을 것 같아요
ex) power()

Comment on lines +22 to +26
for (Car car : cars) {
if (car.getPosition() > fastest) {
fastest = car.getPosition();
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findFastest() 라는 메서드로 뺼 수 있을 것 같아요!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

출력관련 클래스를 만드셨네요 👍

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

입력 관련 클래스도 만들 수 있을 것 같아요!

Comment on lines +27 to +29
if (carName.length() > 5) {
throw new IllegalArgumentException("자동차 이름은 5자 이하만 가능합니다.");
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

차 이름에 대한 검증을 메인클래스에서 진행하는게 어색하네요
Car 클래스나 따로 CarName이라는 클래스를 만들어서 진행하는 방법은 어떠신가요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants