Exemple #1
0
        public void Simple_2_3()
        {
            Player.Board board = new Player.Board(new Player.PositionState[, ] {
                { Player.PositionState.Free, Player.PositionState.Free, Player.PositionState.Free },
                { Player.PositionState.Opponent, Player.PositionState.Opponent, Player.PositionState.Player },
                { Player.PositionState.Opponent, Player.PositionState.Opponent, Player.PositionState.Player },
            }, null);

            var result = board.GetBestPosition();

            Assert.True(result.Y == 0, $"Y: {result.Y} X: {result.X}");
            Assert.True(result.X == 2, $"Y: {result.Y} X: {result.X}");
        }
Exemple #2
0
        public void Diagonal_1_1()
        {
            Player.Board board = new Player.Board(new Player.PositionState[, ] {
                { Player.PositionState.Free, Player.PositionState.Free, Player.PositionState.Player },
                { Player.PositionState.Free, Player.PositionState.Player, Player.PositionState.Free },
                { Player.PositionState.Free, Player.PositionState.Free, Player.PositionState.Free },
            }, null);

            var result = board.GetBestPosition();

            Assert.True(result.Y == 2, $"Y: {result.Y} X: {result.X}");
            Assert.True(result.X == 0, $"Y: {result.Y} X: {result.X}");
        }