-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathInputView.java
More file actions
31 lines (23 loc) · 901 Bytes
/
Copy pathInputView.java
File metadata and controls
31 lines (23 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package baseball.view;
import baseball.model.computer.InputValidator;
import camp.nextstep.edu.missionutils.Console;
import java.util.List;
import static camp.nextstep.edu.missionutils.Console.readLine;
public class InputView {
private static final String RESTART_MESSAGE = "게임을 새로 시작하려면 1, 종료하려면 2를 입력하세요.";
private static final String INPUT_MESSAGE = "숫자를 입력해주세요 : ";
private final InputValidator inputValidator;
public InputView(InputValidator inputValidator) {
this.inputValidator = inputValidator;
}
public String printRestartMessage(){
System.out.println(RESTART_MESSAGE);
String restart = readLine();
return restart;
}
public String printInputMessage(){
System.out.println(INPUT_MESSAGE);
String input = readLine();
return input;
}
}