+class MovePicker {
+public:
+ MovePicker(const MovePicker&) = delete;
+ MovePicker& operator=(const MovePicker&) = delete;
+
+ MovePicker(const Position&, Move, Depth, const HistoryStats&, const CounterMovesHistoryStats&, Square);
+ MovePicker(const Position&, Move, const HistoryStats&, const CounterMovesHistoryStats&, PieceType);
+ MovePicker(const Position&, Move, Depth, const HistoryStats&, const CounterMovesHistoryStats&, Move*, Move*, Search::Stack*);
+
+ template<bool SpNode> 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 CounterMovesHistoryStats& counterMovesHistory;
+ Search::Stack* ss;
+ Move* countermoves;
+ Move* followupmoves;
+ Depth depth;
+ Move ttMove;
+ ExtMove killers[6];
+ Square recaptureSquare;
+ Value captureThreshold;
+ int stage;
+ ExtMove *endQuiets, *endBadCaptures;
+ ExtMove moves[MAX_MOVES], *cur = moves, *endMoves = moves;
+};