Exemplo n.º 1
0
        public void MoveExpectancyIllegal()
        {
            TicTacToePosition board = TicTacToePosition.Set(
                crosses: new TicTacToeLocation[] { "a3", "c1" },
                naughts: new TicTacToeLocation[] { "b2", "c3" });

            Assert.IsTrue(board.MoveDegree("a3") == TicTacToe.MoveExpectancy.Illegal, "Must be illegal move");
        }
Exemplo n.º 2
0
        public void MoveExpectancy()
        {
            TicTacToePosition board = TicTacToePosition.Set(
                crosses: new TicTacToeLocation[] { "a3", "c1" },
                naughts: new TicTacToeLocation[] { "b2", "c3" });

            Assert.IsTrue(board.MoveDegree("a1") == TicTacToe.MoveExpectancy.Win, "Must be winning move");
            Assert.IsTrue(board.MoveDegree("a2") == TicTacToe.MoveExpectancy.Lose, "Must be losing move");
        }