Skip to content
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

[자동차 경주] 오정진 미션 제출합니다. #747

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
8 changes: 1 addition & 7 deletions src/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ class Game {

Console.print('실행결과');

while (this.isFinished()) {
for (let i = 0; i < this.#count; i++) {
this.#cars.forEach((car) => {
car.move();
Console.print(`${car.getName()} : ${car.getPath()}`);
});
Console.print('');

this.#count -= 1;
}

this.showWinner();
Expand All @@ -44,10 +42,6 @@ class Game {
this.#count = Number(value);
}

isFinished() {
return this.#count !== 0;
}

showWinner() {
ojj1123 marked this conversation as resolved.
Show resolved Hide resolved
let maximumPathLength = 0;
this.#cars.forEach((car) => {
Expand Down