Exemplo n.º 1
0
 public TicTacToeGame(TicTacToeObjects ticTacToeObjects)
 {
     _inputReader    = ticTacToeObjects.InputReader;
     _boardState     = ticTacToeObjects.BoardState;
     _humanPlayer    = ticTacToeObjects.HumanPlayer;
     _computerPlayer = ticTacToeObjects.ComputerPlayer;
     _pieceManager   = ticTacToeObjects.PieceManager;
 }
Exemplo n.º 2
0
 public TicTacToeGame(TicTacToeObjects ticTacToeObjects)
 {
     _inputReader = ticTacToeObjects.InputReader;
     _boardState = ticTacToeObjects.BoardState;
     _humanPlayer = ticTacToeObjects.HumanPlayer;
     _computerPlayer = ticTacToeObjects.ComputerPlayer;
     _pieceManager = ticTacToeObjects.PieceManager;
 }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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();
        }