Open
Conversation
There was a problem hiding this comment.
코드는 전체적으로 깔끔합니다.
과제를 수행하다가 막히셨다면 어디까지 했는데 막혔는지, 참고를 하면서 왜 막혔었는지에 대해 고민해보시면 좋을 것 같습니다.
경험이 부족하기에 남의 코드와 아이디어를 참고하는 것은 빠르게 학습이 가능한 방법입니다. 저도 그렇게 학습해왔으나 어느 순간부터 금방 포기하게 되는 습관이 들까봐 걱정이 되네요. 고민하는것은 느리지만 탄탄하게 학습하는 방법이기에, 고민도 많이 해보셨으면 좋겠습니다. 👍
+) 커밋은 잘 나눠주셨습니다. 커밋컨벤션도 추가로 학습해주시면 좋을 것 같습니다.
|
|
||
| public class GameController { | ||
|
|
||
| private static GameController gameController; |
There was a problem hiding this comment.
모든 클래스를 싱글톤으로 하신 이유가 있을까요?
매번 close로 초기화한다면 new로 주입하는게 더 나았을 수도 있지 않았을지 궁금합니다.
|
|
||
| import message.GameMessage; | ||
|
|
||
| public class GameInputException { |
| gameController = null; | ||
| } | ||
|
|
||
| } No newline at end of file |
There was a problem hiding this comment.
https://velog.io/@junho5336/No-newline-at-end-of-file
개행 경고에 대한 해결법입니다!
Comment on lines
+15
to
+53
| @Test | ||
| void 전체기능_확인() { | ||
| assertRandomNumberInRangeTest( | ||
| () -> { | ||
| run("a,b,c", "3"); | ||
| assertThat(output()).contains("a : -", "b : -","c : ", | ||
| "a : --", "b : --","c : ", | ||
| "a : ---", "b : ---","c : -","최종 우승자 : a, b"); | ||
| }, | ||
| 4,4,3,4,4,2,4,4,4 | ||
| ); | ||
| } | ||
|
|
||
| @Test | ||
| void 회수가_0일때() { | ||
| assertRandomNumberInRangeTest( | ||
| () -> { | ||
| run("a,b,c", "0"); | ||
| assertThat(output()).contains("최종 우승자 : a, b, c"); | ||
| }, | ||
| -1,-1,-1 | ||
| ); | ||
| } | ||
|
|
||
| @Test | ||
| void 음수에_대한_예외_처리() { | ||
| assertSimpleTest(() -> | ||
| assertThatThrownBy(() -> runException("pobi,a", "-11")) | ||
| .isInstanceOf(IllegalArgumentException.class) | ||
| ); | ||
| } | ||
|
|
||
| @Test | ||
| void 회수가_0으로_시작할_때_예외_처리() { | ||
| assertSimpleTest(() -> | ||
| assertThatThrownBy(() -> runException("pobi,a", "01")) | ||
| .isInstanceOf(IllegalArgumentException.class) | ||
| ); | ||
| } |
| @@ -0,0 +1,31 @@ | |||
| package domain; | |||
|
|
|||
| public class Car implements Comparable<Car> { | |||
There was a problem hiding this comment.
domain과 model의 차이점을 알아두시면 좋을 것 같습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
열심히 서치도 하고 보고서 내용에 기반해 공부도 해보았으나 아직 스스로 과제를 해결할 정도의 실력이 아니라서 인터넷에서 찾은 어떤 분의 깃허브 코드를 참고하였습니다.
출처:https://0bliviat3.tistory.com/61