コード例 #1
0
ファイル: TestScript.cs プロジェクト: YegorR/Yegor-s-Chess
    void Start()
    {
        Debug.Log("testscript is beginning");
        UCIAdapter uciAdapter = new UCIAdapter(Application.dataPath + "/Engine/stockfish_10_x64.exe");

        uciAdapter.Start();
    }
コード例 #2
0
ファイル: AIPlayer.cs プロジェクト: YegorR/Yegor-s-Chess
    public AIPlayer(PlayerColor playerColor)
    {
        this.playerColor             = playerColor;
        uciAdapter                   = new UCIAdapter(Application.dataPath + RELATIVE_ENGINE_PATH);
        uciAdapter.EngineMovedEvent += OnEngineMoved;
        uciAdapter.Start();
        while (!uciAdapter.IsReady)
        {
        }
        UCIThreadAdapter uciThreadAdapter = UCIThreadAdapter.GetInstance();

        uciThreadAdapter.playerActedEvent += OnPlayerAct;
    }