-
Notifications
You must be signed in to change notification settings - Fork 11
[이혁진] 자동차 경주 게임 step2 코드리뷰 부탁드립니다 #17
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
base: hyukjin-step2
Are you sure you want to change the base?
Conversation
this.name = name; | ||
} | ||
|
||
public int getDistance() { |
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.
없네요 지워야겠습니다 !
|
||
public void moveCars() { | ||
for (Car car : cars) { | ||
moveSelectedCar(car, RandomValueGenerator.generate(BOUNDARY)); |
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.
랜덤값을 moveSelectedCar() 메소드 안에서 구현해도 될 것 같은데, 매개변수로 넣어준 이유는 테스트를 쉽게하기 위해서 인가요?
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.
네 moveSelectedCar를 테스트하기 위해서 했습니다!
|
||
private String name; | ||
private int distance; | ||
|
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.
domain에서 가지고 있는 정보를 여기서도 가지고 있어야 하나요?
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.
domain이 get set을 최대한 하면 안되게 DTO를 사용했습니다. DTO는 Data Transfer Object로, 해당 도메인에서 필요한 데이터를 DTO로 담아서 마치 모델의 분신처럼 다른 레이어들과 데이터 주고 받기를 가능하게하는 역할을 합니다.
No description provided.