-extern void init_threads();
-extern void stop_threads();
-extern bool think(const Position &pos, bool infinite, bool ponder, int side_to_move,
- int time[], int increment[], int movesToGo, int maxDepth,
- int maxNodes, int maxTime, Move searchMoves[]);
-extern int64_t nodes_searched();
+struct SearchLimits {
+
+ SearchLimits() { memset(this, 0, sizeof(SearchLimits)); }
+
+ SearchLimits(int t, int i, int mtg, int mt, int md, int mn, bool inf, bool pon)
+ : time(t), increment(i), movesToGo(mtg), maxTime(mt), maxDepth(md),
+ maxNodes(mn), infinite(inf), ponder(pon) {}
+
+ bool useTimeManagement() const { return !(maxTime | maxDepth | maxNodes | infinite); }
+
+ int time, increment, movesToGo, maxTime, maxDepth, maxNodes, infinite, ponder;
+};