Skip to content

Conversation

@pizzaa0930
Copy link

열심히 서치도 하고 보고서 내용에 기반해 공부도 해보았으나 아직 스스로 과제를 해결할 정도의 실력이 아니라서 인터넷에서 찾은 어떤 분의 깃허브 코드를 참고하였습니다.
출처:https://0bliviat3.tistory.com/61

Copy link

@BaeJinho4028 BaeJinho4028 left a comment

Choose a reason for hiding this comment

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

코드는 전체적으로 깔끔합니다.
과제를 수행하다가 막히셨다면 어디까지 했는데 막혔는지, 참고를 하면서 왜 막혔었는지에 대해 고민해보시면 좋을 것 같습니다.

경험이 부족하기에 남의 코드와 아이디어를 참고하는 것은 빠르게 학습이 가능한 방법입니다. 저도 그렇게 학습해왔으나 어느 순간부터 금방 포기하게 되는 습관이 들까봐 걱정이 되네요. 고민하는것은 느리지만 탄탄하게 학습하는 방법이기에, 고민도 많이 해보셨으면 좋겠습니다. 👍

+) 커밋은 잘 나눠주셨습니다. 커밋컨벤션도 추가로 학습해주시면 좋을 것 같습니다.


public class GameController {

private static GameController gameController;

Choose a reason for hiding this comment

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

모든 클래스를 싱글톤으로 하신 이유가 있을까요?
매번 close로 초기화한다면 new로 주입하는게 더 나았을 수도 있지 않았을지 궁금합니다.


import message.GameMessage;

public class GameInputException {

Choose a reason for hiding this comment

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

커스텀 예외 좋네요. 어떻게 알게되었는지도 궁금합니다 👍

gameController = null;
}

} No newline at end of file

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

테스트 굿입니다. 👍

@@ -0,0 +1,31 @@
package domain;

public class Car implements Comparable<Car> {

Choose a reason for hiding this comment

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

domain과 model의 차이점을 알아두시면 좋을 것 같습니다.

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