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}"); }
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}"); }