]> git.sesse.net Git - stockfish/blobdiff - src/movepick.h
Revert "null move reorder" series
[stockfish] / src / movepick.h
index 46cf69ddce30ec4f51f51b83f92b04d740d0e4e5..147d5d0b0a666915031f687a82e0d858f7aad5ce 100644 (file)
@@ -38,7 +38,6 @@
 struct SearchStack;
 
 enum MovegenPhase {
-  PH_NULL_MOVE,      // Null move
   PH_TT_MOVES,       // Transposition table move and mate killer
   PH_GOOD_CAPTURES,  // Queen promotions and captures with SEE values >= 0
   PH_KILLERS,        // Killer moves from the current ply
@@ -65,7 +64,7 @@ class MovePicker {
   MovePicker& operator=(const MovePicker&); // silence a warning under MSVC
 
 public:
-  MovePicker(const Position& p, Move ttm, Depth d, const History& h, SearchStack* ss = NULL, bool useNullMove = false);
+  MovePicker(const Position& p, Move ttm, Depth d, const History& h, SearchStack* ss = NULL);
   Move get_next_move();
   Move get_next_move(Lock& lock);
   int number_of_moves() const;
@@ -75,14 +74,15 @@ private:
   void score_captures();
   void score_noncaptures();
   void score_evasions();
-  Move pick_move_from_list();
+  void go_next_phase();
 
   const Position& pos;
   const History& H;
-  Move ttMoves[2], killers[2];
-  const MovegenPhaseT* phasePtr;
-  int movesPicked, numOfMoves, numOfBadCaptures;
+  MoveStack ttMoves[2], killers[2];
   bool finished;
+  int numOfBadCaptures, phase;
+  const MovegenPhaseT* phasePtr;
+  MoveStack *curMove, *lastMove;
   Bitboard dc, pinned;
   MoveStack moves[256], badCaptures[64];
 };
@@ -98,7 +98,7 @@ private:
 /// a single reply to check.
 
 inline int MovePicker::number_of_moves() const {
-  return numOfMoves;
+  return int(lastMove - moves);
 }
 
 /// MovePicker::discovered_check_candidates() returns a bitboard containing