Open
Conversation
lxxjn0
requested changes
Nov 16, 2022
lxxjn0
left a comment
There was a problem hiding this comment.
진우님, 미션 구현하시느라 수고 많으셨습니다!!
간단한 몇 가지에 대해서만 피드백 남겨두었는데 한 번 확인해보시고 반영 부탁드릴게요 :) 추가로 코드 전체적으로 컨벤션이 일관적이지 않는데 intellij에서 제공하는 코드 포맷터를 이용해보시는 것도 좋을 것 같아요!!
| } | ||
|
|
||
| if (index == points.size()) { | ||
| return points.get(index - 1) ? --index : index; |
| @@ -0,0 +1,24 @@ | |||
| package ladder.domain; | |||
|
|
|||
| public class Result | |||
There was a problem hiding this comment.
해당 코드는 도메인으로 관리되기엔 도메인 로직이 없는 객체 같아요!! 혹시 어떠한 의도로 생성했을까요?
| import java.util.List; | ||
| import java.util.stream.Collectors; | ||
|
|
||
| public class Results |
There was a problem hiding this comment.
해당 클래스도 일급 컬렉션으로 유의미하게 사용하고 싶다면 추가적인 도메인 로직을 담고 있다던지 하는게 더 좋을 것 같아요!!
| return ladderResultService; | ||
| } | ||
|
|
||
| public List<String> getLadderResult(String targetPlayer, List<User> userList |
There was a problem hiding this comment.
하나의 함수에 너무 많은 파라미터를 받고 있어요!! 한번 파라미터의 개수를 줄일 수 있도록 리팩토링 해보는 것은 어떨까요?
|
|
||
| private List<String> allLadderResult(List<User> userList, Ladder ladder, List<Result> results) { | ||
| return IntStream.range(0, userList.size()) | ||
| .mapToObj(index -> userList.get(index) + " : " + results.get(ladder.move(index))) |
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.
안녕하세요
3단계 완료해서 리뷰 부탁드립니다.