Skip to content

Commit 099556a

Browse files
committed
feat(main): 게임 세팅 구현
Application & AppConfig
1 parent 2d9a8ba commit 099556a

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
package lotto;
22

3+
import lotto.config.AppConfig;
4+
import lotto.controller.LottoController;
5+
36
public class Application {
7+
static LottoController lottoController;
8+
49
public static void main(String[] args) {
5-
// TODO: 프로그램 구현
10+
new Application().run();
11+
}
12+
13+
public void run() {
14+
lottoController = AppConfig.getLottoController();
15+
lottoController.startGame();
616
}
717
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package lotto.config;
2+
3+
import lotto.controller.LottoController;
4+
import lotto.service.LottoService;
5+
import lotto.view.LottoView;
6+
7+
public class AppConfig {
8+
private static final LottoView lottoView = new LottoView();
9+
private static final LottoService lottoService = new LottoService();
10+
11+
public static LottoController getLottoController() {
12+
return new LottoController(lottoView, lottoService);
13+
}
14+
}

0 commit comments

Comments
 (0)