-
Notifications
You must be signed in to change notification settings - Fork 510
Expand file tree
/
Copy pathSnakeLadderGameApp.java
More file actions
25 lines (21 loc) · 910 Bytes
/
SnakeLadderGameApp.java
File metadata and controls
25 lines (21 loc) · 910 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
import Dto.GameDTO;
import InputReader.InputReaderFromFile;
import OutputWriter.OutputWriter;
import models.Dice;
import models.Game;
import models.Player;
import services.DiceService;
import services.GameService;
import services.PlayerService;
import java.io.IOException;
public class SnakeLadderGameApp {
public static void main(String[] args) throws IOException {
final String inputFile = "src/input.txt";
final InputReaderFromFile inputReaderFromFile = new InputReaderFromFile(inputFile);
final OutputWriter outputWriter = new OutputWriter();
final DiceService diceService = new DiceService(new Dice(6));
final PlayerService playerService = new PlayerService(outputWriter, diceService);
final GameService gameService = new GameService(new Game(inputReaderFromFile.readGameInput()), playerService, outputWriter);
gameService.runGame();
}
}