Skip to content

[2단계 - 자동차 경주 구현] 유세지(김용래) 미션 제출합니다.#127

Merged
EungyuCho merged 30 commits into
woowacourse:usagenessfrom
usageness:usageness-step2
Feb 20, 2022
Merged

[2단계 - 자동차 경주 구현] 유세지(김용래) 미션 제출합니다.#127
EungyuCho merged 30 commits into
woowacourse:usagenessfrom
usageness:usageness-step2

Conversation

@usageness
Copy link
Copy Markdown

@usageness usageness commented Feb 18, 2022

안녕하세요, 아사님! 😊 이번 미션 페이지입니다!

2단계에서는 1단계 피드백에서 말씀해주셨던 상수화코드 가독성에 초점을 두고 최대한 깔끔한 코드를 작성하는데에 집중했습니다. 이전의 MVC 구조를 깨뜨리지 않도록 고려하여 구현을 이어나갔고, 이전의 utils 폴더에 있던 코드 중 RacingCar.js 또는 RacingGame.js 에서만 사용될 것으로 생각되는 코드들은 폴더에서 꺼내 racingGameHelper.js 로 따로 분리하였습니다.

그리고 한 가지 궁금한 점이 있습니다! 코드에서 raw하게 사용되고 있던 HTML 코드들을 template.js 라는 파일에 따로 분리하여 관리하려고 했는데, 이 파일의 적절한 위치를 찾지못해 최대한 비슷한 역할을 하고 있다고 생각하는 constants 폴더에 함께 담아주었습니다. 이렇게 두어도 괜찮을지 살짝 의심스럽지만... 더 나은 해결책이 생각나지 않네요. 이와 관련해서 인사이트를 주시면 감사하겠습니다!

너무 늦게 드린것 같아 죄송하지만... 😭
좋은 주말 보내시길 바랄게요! 👍

Copy link
Copy Markdown

@EungyuCho EungyuCho left a comment

Choose a reason for hiding this comment

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

안녕하세요 세지님 😄

리뷰를 하면서 느낀점이 코드 가독성이 굉장히 좋네요! 피드백을 잘 반영해주셨고 신경쓰셔서 구현한 점이 눈에 띄네요! 코드의 분리가 너무 잘 되어있어서 리뷰하는데 어려움이 없었고 어플리케이션이 복잡해질 수 있는 요구사항이 있었음에도 불구하고 깔끔하게 구현해주셨습니다 ㅎㅎ

몇 가지 버그나 개선점이 있어 아래에 적어보겠습니다~

개선점

  • element id가 숫자로 시작할 수 없는데 차를 식별할 때 dom id로 식별하다보니 숫자이름으로 시작하는 차 이름을 설정하게되면 querySelector에서 에러가 발생합니다.
  • 차가 전진하는 레이싱 레일을 figma처럼 중앙에 위치시켜주세요!
  • 게임이 끝나기 전에 다시 시작할 수 있는데 다시 시작했음에도 최종 우승자 텍스트가 렌더링되는데 다시 시작하기 버튼은 우승자가 나오고 나서 렌더링되는게 좋지 않을까요??

추가적으로 requestAnimationFrame은 애니메이션을 그려줄 때 많이사용하는 함수다보니 이에 대해 알아보시면 좋을 것 같아요! #110

아래에 코멘트를 몇가지 적어드렸는데 코드에 정답은 없기때문에 코멘트를 보시며 더 좋은 개선방안이 있는지도 생각해보시면 좋겠네요 :)

이번 미션도 정말 고생하셨습니다! 💯

Comment thread src/js/utils/isAdvance.js Outdated
return generateRandomNumber(NUMBERS.ENTIRE_NUMBER) >= NUMBERS.MOVABLE_NUMBER;
};

