Skip to content

[3단계-사다리] 이지윤 미션 제출합니다. #65

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

Merged
merged 6 commits into from
Jun 9, 2025

Conversation

dd-jiyun
Copy link

@dd-jiyun dd-jiyun commented Jun 6, 2025

안녕하세요 주노 🍀
3단계도 잘부탁드립니다!


🤔 고민한 부분

Direction Enum 도입

요구사항에 Java Enum을 적용한다.을 어떻게 효율적으로 사용할 수 있을까 고민하다가 이번 사다리 게임의 움직임을 표현하는 Direction으로 적용 시켜봤어요!

  • 방향을 명확한 상수로 표현해서 가독성을 높일 수 있었던 것 같아요.
  • 앞으로 대각선과 같은 새로운 이동 방향이 추가되면 Enum에만 추가해서 코드의 수정이 최대한 적게 일어날 수 있게 했어요.

그리고 Enum 활용기를 참고했는데 제가 Enum을 효율적으로 잘 사용하고 있는걸까요? Direction에 포함시키면 좋을 로직이 더 있는지 궁금합니다.

Line과 Direction 역할 분배

Line 클래스에서 directionAt() 메서드를 통해 이동 방향을 반환하도록 설계했어요.

처음에는 방향 정보를 별도 객체가 담당해야 할지 고민했는데 Line이 Point 리스트를 갖고 있으니 방향 정보를 알려주는 책임도 함께 지는 게 자연스럽다고 판단했어요.

🙋🏻‍♀️ 궁금한 부분

  • 현재 테스트들이 주요 흐름을 잘 검증하고 있는지 궁금해요.
  • 제가 빠뜨린 테스트 케이스가 있는지 궁금합니다.
    • 추가적으로 궁금한 테스트 케이스가 있다면 말씀해주시면 좋을 것 같습니다!
  • Line이 Direction 역할을 가지는 설계에 대해 어떻게 생각하시나요?

Copy link

@Choi-JJunho Choi-JJunho left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!
빠르고 간결하게 3단계 미션을 잘 수행해주셨네요 👍
몇가지 코멘트 남겼으니 확인 부탁드릴게요!

Comment on lines 52 to 58
public static void printLadderResult(final Ladder ladder, final Width width) {
System.out.println();
for (int start = 0; start < width.value(); start++) {
int end = ladder.move(start);
System.out.println(start + LADDER_RESULT_ARROW + end);
}
}

Choose a reason for hiding this comment

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

view에서 move라는 도메인 로직이 수행되고 있네요!
다른 메소드들도 보니 view에 domain들이 노출되고 있는 형태로 보이는데요!

지난 미션에서 이야기했던 내용 중 DTO로 분리하는 시도를 해보는건 어떻게 생각하시나요?

Copy link
Author

Choose a reason for hiding this comment

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

InputView에 대해서는 DTO 분리를 생각했는데 OutputView는 놓쳤던 것 같아요.
DTO로 분리해볼게요 !

@jisoo78
Copy link

jisoo78 commented Jun 9, 2025

지윤님 안녕하세요 3단계 미션 고생했습니다~
언제 봐도 깔끔한 코드 많이 배우고 있습니다
이번 주도 화이팅!

@izzy80
Copy link

izzy80 commented Jun 9, 2025

3단계도 고생 많으셨어요! 홧팅입니당~ 😊

Copy link

@Choi-JJunho Choi-JJunho left a comment

Choose a reason for hiding this comment

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

잘 반영해주셨네요! 💯
구조도 깔끔하고 요구사항도 잘 만족해주셨습니다 👍

@boorownie boorownie merged commit 021c504 into next-step:dd-jiyun Jun 9, 2025
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.

5 participants