public void SuperSimpleWinMinimax() { Minimax m = new Minimax(); m.Depth = 1; var initial = new TicTacToe(false, new[] { -1, 0, -1, -1, 1, 1, 1, 0, 1 }); m.Find(initial); }
public void Test_Expansion() { TicTacToe t = new TicTacToe(false, new[] { -1, 0, -1, 1, 0, 0, 0, 1, 0 }); Console.WriteLine(t); foreach (var successor in t.GetSuccessors()) { PrintSuccessor(successor); } }
public bool IsEqualTo(IState state) { if (state == null) { return(false); } if (!(state is TicTacToe)) { return(false); } TicTacToe tictactoe = (TicTacToe)state; for (int i = 0; i < _board.Length; i++) { if (_board[i] != tictactoe._board[i]) { return(false); } } return(true); }