Example #1
0
        public void Initialize(GoBoard goBoard, Color playerToMove, SearchOptions searchOptions, OnCompletion onCompletion)
        {
            lock (this)
            {
                SearchStatus           = new SearchStatus();
                SearchStatus.BoardSize = goBoard.BoardSize;
                Status = SearchStatusType.Thinking;
                UpdateStatus();
                UpdateStatusFlag = true;
                StopThinkingFlag = false;

                SearchOptions = searchOptions.Clone();
                NodesSearched = NodesEvaluated = 0;
                CheckSuperKo  = searchOptions.CheckSuperKo;
                OnCompletion  = onCompletion;

                SearchInterface.Initialize(goBoard, SearchOptions);

                Board = goBoard;

                PlayerToMove = playerToMove;
            }
        }