110,477
社区成员
发帖
与我相关
我的任务
分享
Process p = new Process();
p.StartInfo.FileName = strExePath;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
//p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.Start();
p.StandardInput.WriteLine("ucci");
p.StandardInput.WriteLine("setoption batch on");
//p.StandardInput.WriteLine("position fen 4C4/4a4/b2ank2b/9/9/1RNR1crC1/3r1p3/3cKA3/4A4/4n4 w - - 0 1");
p.StandardInput.WriteLine( "position fen " + _Fen + " " + ( isRed ? "r" : "b" ) + " - - 0 0" );
p.StandardInput.WriteLine("go time 5000");
p.StandardInput.WriteLine("quit");
string re = p.StandardOutput.ReadToEnd();
p.Close();