コード例 #1
0
    bool ExcuteBestMoveCommand( CommandBase.CommandData cmdData )
    {
        if( EngineCmdExecuter != null ) {

            if( IsPonderMode ) {

                // ignore command if ponder fail!!!
                if( IsPonderFailed ) {

                    CurrentPonder = null;
                    IsPonderFailed = false;
                    return false;
                }
                else {

                    CurrentPonder = cmdData.GetSubCommandValue("ponder");
                }
            }
            else {

                if( IsForceStop ) {

                    IsForceStop = false;
                    CurrentPonder = null;
                    return false;
                }

                CurrentPonder = null;

            }

            return EngineCmdExecuter.OnBestMoveCommand( cmdData );
        }

        return false;
    }
コード例 #2
0
ファイル: GameMain.cs プロジェクト: chichikov/chichikov76
    public bool OnOptionCommand( CommandBase.CommandData cmdData )
    {
        // enable/disable ui engine option

        // setting default option
        ChessEngineOption option = ChessEngineManager.Instance.DefaultConfigData.GetConfigOption( cmdData.GetSubCommandValue("name") );
        if( option != null ) {

            OffGameUI offGameUIScript = GUIManager.Instance.GetUIHouseScript<OffGameUI>( "OffGameUI" );
            offGameUIScript.optionScrollPanelScript.SetOption( option );
            return true;
        }

        if( EngineCmdExecuterProxy != null )
            return EngineCmdExecuterProxy.OnOptionCommand( cmdData );

        return false;
    }