-
Notifications
You must be signed in to change notification settings - Fork 461
[페어 매칭] #165
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
base: main
Are you sure you want to change the base?
[페어 매칭] #165
Conversation
| + "네 | 아니오%n"), | ||
| RESULT("%n페어 매칭 결과입니다.%n"), | ||
| RESULT_DELIMITER(" : "), | ||
| RESET("%n초기화 되었습니다.%n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
추후에 확장성을 위해서 기능들을 하드 코딩하지 않고 매개값으로 가져와서 출력하는 방법도 고민해보시면 좋을거 같습니다!
| if (option.equals(OptionCommand.RESET.getCommand())) { | ||
| reset(); | ||
| } | ||
| if (option.equals(OptionCommand.QUIT.getCommand())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이부분을 메서드로 만들면 더 깔끔할거 같아요! ex) OptionCommand.isQuit()
| while (true) { | ||
| matchingConditions = readConditions(); | ||
| if (matchingService.hasConditions(matchingConditions)) { | ||
| break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분에서 이미 매칭이 있어 break가 되면 반복문을 벗어나게 되어서 아래 리매칭을 묻는 부분이 진행이 안되지 않나요???
|
|
||
| public Pairs findPairs(MatchingConditions matchingConditions) { | ||
| return matchingRepository.search(matchingConditions); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
메시지를 보내 객체에게 일을시킨다를 잘 수행하신거같아요!
| } | ||
|
|
||
| public void reset() { | ||
| matchingRepository = new ArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clear() 를 함으로써 메모리 낭비를 줄이시는건 어떠실까요!
No description provided.