Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step3 (사다리 게임 실행) 리뷰 요청드립니다. #446

Merged
merged 18 commits into from
Jun 16, 2020

Conversation

xlffm3
Copy link

@xlffm3 xlffm3 commented Jun 12, 2020

안녕하세요.

코멘트 남겨주신 두 가지 부분의 피드백 반영해서 코드를 수정했습니다. 확인 부탁드립니다. :)


안녕하세요 코드가 맘에 안들어서 계속 갈아 엎다보니 시간도 오래 소요되고, 커밋 단위도 뭔가 커졌네요. 처음에는 작게 유지하려고 노력했는데... ㅠ ㅠ

  • Main 함수의 while (true)
    • 요구 사항에서 2번 정도 게임 결과를 조회하는데, 이게 정확히 2번만 묻는건지 무한 반복인지 명확하게 몰라서 일단 while로 loop 돌게 해두었습니다. :(

Test 메소드명을 한글로 지어도 무방할까요?

  • 영어로 쓰다보면 길어지는 경우가 많아서 문의드립니다.

그 외 부족한 부분 코멘트 부탁드립니다.

Copy link

@ssosso ssosso left a comment

Choose a reason for hiding this comment

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

미션 반영을 잘 해주셨네요 💯
열심히 해주신 만큼 리뷰를 더 많이 해드리고 싶지만...구조가 깔끔해서 쉽지 않네요 👍
간단한 피드백 남겼습니다. 확인 부탁드려요~!

@DisplayName("Direction Enum 객체 정상 생성 테스트")
@ParameterizedTest
@MethodSource("mockDirectionBuilder")
public void getDirection(int index, Direction expectedDirection) {
Copy link

Choose a reason for hiding this comment

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

질문 주신 부분에 답변을 드리자면 테스트는 한글로 명시해도 문제 없습니다.
실제로 배포시에는 컴파일에 포함되지 않아서요ㅎ

List<Player> players = playerNames.stream()
.map(Player::new)
.collect(Collectors.toList());
return new PlayersGroup(players);
}

private static void validatePlayerCounts(List<String> playerNames) {
if (playerNames.size() < MINIMUM_PLAYER_COUNTS) {
Copy link

Choose a reason for hiding this comment

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

playerNames.size()
를 중복으로 호출하는데 한번으로 리펙토링 가능해 보입니다.

if (randomNumber < RANDOM_NUMBER_BOUNDARY) {
return new Point(false);
public static Point drawFirstPoint(boolean isDown) {
if (isDown) {
Copy link

Choose a reason for hiding this comment

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

개인적으로 이런 로직에서는 삼항연산자를 사용하는게 깔끔해 보이더라구요.
어떻게 생각하시나요?

Copy link
Author

Choose a reason for hiding this comment

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

로직이 복잡하지 않아서 그 편이 더 간결하고 눈에 확 들어오겠네요!!

Copy link

@ssosso ssosso left a comment

Choose a reason for hiding this comment

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

리뷰 반영 잘 해주셨네요 💯
머지하겠습니다. 다음 단계 진행해 주세요~!

@ssosso ssosso merged commit ceb3eda into next-step:xlffm3 Jun 16, 2020
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