Skip to content
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

[로또 미션] 최준호 미션 제출합니다. #45

Open
wants to merge 4 commits into
base: choi-jjunho
Choose a base branch
from

Conversation

Choi-JJunho
Copy link

작년 프리코스에 구현하고 오랜만에 구현하니 추억이 새록새록하네요
읽기좋은 코드 만들기 정말 어렵네요 ㅋㅋㅋㅋ

Copy link

@ImTotem ImTotem left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~~ 코멘트 확인 부탁드려요!

Comment on lines +45 to +56
private static String defaultViewMessage(LottoRate rate, int count) {
return String.format("%d개 일치 (%d)- %d개", rate.matchCount, rate.price, count);
}

private static String bonusViewMessage(LottoRate rate, int count) {
return String.format("%d개 일치, 보너스 볼 일치(%d)- %d개", rate.matchCount, rate.price, count);
}

@FunctionalInterface
public interface ViewMessageFormatter {
String format(LottoRate rate, int count);
}
Copy link

Choose a reason for hiding this comment

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

우와... 이런게 있었다니 ㄷㄷ

Comment on lines +24 to +26
if (rate != NONE) {
result.put(rate, result.getOrDefault(rate, 0) + 1);
}
Copy link

Choose a reason for hiding this comment

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

image

depth 지켜주세용

Comment on lines +20 to +24
public List<Integer> getNumbers() {
return numbers.stream()
.map(LottoNumber::getNumber)
.toList();
}
Copy link

Choose a reason for hiding this comment

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

List로 반환하는 이유가 있나요?

Comment on lines +30 to +35
while (stringTokenizer.hasMoreTokens()) {
int number = Integer.parseInt(stringTokenizer.nextToken());
numbers.add(number);
}
result.add(numbers);
}
Copy link

Choose a reason for hiding this comment

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

image

depth 지켜주세용

22

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