Esempio n. 1
0
 public void TestMakeMoveX()
 {
     TicTacToe.GamePlay gamePlay = new TicTacToe.GamePlay();
     gamePlay.CreateBoard();
     gamePlay.ChangePlayer("X");
     gamePlay.MakeMove(0, 0);
     Assert.AreEqual(1, gamePlay.Board[0, 0]);
 }
Esempio n. 2
0
 public void TestMakeMoveO()
 {
     TicTacToe.GamePlay gamePlay = new TicTacToe.GamePlay();
     gamePlay.CreateBoard();
     gamePlay.ChangePlayer("O");
     gamePlay.MakeMove(1, 1);
     Assert.AreEqual(2, gamePlay.Board[1, 1]);
 }
Esempio n. 3
0
        public void TestCurrentPlayerO()
        {
            TicTacToe.GamePlay gamePlay = new TicTacToe.GamePlay();
            gamePlay.ChangePlayer("O");
            string player = gamePlay.CurrentPlayer();

            Assert.AreEqual("O", player);
        }
Esempio n. 4
0
        public void TestSpaceInUse()
        {
            TicTacToe.GamePlay gamePlay = new TicTacToe.GamePlay();
            gamePlay.CreateBoard();

            Assert.AreEqual(false, gamePlay.SpaceInUse(0, 1));
            gamePlay.ChangePlayer("X");
            gamePlay.MakeMove(0, 1);
            Assert.AreEqual(true, gamePlay.SpaceInUse(0, 1));
        }