예제 #1
0
        public void Return_False_When_3_Positions_Have_Same_Symbol_In_A_DiagonalLine()
        {
            var board = new int?[3][];

            board[0] = new int?[3] {
                1, null, 1
            };
            board[1] = new int?[3] {
                2, 2, null
            };
            board[2] = new int?[3] {
                null, 1, 1
            };

            var rule = new DiagonalRule();

            Assert.IsFalse(rule.IsWinning(board));
        }
예제 #2
0
        public void Return_True_When_3_Positions_Have_Same_Symbol_In_BottomLeft_To_TopRight_DiagonalLine()
        {
            var board = new int?[3][];

            board[0] = new int?[3] {
                1, 1, 2
            };
            board[1] = new int?[3] {
                2, 2, 1
            };
            board[2] = new int?[3] {
                2, null, 1
            };

            var rule = new DiagonalRule();

            Assert.IsTrue(rule.IsWinning(board));
        }