]> git.sesse.net Git - stockfish/blobdiff - src/search.h
Retire support for Haiku installation directory from Makefile
[stockfish] / src / search.h
index 2fd160b68a6d9ab5a58f45e8321880c9ab3d9b98..0c552d39f5058220350e233a0a155af8ad188296 100644 (file)
@@ -38,6 +38,7 @@ namespace Search {
 
 struct Stack {
   SplitPoint* splitPoint;
+  Move* pv;
   int ply;
   Move currentMove;
   Move ttMove;
@@ -55,14 +56,11 @@ struct Stack {
 /// all non-pv moves.
 struct RootMove {
 
-  RootMove(Move m) : score(-VALUE_INFINITE), prevScore(-VALUE_INFINITE) {
-    pv.push_back(m); pv.push_back(MOVE_NONE);
-  }
+  RootMove(Move m) : score(-VALUE_INFINITE), prevScore(-VALUE_INFINITE), pv(1, m) {}
 
   bool operator<(const RootMove& m) const { return score > m.score; } // Ascending sort
   bool operator==(const Move& m) const { return pv[0] == m; }
 
-  void extract_pv_from_tt(Position& pos);
   void insert_pv_in_tt(Position& pos);
 
   Value score;
@@ -105,8 +103,8 @@ extern Position RootPos;
 extern Time::point SearchTime;
 extern StateStackPtr SetupStates;
 
-extern void init();
-extern void think();
+void init();
+void think();
 template<bool Root> uint64_t perft(Position& pos, Depth depth);
 
 } // namespace Search