- enum PickType { Next, Best };
-
-public:
- MovePicker(const MovePicker&) = delete;
- MovePicker& operator=(const MovePicker&) = delete;
- MovePicker(const Position&, Move, Depth, const ButterflyHistory*,
- const CapturePieceToHistory*,
- const PieceToHistory**,
- Move,
- const Move*);
- MovePicker(const Position&, Move, Depth, const ButterflyHistory*,
- const CapturePieceToHistory*,
- const PieceToHistory**,
- Square);
- MovePicker(const Position&, Move, Value, const CapturePieceToHistory*);
- Move next_move(bool skipQuiets = false);
-
-private:
- template<PickType T, typename Pred> Move select(Pred);
- template<GenType> void score();
- ExtMove* begin() { return cur; }
- ExtMove* end() { return endMoves; }
-
- const Position& pos;
- const ButterflyHistory* mainHistory;
- const CapturePieceToHistory* captureHistory;
- const PieceToHistory** continuationHistory;
- Move ttMove;
- ExtMove refutations[3], *cur, *endMoves, *endBadCaptures;
- int stage;
- Square recaptureSquare;
- Value threshold;
- Depth depth;
- ExtMove moves[MAX_MOVES];
+ enum PickType {
+ Next,
+ Best
+ };
+
+ public:
+ MovePicker(const MovePicker&) = delete;
+ MovePicker& operator=(const MovePicker&) = delete;
+ MovePicker(const Position&,
+ Move,
+ Depth,
+ const ButterflyHistory*,
+ const CapturePieceToHistory*,
+ const PieceToHistory**,
+ const PawnHistory*,
+ Move,
+ const Move*);
+ MovePicker(const Position&,
+ Move,
+ Depth,
+ const ButterflyHistory*,
+ const CapturePieceToHistory*,
+ const PieceToHistory**,
+ const PawnHistory*);
+ MovePicker(const Position&, Move, Value, const CapturePieceToHistory*);
+ Move next_move(bool skipQuiets = false);
+
+ private:
+ template<PickType T, typename Pred>
+ Move select(Pred);
+ template<GenType>
+ void score();
+ ExtMove* begin() { return cur; }
+ ExtMove* end() { return endMoves; }
+
+ const Position& pos;
+ const ButterflyHistory* mainHistory;
+ const CapturePieceToHistory* captureHistory;
+ const PieceToHistory** continuationHistory;
+ const PawnHistory* pawnHistory;
+ Move ttMove;
+ ExtMove refutations[3], *cur, *endMoves, *endBadCaptures;
+ int stage;
+ Value threshold;
+ Depth depth;
+ ExtMove moves[MAX_MOVES];