]> git.sesse.net Git - stockfish/blobdiff - src/movepick.h
Use pointers instead of array indices in MovePicker
[stockfish] / src / movepick.h
index 46cf69ddce30ec4f51f51b83f92b04d740d0e4e5..ced0a051654685cbe48fb2c99662d7604de4d38f 100644 (file)
@@ -75,15 +75,16 @@ 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;
+  int phase, movesPicked, numOfBadCaptures;
   bool finished;
   Bitboard dc, pinned;
+  MoveStack *curMove, *lastMove;
   MoveStack moves[256], badCaptures[64];
 };
 
@@ -98,7 +99,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