Esempio n. 1
0
        private string WriteCommand(string cmd, string value = null)
        {
            var s = cmd;

            if (value != null)
            {
                s += ' ' + value + "\n\n";
            }
#if DEBUG
            Debug.Write("WRITING COMMAND: " + s);
#endif
            var result = _fuego.HandleCommand(s);
            return(result);
        }
Esempio n. 2
0
        public GtpResponse SendCommand(string command)
        {
            string res     = _fuegoInstance.HandleCommand(command);
            bool   success = false;

            if (res.StartsWith("= "))
            {
                success = true;
                res     = res.Substring(2);
            }
            if (res.StartsWith("? "))
            {
                success = false;
                res     = res.Substring(2);
            }
            return(new GtpResponse(success, res.Trim()));
        }