Open
Conversation
brainbackdoor
requested changes
Apr 21, 2025
brainbackdoor
left a comment
There was a problem hiding this comment.
안녕하세요! 미션 진행하느라 고생하셨어요~ 👍🏻
전반적으로 잘 작성해주셨는데요. 프로그래밍 요구사항을 준수하지 않은 부분들이 있어 우선 Request Chages 해요~ 좋은 하루 보내세요! 👋🏻
Comment on lines
+27
to
+33
| while (iterator.hasNext()) { | ||
| boolean cur = iterator.next(); | ||
| if (prev && cur) { | ||
| throw new IllegalArgumentException("Ladder lines cannot be connected continuously."); | ||
| } | ||
| prev = cur; | ||
| } |
There was a problem hiding this comment.
- indent 2를 허용하지 않는 등 기존 미션의 프로그래밍 요구사항도 준수하셔야 해요~
Comment on lines
+36
to
+45
| @Override | ||
| public String toString() { | ||
| final StringBuilder sb = new StringBuilder(); | ||
| for (Boolean line : lines) { | ||
| sb.append("|"); | ||
| sb.append(line ? "--------": " "); | ||
| } | ||
| sb.append("|"); | ||
| return sb.toString(); | ||
| } |
There was a problem hiding this comment.
- Presentation Layer와의 결합이 발생할 우려가 있네요. 위와 같이 작성하는게 현재 수준에서는 합리적이긴 하다는 생각이 들기는 하는데요. View Model과의 결합을 한번 분리해보시죠~
Comment on lines
+44
to
+70
| public static List<String> getPersonNameInput(String prompt, String delimiter) { | ||
| System.out.println(prompt); | ||
| while (true) { | ||
| String line = scanner.nextLine(); | ||
|
|
||
| String[] split = line.split(delimiter); | ||
| if (split.length == 0) { | ||
| System.out.println("이름은 하나 이상 입력되어야 합니다. 다시 입력해 주세요."); | ||
| continue; | ||
| } | ||
|
|
||
| List<String> result = Arrays.stream(split) | ||
| .map(String::trim) | ||
| .filter(s -> !s.isEmpty()) | ||
| .collect(Collectors.toList()); | ||
|
|
||
| if (split.length != result.size()) { | ||
| System.out.println("이름은 중복될 수 없습니다. 다시 입력해 주세요."); | ||
| continue; | ||
| } | ||
|
|
||
| if (result.stream().allMatch(s -> s.length() <= PersonName.MAX_NAME_LENGTH)) { | ||
| return result; | ||
| } | ||
|
|
||
| System.out.println("이름은 최대 5글자까지 사용 가능합니다. 다시 입력해 주세요."); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
리뷰 부탁드려요!
LadderLineGenerator 클래스에서 랜덤으로 사다리 라인 생성하는 건 테스트 코드를 작성하지 않았는데, 단순히 mocking 테스트를 작성하는 건 LadderLine 테스트 코드와 겹친다고 생각해서 의미가 없다고 생각했습니다.