Ejemplo n.º 1
0
 public TicTacToeGame(TicTacToeObjects ticTacToeObjects)
 {
     _inputReader = ticTacToeObjects.InputReader;
     _boardState = ticTacToeObjects.BoardState;
     _humanPlayer = ticTacToeObjects.HumanPlayer;
     _computerPlayer = ticTacToeObjects.ComputerPlayer;
     _pieceManager = ticTacToeObjects.PieceManager;
 }
Ejemplo n.º 2
0
 public void PlayerTest_WhenHumanStarts_ThenHumanHasXAndComputerHasO()
 {
     var target = new PieceManager();
     target.FirstMover = PlayerType.Human;
     Piece actualPieceHuman = target.GetPiece(PlayerType.Human);
     Assert.AreEqual(Piece.X, actualPieceHuman);
     Piece actualPieceComputer = target.GetPiece(PlayerType.Computer);
     Assert.AreEqual(Piece.O, actualPieceComputer);
 }