예제 #1
0
 public GameControllerTest()
 {
     IBoard board = new Board();
     IGameManager gameManager = new GameManager(board);
     gameService = new GameService(gameManager);
     IComputerPlayer computerPlayer = new ComputerPlayer(gameService);
     IHumanPlayer humanPlayer = new HumanPlayer(gameService);
     controller = new Controller(computerPlayer, humanPlayer, gameService);
 }
예제 #2
0
        public static GameUI ComposeStartupForm()
        {
            IBoard board = new Board();
            IGameManager gameManager = new GameManager(board);

            IGameService gameService = new GameService(gameManager);

            IComputerPlayer computerPlayer = new ComputerPlayer(gameService);
            IHumanPlayer humanPlayer = new HumanPlayer(gameService);

            IController controller = new Controller(computerPlayer, humanPlayer, gameService);

            GameUI form = new GameUI(gameService, controller);

            return form;
        }