Beispiel #1
0
        public void Test2QueenSameDiagonal3x3BoardReturnsFalse()
        {
            int[,] gameBoard = new int[3, 3] {
                { 1, 0, 0 },
                { 0, 0, 0 },
                { 0, 0, 1 }
            };

            Queens.IsGameBoardValid(gameBoard, 3, 3).Should().BeFalse();
        }
Beispiel #2
0
        public void Test1Queen3x3BoardReturnsTrue()
        {
            int[,] gameBoard = new int[3, 3] {
                { 1, 0, 0 },
                { 0, 0, 0 },
                { 0, 0, 0 }
            };

            Queens.IsGameBoardValid(gameBoard, 3, 3).Should().BeTrue();
        }
Beispiel #3
0
        public void Test8QueenValid8x8BoardReturnsTrue()
        {
            int[,] gameBoard = new int[8, 8] {
                { 0, 0, 1, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 1, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 1, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 1, 0 },
                { 0, 0, 0, 0, 1, 0, 0, 0 },
                { 0, 1, 0, 0, 0, 0, 0, 0 },
            };

            Queens.IsGameBoardValid(gameBoard, 8, 8).Should().BeTrue();
        }
Beispiel #4
0
 public void Test0Queens3x3BoardReturnsTrue()
 {
     int[,] gameBoard = new int[3, 3];
     Queens.IsGameBoardValid(gameBoard, 3, 3).Should().BeTrue();
 }