+class MovePicker {
+public:
+ MovePicker(const MovePicker&) = delete;
+ MovePicker& operator=(const MovePicker&) = delete;
+
+ MovePicker(const Position&, Move, const HistoryStats&, Value);
+ MovePicker(const Position&, Move, Depth, const HistoryStats&, Square);
+ MovePicker(const Position&, Move, Depth, const HistoryStats&,
+ const CounterMoveStats&, const CounterMoveStats&, Move, Search::Stack*);
+
+ Move next_move();
+
+private:
+ template<GenType> void score();
+ void generate_next_stage();
+ ExtMove* begin() { return moves; }
+ ExtMove* end() { return endMoves; }
+
+ const Position& pos;
+ const HistoryStats& history;
+ const CounterMoveStats* counterMoveHistory;
+ const CounterMoveStats* followupMoveHistory;
+ Search::Stack* ss;
+ Move countermove;
+ Depth depth;
+ Move ttMove;
+ ExtMove killers[3];
+ Square recaptureSquare;
+ Value threshold;
+ int stage;
+ ExtMove *endQuiets, *endBadCaptures = moves + MAX_MOVES - 1;
+ ExtMove moves[MAX_MOVES], *cur = moves, *endMoves = moves;
+};