public SimpleSearch(Board board, PonderEngine engine) { this.board = board; wantStop = false; //bestMove = null; this.engine = engine; }
static void Main(string[] args) { PonderEngine engine = null; try { engine = new PonderEngine(); while (true) { string cmd; if ((cmd = Console.ReadLine()) != null) { if (EngineStatus.Quit == engine.ExecuteCommand(cmd)) break; } System.Threading.Thread.Sleep(100); } } catch (System.Exception ex) { engine.Output.WriteLine("info Exception: " + ex); System.Console.WriteLine(ex); } }
/// <summary> /// 构造函数,需要指定搜索开始时的初始局面 /// </summary> /// <param name="board">初始盘面</param> public SimpleSearch(Board board) { this.board = board; wantStop = false; //bestMove = null; engine = null; }
/// <summary> /// 构造函数 /// </summary> /// <param name="board">盘面</param> /// <param name="transpositionTable">置换表</param> /// <param name="engine">引擎</param> public SearchTT(Board board, TranspositionTable transpositionTable, PonderEngine engine) { this.Ply = 0; this.board = board; this.transpositionTable = transpositionTable; //this.bestMove = null; this.engine = engine; }