Skip to content

Conversation

@ChiwooKim
Copy link

No description provided.

+ "네 | 아니오%n"),
RESULT("%n페어 매칭 결과입니다.%n"),
RESULT_DELIMITER(" : "),
RESET("%n초기화 되었습니다.%n");

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())) {

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;

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);
}

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<>();

Choose a reason for hiding this comment

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

clear() 를 함으로써 메모리 낭비를 줄이시는건 어떠실까요!

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