public void CheckForWinner_TopRowWinner_Success()
        {
            Board board = new Board();
            board.ModifyBoard(1, "X");
            board.ModifyBoard(2, "X");
            board.ModifyBoard(3, "X");

            Assert.AreEqual<bool>(true, board.CheckForWinner());
        }
Example #2
0
        static void Main(string[] args)
        {
            Player playerOne = new Player("X");
            Player playerTwo = new Player("O");
            Board board = new Board();

            Game game = new Game(board, playerOne, playerTwo);
            game.Play();
        }
Example #3
0
        public Game(Board board, Player playerOne, Player playerTwo)
        {
            Board = board;
            PlayerOne = playerOne;
            PlayerTwo = playerTwo;
            CurrentPlayerTurn = playerOne;

            _GameOver = false;
        }
 public void ModifyBoard_ModifyFiveWithO_Success()
 {
     Board board = new Board();
     Assert.AreEqual<bool>(true, board.ModifyBoard(5, "O"));
 }
 public void CheckForWinner_NoWinner_ReturnFalse()
 {
     Board board = new Board();
     Assert.AreEqual<bool>(false, board.CheckForWinner());
 }