-
Notifications
You must be signed in to change notification settings - Fork 738
Expand file tree
/
Copy pathMain.java
More file actions
30 lines (21 loc) · 882 Bytes
/
Main.java
File metadata and controls
30 lines (21 loc) · 882 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
package nextstep.ladder;
import nextstep.ladder.domain.*;
import nextstep.ladder.view.InputView;
import nextstep.ladder.view.ResultView;
public class Main {
public static void main(String[] args) {
InputView inputView = new InputView();
People people = inputView.people();
ExecuteResults executeResults = inputView.executeResults();
InputOutput inputOutput = new InputOutput(people, executeResults);
int verticalLineCount = people.value().size();
int height = inputView.height();
Ladder ladder = new Ladder(verticalLineCount, height);
ResultView.printLadder(inputOutput, ladder);
Match match = new Match(inputOutput, ladder);
Result result = match.makeResult();
String person = inputView.person();
ResultView.printResult(result, person);
inputView.close();
}
}