Exemple #1
0
        public void TestHorizontalWin()
        {
            char[] FirstRow = { 'X', 'X', 'X', 'O', 'O', '-', '-', '-', '-', '-' };

            var result = WinningLogic.CheckForAWin(FirstRow);


            Assert.Equal(1, result);
        }
Exemple #2
0
        public void TestDiagonalWin()
        {
            char[] Diagonal = { 'X', 'O', 'O', '-', 'X', '-', '-', '-', 'X' };

            var result = WinningLogic.CheckForAWin(Diagonal);


            Assert.Equal(1, result);
        }
Exemple #3
0
        public void TestGameDraw()
        {
            char[] Draw = { 'O', 'X', 'O', 'O', 'O', 'X', 'X', 'O', 'X' };

            var result = WinningLogic.CheckForAWin(Draw);


            Assert.Equal(-1, result);
        }
Exemple #4
0
        public void TestVerticalWin()
        {
            char[] FirstColumn = { 'X', 'O', 'O', 'X', '-', '-', 'X', '-', '-' };

            var result = WinningLogic.CheckForAWin(FirstColumn);


            Assert.Equal(1, result);
        }