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

complete #2396

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Feat: add Output.java
출력을 담당하는 클라스
  • Loading branch information
rakyunKim committed Dec 8, 2023
commit 6b7fa3d3364753ccb796454e9bb7eed33487761e
19 changes: 19 additions & 0 deletions src/main/java/racingcar/Output.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package racingcar;

import java.util.List;

public class Output {
public void printStart(){
System.out.println("경주할 자동차 이름을 입력하세요.(이름은 쉼표(,) 기준으로 구분)");
}
public void printTryCount(){
System.out.println("시도할 회수는 몇회인가요?");
}
public void printMoveResult(List<Car> cars){
cars.forEach(car -> {
System.out.print(car.name + " : ");
car.moved.forEach(System.out::print);
System.out.println();
});
}
}