X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.h;h=3262c757cbe05aa4ff50e07ad3711ac3ec453aab;hp=757aeb002ae110896c7f89d0b0afb019da1e523e;hb=ed04c010eb4a569532f322f5030d468380b3ab57;hpb=e9dc2e9e1ec5a9e2d02300bbf33e69213548ab5d diff --git a/src/search.h b/src/search.h index 757aeb00..3262c757 100644 --- a/src/search.h +++ b/src/search.h @@ -20,11 +20,11 @@ #if !defined(SEARCH_H_INCLUDED) #define SEARCH_H_INCLUDED -#include - #include "move.h" #include "types.h" +#include + class Position; struct SplitPoint; @@ -53,21 +53,19 @@ struct SearchStack { 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; }; +extern SearchLimits Limits; +extern std::vector SearchMoves; +extern Position* RootPosition; + extern void init_search(); extern int64_t perft(Position& pos, Depth depth); -extern bool think(Position& pos, const SearchLimits& limits, Move searchMoves[]); -extern void do_uci_async_cmd(const std::string& cmd); +extern void think(); +extern void uci_async_command(const std::string& cmd); extern void do_timer_event(); #endif // !defined(SEARCH_H_INCLUDED)