-
Notifications
You must be signed in to change notification settings - Fork 43
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
[3주차] Wordle 과제 제출 - 김민수 #13
base: main
Are you sure you want to change the base?
Conversation
UserWord Refactoring, 비기능 요구사항 추가
wip: GameManager
feat: Judgement 기능 구현
} | ||
|
||
private static void validate(String value) throws IllegalArgumentException { | ||
if(value.length()!=5) { |
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.
단어의 길이는 하드코딩보다는 상수로 빼는 걸 고려해보시면 어떨까요?
while (line != null) { | ||
listOfLines.add(line); | ||
line = bufferedReader.readLine(); | ||
} |
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.
파일의 라인을 읽어와서 List으로 받으실 때 Files.lines() 같은 것도 있으니 찾아보시면 좋을 것 같습니다:)
|
||
public class JudgeResult { | ||
|
||
Color[] result; |
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.
접근제어자를 default로 해두신 이유가 있으실까요?
for (int i = 0; i < PROGRESS_COUNT; i++) { | ||
UserWord userWord = userInput.execute(); | ||
JudgeResult judgeResult = judgement.execute(answer, userWord.getValue()); | ||
printer.execute(judgeResult); |
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.
이전 결과도 함께 나타내야하는데, 이전 결과를 보관하는 곳이 있으면 어떨까요?
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.
기능 구현이 누락된 것 같습니다. 감사합니다!
getGreenResult(answer, input, check, result); | ||
getYellowResult(answer, input, check, result); | ||
getGrayResult(check, result); |
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.
정답 비교 과정을 3개의 메서드로 깔끔하게 잘 분리하셨네요!👍
@@ -0,0 +1,17 @@ | |||
package wordle.vo; | |||
|
|||
public enum Color { |
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.
타일색상에 대한 책임을 enum class로 잘 도출하셨네요!👍
private static final String OPENING_PHRASE = "WORDLE을 6번 만에 맞춰 보세요.\n시도의 결과는 타일의 색 변화로 나타납니다."; | ||
private static final String CLOSING_PHRASE = "정답입니다 짝짝짝"; | ||
private static final int PROGRESS_COUNT = 6; |
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.
상수로 깔끔하게 잘 빼셨네요🎉!
끝까지 구현하시느라 수고 많으셨습니다! |
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.
피드백 반영
for (int i = 0; i < PROGRESS_COUNT; i++) { | ||
UserWord userWord = userInput.execute(); | ||
JudgeResult judgeResult = judgement.execute(answer, userWord.getValue()); | ||
printer.execute(judgeResult); |
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.
기능 구현이 누락된 것 같습니다. 감사합니다!
No description provided.