Skip to content

버그 전부 수정했읍니다^^7#7

Open
ByeongDoo-Han wants to merge 5 commits intoCODE-CLEANERS:mainfrom
ByeongDoo-Han:dev
Open

버그 전부 수정했읍니다^^7#7
ByeongDoo-Han wants to merge 5 commits intoCODE-CLEANERS:mainfrom
ByeongDoo-Han:dev

Conversation

@ByeongDoo-Han
Copy link

No description provided.

Copy link
Collaborator

@ca1af ca1af left a comment

Choose a reason for hiding this comment

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

굿!

Comment on lines +12 to +13
Car(String carName){
if(carName.length()>5)throw new IllegalArgumentException("차 이름은 5자를 초과할 수 없습니다.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

접근제어자를 사용하지 않은 이유가 있을까요?

Validation 로직은 매서드로 따로 빼면 어떨까요?

Comment on lines +32 to +34
private void addScore(){
this.score = getScore()+1;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

pin!

Comment on lines +36 to +40
public void drive(){
double r = Math.random();
int t = Math.toIntExact(Math.round(r * 10));
if(t>=4) addScore();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

pin!

Comment on lines +42 to +44
public boolean isWin(){
return win;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

pin3

Comment on lines +6 to +8
private static final CarNameView carNameView = new CarNameView();
private static final RaceTryView raceTryView = new RaceTryView();
private static final RaceResultView raceResultView = new RaceResultView(carNameView, raceTryView);
Copy link
Collaborator

Choose a reason for hiding this comment

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

final 을 쓰는 이유가 뭘까요? (++static?)

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