function generateRandomNumber(maxNumber) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
function generateRandomNumber(maxNumber) {
function generateRandomNumber(maxNumber) {
return Math.random() * maxNumber + 1;
}

1을 더해줘야 원하시는 범위의 테스트가 될거에요! 만약 그대로 둔다면 9를 넣었을 때 8.999999~ 가 최대값이라서요 😓

Copy link
Copy Markdown
Author

@usageness usageness Feb 19, 2022

Choose a reason for hiding this comment

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

앗 그렇네요 😥😥 Math.random() 의 반환값을 제대로 확인하지 못했었어요... 수정했습니다!

Comment thread src/js/utils/isAdvance.js Outdated
Comment on lines +3 to +4
const isAdvance = () => {
return generateRandomNumber(9) >= 4;
return generateRandomNumber(NUMBERS.ENTIRE_NUMBER) >= NUMBERS.MOVABLE_NUMBER;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

차가 전진할지 여부 설정하는 함수인 것 같은데 그렇다면 차(model)에 종속되는 함수이니까 공적인 util폴더보다는 model이 해당 함수를 갖고있는게 맞는 구조인 것 같네요 🤔
만약 분리하신다면 이 파일의 네이밍은 랜덤에 관련된 네이밍으로 바꿔주시면 되겠습니다!
(element-tools 파일도 네이밍을 한번 바꿔보면 어떨까요? selector가 더 맞는 네이밍이라고 생각되는데 세지님은 어떻게 생각하실까요?)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

말씀하신대로 isAdvance부분은 utils 에 있기보다는 model에 종속적인 부분 같아서 RacingGame으로 옮겨주었어요!
element-tools 파일도 tools 라고 하기엔 추상적인 느낌이 있어서 selector로 변경해주었습니다!

Comment thread src/js/views/RacingGameView.js Outdated
}

renderProgress() {
$(SELECTOR.RACE_CONTAINER_DIV).setAttribute('data-state', 'on');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

state보다 적절한 속성명과 값은 없을까요?
보여줄것인지에 대한 내용이 속성명에 표기되면 좋겠어요

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

html 태그에도 사용자가 정의한 속성명을 추가해 줄 수 있다는걸 처음 알았어요..!
보여줄것인지를 결정하는 부분이라서 속성명은 visible로, 값은 truefalse로 바꿔주었습니다 👍

Comment thread src/js/index.js Outdated
this.handleProgressDisplay();

// 라운드만큼 반복
for (let i = 1; i <= this.RacingGame.round; i += 1) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
for (let i = 1; i <= this.RacingGame.round; i += 1) {
for (let currentRound = 1; i <= this.RacingGame.round; currentRound += 1) {

반복문용 변수인 i도 네이밍을 변경해봅시다~

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

나중에 바꿔줘야지... 하고 생각만 했다가 놓친 부분이었네요! 감사합니다 😭

Comment thread src/js/utils/delay.js
@@ -0,0 +1,3 @@
const delay = (time) => new Promise((resolve) => setTimeout(resolve, time));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

오... 프로미스를 잘 이해하고 계신 것 같네요 💯 💯

Copy link
Copy Markdown
Author

@usageness usageness Feb 19, 2022

Choose a reason for hiding this comment

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

원래는 이 부분을 npm 모듈 중 promisify를 이용해서 구현하려고 했어요.
다양한 함수를 promise로 바꿀 수 있는 함수를 만들어주려고 오픈소스의 원본 코드를 살펴 보았는데 js에 대한 이해가 부족해 setTimeout을 그대로 넣어버렸네요 😅

Comment thread test/app.spec.js Outdated
cy.get('#race-time-button')
.invoke('attr', 'disabled')
.should('eq', 'disabled');
cy.get(SELECTOR.RACE_TIME_INPUT).type('5');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

숫자는 굳이 string 타입으로 안넣어도 됩니다!
매직넘버(의미가 불분명한 숫자)의 경우 상수로 빼주시는게 좋아요!
예를들어 숫자 5보다 TOTAL_RACE_ROUND처럼 전체 라운드가 몇라운드까지 있는지를 상수에 할당하면 흐름파악에 도움이 됩니다~
(아래 상수로 된 타이머들도 마찬가지입니다. 2000, 5000도 어떤 행동에 의한 wait 정보인지 표기해주면 좋겠어요!)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

나름 상수화를 했다고 생각했는데 테스트 케이스까지는 고려하지 않았었네요.... 😂
매직 넘버들은 상수로 처리해주었습니다!

Comment thread src/js/models/RacingGame.js Outdated
car.go();
return;
}
car.stop();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

해당 클래스의 개선은 개선이 되면 좋을부분이 많네요!

  1. play는 너무 추상적인 네이밍같아요. 턴을 진행시킨다는 의미를 가진 네이밍이 되면 좋겠어요.
  2. carListPush보다 차를 생성하고 해당 상태에 저장하는 함수이니 차를 생성한다는 의미로 네이밍을 바꿔주는게 올바를 것 같아요.
  3. winner 함수의 네이밍이나 역할을 바꿔보는건 어떨까요? 네이밍을 승자를 설정한다는 네이밍으로 변경하고 반환하지 않게하는 방법이 있을 것 같고 RacingGame에서 winner state가 필요없다고 생각되시면 getWinner함수로 변경해서 렌더링할때에 호출하여 사용하는 방법이 있을 것 같네요! 한번 어떤 방식이 더 나을지 고민해봅시다 😄

Copy link
Copy Markdown
Author

@usageness usageness Feb 19, 2022

Choose a reason for hiding this comment

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

  1. 어떤 이름을 지을까 생각했는데 코드 전체에서 turn 보다는 round 를 많이 사용해서 runRound 으로 수정해주었습니다!

  2. carList 가 배열이다보니 push 메서드에 깊게 꽂혀버린 것 같아요 😂 수정했습니다!

  3. winner 함수를 다시 살펴보았더니 우승자 선정과 반환이라는 두 가지 역할을 동시에 수행하고 있었네요. 반환 값을 지우고 한 가지 역할만 할 수 있도록 두 함수로 나누어주었습니다!

Comment thread src/js/racingGameHelper.js Outdated
}

const names = nameStringToArray(value);
console.log(value);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

로깅 함수의 경우에는 다음번 제출시에 삭제해주시면 되겠습니다~

return false;
}

if (!isUniqueWord(names)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

저번에 함수명을 is~로 드리는 걸 추천드렸는데 최근에 check~IsValid로 바꾸는게 더 낫다고 판단했어요 😓
변수랑 헷갈릴 여지가 있어 이렇게 변경했는데 어떤게 더 네이밍이 올바르다고 생각하실까요?

Copy link
Copy Markdown
Author

@usageness usageness Feb 19, 2022

Choose a reason for hiding this comment

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

제가 생각하기엔 check~ 의 경우는 복잡한 로직을 수행할 수 있는 메서드의 느낌이 강한 것 같아요.
is~ 는 비교적 간단한 판정을 하는 역할을 가진 함수라고 생각이 들어서 사실상 이름이 존재하는지 여부만 확인하는 isUniqueWord() 의 경우엔 is를 사용하는게 더 올바를 것 같다는 생각입니다!

일부 특정한 경우 (클래스 내의 get~ 메서드 등) 를 제외하면 이러한 함수를 사용할때엔 호출하여 사용하는게 일반적이라고 알고 있는데, 변수와 헷갈릴 여지라면 어떤 경우가 있을까요?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

변수에 할당할 경우 헷갈릴 여지가 있어 말씀드렸었어요!

   const isUniqueWord = checkIsUniqueWord();

   if (isUniqueWord) {
      // ...
   }

isUniqueWordboolean을 리턴하는 변수인 느낌이고 동사가 들어가야 메서드의 느낌이 난다고 생각해서 드린 코멘트였어요!

클린코드 링크를 보시면 '함수명은 함수가 무엇을 하는지 알 수 있어야 합니다'라고 되어있는데 '무엇을 한다'에 초점을 맞춰보면 함수명에 동사가 들어가있는 방향성이 맞다고 생각했습니다 🤔

Comment thread test/app.spec.js Outdated
Comment on lines +67 to +92
expect(alertStub).to.be.calledWith('자동차 이름을 입력해주세요.');
expect(stub).to.be.called;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

calledWith로 어떤 에러가 발생했는지 알려주는게 더 맞는 방향인 것 같은데 변경하신 이유가 있을까요?
그리고 테스트명에 어떤 행동을 했는지? 그리고 행동에 대한 결과가 테스트 명에 있으면 좋을 것 같고 그에 맞춰서 코드라인에서 주석으로 표기해주면 좋겠어요!

테스트관련 주석은 블링님의 PR을 참고해보면 좋을 것 같네요! #77

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

너무 구체적인 부분을 테스트 한다는 생각이 들어서 경고창이 발생하는지의 여부만 확인하면 될 것이라고 생각했는데, 다시 생각해보니 이정도는 확인해주는게 맞는것 같네요 ㅠㅠ

달아주신 링크도 참고해서 given when then 주석도 달아주었습니다!

@usageness
Copy link
Copy Markdown
Author

꼼꼼하게 리뷰해주셔서 정말 감사합니다!
특히 모델 부분에서 생각할 거리를 주셔서 더 좋은 형태로 만들어 낼 수 있던거 같아요 ㅎㅎ
피드백해주신 부분을 보며 어떤 구조를 생각하고 리뷰를 주셨을지 유추하는 것도 재밌었습니다!
최대한 반영해가며 수정하였으니 구체적인 부분은 코멘트 확인 부탁드려요 😊

Copy link
Copy Markdown

@EungyuCho EungyuCho left a comment

Choose a reason for hiding this comment

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

안녕하세요 세지님~
리뷰가 늦었네요 죄송합니다 💦

피드백 반영하신 부분 확인했습니다~ 관련해서 추가 코멘트 드릴만한 부분에 드렸고 또 추가적으로 시도해보면 좋을 부분을 코멘트로 남겨봤어요!

확인부탁드립니다~

Comment thread src/js/index.js
this.View.renderResult(this.RacingGame.winner);
await delay(2000);
alert('우승자는 ' + this.RacingGame.winner + '입니다. 축하합니다!');
this.View.renderReplayButton();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

이 코멘트는 혹시 추가로 구현해보고 싶으시다면 구현해보시면 좋겠습니다 ㅎㅎ

'정상적으로 게임의 턴이 다 동작된 후에는 결과를 보여주고, 2초 후에 축하의 alert 메세지를 띄운다.'
라는 요구사항에서 리플레이 버튼을 언제 렌더링하면 좋을지에 대한 명확한 요구사항은 없지만 리플레이 버튼도 우승자와 함께 표기해주면 자연스러울 것 같아요~

재시작 위치를 바꾸면 우승자 표기하는 경고창에서 게임정보가 없어 우승자를 제대로 표기해주지 못할텐데 해당 부분은 부자연스러우니 재시작 버튼을 눌렀을 때 2초후에 실행하기로 한 경고창이 뜨지 않았으면 좋겠습니다.

(필수 미션이 아닙니다~)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

시간이 조금 남아서 구현해보았습니다 ㅎㅎ (재미있었어요!)
확실히 다시 시작 버튼이 우승자와 함께 표시되는게 더 자연스럽게 느껴지네요! 좋은 아이디어 감사합니다 😊

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

오.. winnerArray가 없을 때 경고창을 표기안하는 방법으로도 구현해주셨네요
좋은 방법입니다 ㅎㅎ

또 다른 방법이 있다면 setTimeout메서드에서 Timeout을 반환받아 해당 컨트롤러에서 저장하고 restart를 버튼을 누르면 해당 컨트롤러에서 저장한 timeout 변수를 clearTimeout에 넣어 타이머에 등록해둔 콜백함수를 취소하는 방법도 있겠네요

Comment thread src/js/index.js Outdated
await delay(1000);
this.View.LoadingEnd();

this.RacingGame.runRound();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

라운드를 진행한다는 의미로는 processRound가 더 적절하지 않을까요?? run~이 더 자연스러울까요?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

run... 번역기의 한계였네요 ㅠㅠ processRound가 더 적절해 보이는 네이밍이에요! 수정했습니다~~

Comment thread src/js/models/RacingGame.js Outdated
Comment on lines 64 to 70
this.state.carList.forEach((car) => {
if (isAdvance()) {
if (this.isAdvance()) {
car.go();
this.addCarInMovedList(car);
return;
}
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
this.state.carList.forEach((car) => {
if (isAdvance()) {
if (this.isAdvance()) {
car.go();
this.addCarInMovedList(car);
return;
}
});
runRound() {
const roundResult = this.state.carList.map((car) => ({
car,
isProcessed: this.isAdvance(),
}));
roundResult.forEach(({ isProcessed, car }) => {
if (isProcessed) {
car.go();
}
});
return roundResult
.filter((result) => result.isProcessed)
.map((result) => result.car.state.name);
}

차가 전진했는지 여부를 별도의 상태로 관리하는게 나을까요??

map을 통해 runRound함수에서 전진한 차의 이름을 리턴해주는 방향은 어떨까요?

상태의 추가는 관리할 범위를 늘려서 지양해야한다고 생각해요! 🤔
작성을 하다보니 car 모델에서 state를 통해서 차 내부의 속성들을 가져왔는데 메서드와 분리하기위해서 이렇게 사용하실까요?
어떤 의도로 분리하신건지 궁금합니다~

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

차의 전진 여부를 상태로 관리하지 않는다는 생각은 못했어요!
함수에서 처리해주는 방법도 있었군요 👍👍
좋은 제안 감사합니다!

개인적으로는 state 안에 멤버 변수들을 저장하는게 깔끔해보이더라구요.
말씀하신대로 state가 붙으면 메서드가 아닌 변수구나! 하고 바로 알 수도 있구요!
MVC 패턴을 구현할때 view에 많은 양의 정보를 넘겨주는게 필요한 경우 state를 인자로 넘겨서 깔끔하게 처리해주려는 의도도 있었습니다.
다만 이렇게 하면 너무 뭉뚱그린 코드가 될 수도 있는게 살짝 걱정되긴 하네요. 🤔

.map((result) => result.car.state.name);

car의 name의 경우 사전에 getter를 생성해놓아서 state에 직접적인 접근 없이 불러오도록 수정했습니다!

.map((result) => result.car.name);

Comment thread src/js/index.js Outdated
async handleWinnerDisplay() {
this.RacingGame.setWinner();
this.View.renderResult(this.RacingGame.winner);
await delay(2000);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

이 숫자도 매직넘버가 아니라고 생각할만한 여지가 있긴하지만 어떤 기다림에 대한 내용인지 상수에 따로 할당하는게 좋아보입니다 ㅎㅎ
분리해두는게 요구사항이 바뀌었을때 변경도 쉽구요!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

delay() 니까 당연히 ms가 인자로 들어갈거라고 예상할 수 있겠지?

하는 안일한 생각이었습니다... ㅠㅠ 부끄럽네요!
마찬가지로 상수로 빼주었습니다 😊

@usageness
Copy link
Copy Markdown
Author

usageness commented Feb 20, 2022

아사님, 주말인데도 빠른 피드백 주셔서 정말 감사합니다!
말씀해주신 내용 위주로 코드를 수정하였고,

이 코멘트는 혹시 추가로 구현해보고 싶으시다면 구현해보시면 좋겠습니다 ㅎㅎ

너무 적절한 기능이라고 생각되어 함께 구현했습니다 😊

추가로 제공해주시는 링크들도 모두 확인했어요!
유익한 자료들 항상 감사합니다!

변경 내용

  • RacingGame 모델에서 불필요한 상태인 movedInThisRound 걷어내기
  • template 스태틱 메서드 형태로 변경해보기
  • 우승자 alert이 표시되기 전 다시 시작 시 alert 표시하지 않음
  • delay 함수에 인자로 들어간 매직 넘버 제거

Copy link
Copy Markdown

@EungyuCho EungyuCho left a comment

Choose a reason for hiding this comment

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

세지님 피드백을 잘 반영해주셨네요!
주말임에도 빠르게 반영해주셔서 감사합니다 ㅎㅎ

코멘트를 조금 남겼는데 사소한 네이밍 관련 추천 코멘트다보니 인지만 하셔도 된다고 생각해서 바로 승인하도록 하겠습니다. 추가적으로 궁금하신점이 있으면 코멘트 주시면 되겠습니다~

정말 짧은 2주였는데 미션을 통해 코드를 개선하는 과정속에서 세지님의 코드를 더 깔끔하게 작성하는 기준이 생기셨을거라 생각합니다 😄

자동차 미션 완료하시느라 고생 많으셨고 앞으로도 남은 미션들 속에서 성장해나가실 세지님을 응원하겠습니다 :)

Comment on lines +43 to +53
LoadingStart() {
$$(SELECTOR.RACE_CAR_INSTANCE).forEach(($element) => {
$element.innerHTML += TEMPLATE.LOADING_MARK();
});
}

LoadingEnd() {
$$(SELECTOR.RACE_LOADING).forEach(($element) => {
$element.remove();
});
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

메서드의 이름을 앞에 대문자로 하신 이유가 궁금해요!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

loading을 입력할때 습관적으로 앞의 l을 대문자로 작성하는 버릇이 있어서 무의식적으로 입력했던 것 같습니다...ㅠㅠ 소문자 시작이 맞아요!!!

Comment thread src/js/index.js
Comment on lines +119 to +121
this.RacingGame.processRound().forEach((name) =>
this.View.renderAdvance(name)
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
this.RacingGame.processRound().forEach((name) =>
this.View.renderAdvance(name)
);
const processCarNames = this.RacingGame.processRound()
processCarNames.forEach((carName) =>
this.View.renderAdvance(carName)
);

조금 더 길어지겠지만 이렇게 구현하는게 더 명확할 것 같네요 :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

명확한 정리 감사합니다 👍👍

@EungyuCho EungyuCho merged commit 915ccac into woowacourse:usageness Feb 20, 2022
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