private void _theEngineClient_BestMoveReceived(object sender, BestMoveReceivedEventArgs e) { m_InfoType = InfoType.BestMove; bestMove = e.BestMove; threadPro(); _theEngineClient.BestMoveReceived -= new BestMoveReceivedEventHandler(_theEngineClient_BestMoveReceived); }
private void _ponderEngine_OutputDataReceived(object sender, DataReceivedEventArgs e) { string m_UcciInfo = e.Data; if (!string.IsNullOrEmpty(m_UcciInfo)) { m_LogHandler.logging(e.Data); m_engineInfos.Append(m_UcciInfo + "\n"); UcciCommand cmd = UcciCommand.Parse(m_UcciInfo); if (cmd.Name == "ucciok") { EngineIsOK(this, null); } else if (cmd.Name == "bestmove") { string bestmove = cmd.Paras.Substring(0, 4); BestMoveReceivedEventArgs newEvent = new BestMoveReceivedEventArgs(bestmove); BestMoveReceived(this, newEvent); } else if (cmd.Name == "position") { } } }