示例#1
0
文件: UnitTest1.cs 项目: ustasBD/ttt
        public void TestRightDiagWin()
        {
            var board = new CTTBoard();

            board.ApplyStep(CTTBoard.Player.PlayerO, 0, 2);
            board.ApplyStep(CTTBoard.Player.PlayerO, 1, 1);
            board.ApplyStep(CTTBoard.Player.PlayerO, 2, 0);
            Assert.IsTrue(board.CheckWin(), "should win");
        }
示例#2
0
文件: UnitTest1.cs 项目: ustasBD/ttt
        public void TestLeftColumnWin5()
        {
            var board = new CTTBoard();

            board.ApplyStep(CTTBoard.Player.PlayerO, 0, 2);
            board.ApplyStep(CTTBoard.Player.PlayerO, 1, 2);
            board.ApplyStep(CTTBoard.Player.PlayerO, 2, 2);
            Assert.IsTrue(board.CheckWin(), "should win");
        }