-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathBridgeGame.java
More file actions
31 lines (27 loc) · 894 Bytes
/
BridgeGame.java
File metadata and controls
31 lines (27 loc) · 894 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 bridge.controller;
import bridge.controller.dto.MoveResult;
import bridge.view.OutputView;
import java.util.List;
/**
* 다리 건너기 게임을 관리하는 클래스
*/
public class BridgeGame {
private final OutputView outputView;
private final BridgeController bridgeController;
private final MoveController moveController;
public BridgeGame(
OutputView outputView,
BridgeController bridgeController,
MoveController moveController
) {
this.outputView = outputView;
this.bridgeController = bridgeController;
this.moveController = moveController;
this.outputView.printStartMessage();
}
public void run() {
List<String> bridges = bridgeController.prepare();
MoveResult moveResult = moveController.retry(bridges);
outputView.printResult(moveResult);
}
}