-
Notifications
You must be signed in to change notification settings - Fork 0
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
Jiggyjiggy #3
base: main
Are you sure you want to change the base?
Jiggyjiggy #3
Conversation
} | ||
} | ||
private void validateRange(List<Integer> input) { | ||
if (!(input.stream().allMatch(v -> 1 <= v && v <= 9))) { |
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.
이 부분은 stream도 좋지만 정규표현식도 시도해보시면 좋을 거 같아요.
private void updateBallCount(int computerDigit, int inputDigit) { | ||
if (computerDigit == inputDigit) { | ||
updateNumberOfStrike(); | ||
} else { |
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.
else문 보다는 return문 사용하시면 좋을 거 같아요.
number class (domain) 을 두고 형식에 대한 validate 처리를 하면 좋을 것 같다. |
No description provided.