-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Step3 - 3단계 : 자동차 경주 #1662
Step3 - 3단계 : 자동차 경주 #1662
Conversation
0 ~ 9 사이의 random 값을 구한 후 random 값이 4이상일 경우 전진한다
경기에 참가하는 자동차의 대수는 사용자가 정한다 여러대의 자동차가 이동 요구사항을 만족하면서 이동한다
자동차가 몇 번의 이동을 할지는 사용자가 정한다
1. 사용자의 입력을 받아서 Cars 객체를 생성한다. 2. 생성한 Cars 객체로 Racing 게임을 한다.
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.
리뷰 반영 감사합니다ㅎ
바로 머지하겠습니다. 다음 단계 진행해주세요!
안녕하세요, 신지호 입니다.
이번 과제에서는 최대한 메소드 분리를 잘 지키도록 노력했습니다.
테스트 코드의 작성을 위해
MovingCondition
인터페이스를 구현하는ImFixedCondition
클래스를 만들었고, 실제 게임 동작시에는 Random값을 주는RandomCondition
클래스를 사용하도록 했습니다.매직넘버의 사용을 피하였습니다.
Cars
클래스는 일급 컬렉션을 만족하도록 마지막에 리팩토링 했습니다.( 마지막 커밋 이전까진 Cars 클래스에서 MovingCondition을 가지도록 했었는데 -> 이후에 MovingCondition은 Car 객체가 가지도록 변경했습니다)
이번 과제에서는 이정도의 내용을 토대로 봐주시면 좋을 것 같습니다.
감사합니다!!