Esempio n. 1
0
    private void SearchInit(string job)
    {
        Dictionary <string, string> @params = Json.fromJson(job);
        string windowStr = @params["window"];
        string limitStr  = @params["limit"];
        string deepStr   = @params["deep"];
        string debugStr  = @params["debug"];
        string boardStr  = @params["board"];

        jobId = @params["jobid"];

        debug = (debugStr == "true");

        board.Init(boardStr);
        if (debug)
        {
            //board->PrintBoard();
        }

        if (windowStr != "")
        {
            window = new Score(windowStr);
        }
        else
        {
            window.clear();
        }
        windowNega = window.Negate();

        deep = uint.Parse(deepStr);

        if (limitStr != "")
        {
            limit = new Score(limitStr);
        }
        else
        {
            limit.clear();
        }

        nodeStack.clear();
        // ルート
        nodeStack.push_back(new Node());
        // 自分
        MoveList moveList = new MoveList();

        board.GetMoveList(moveList);
        nodeStack.push_back(moveList);
    }