private void ComputerMove() { Board nextBoard = Minimax.FindNextBoard(_board); AnimateTransition(_board, nextBoard); _board = nextBoard; pictureBoxBoard.Refresh(); _currentPlayer = PlayerType.Human; CheckFinish(); }
private void ComputerMove() { AlphaBetaBoard alphaBetaBoard = new AlphaBetaBoard(); alphaBetaBoard.board = _board; alphaBetaBoard.eval = _board.EvaluationFunction(); Board nextBoard = Minimax.AlphaBetaPruning(alphaBetaBoard, Double.NegativeInfinity, Double.PositiveInfinity, 5, PlayerType.Computer).board; AnimateTransition(_board, nextBoard); _board = nextBoard; pictureBoxBoard.Refresh(); _currentPlayer = PlayerType.Human; CheckFinish(); }