public TicTacToeGame(TicTacToeObjects ticTacToeObjects) { _inputReader = ticTacToeObjects.InputReader; _boardState = ticTacToeObjects.BoardState; _humanPlayer = ticTacToeObjects.HumanPlayer; _computerPlayer = ticTacToeObjects.ComputerPlayer; _pieceManager = ticTacToeObjects.PieceManager; }
static void Main(string[] args) { var ticTacToeObjects = new TicTacToeObjects(); var inputReader = new InputReader(); var outputWriter = new OutputWriter(); ticTacToeObjects.BoardState = new BoardState(outputWriter); ticTacToeObjects.HumanPlayer = new HumanPlayer(inputReader); ticTacToeObjects.ComputerPlayer = new ComputerPlayer(); ticTacToeObjects.PieceManager = new PieceManager(); TicTacToeGame game = new TicTacToeGame(ticTacToeObjects); game.RunGame(); Console.ReadLine(); }