+public:
+ MovePicker(const Position&, Move, Depth, const HistoryStats&, Square);
+ MovePicker(const Position&, Move, const HistoryStats&, PieceType);
+ MovePicker(const Position&, Move, Depth, const HistoryStats&, Move*, Search::Stack*, Value);
+
+ template<bool SpNode> Move next_move();
+
+private:
+ template<GenType> void score();
+ void generate_next();
+
+ const Position& pos;
+ const HistoryStats& history;
+ Search::Stack* ss;
+ Move* countermoves;
+ Depth depth;
+ Move ttMove;
+ MoveStack killers[4];
+ Square recaptureSquare;
+ int captureThreshold, phase;
+ MoveStack *cur, *end, *endQuiets, *endBadCaptures;
+ MoveStack moves[MAX_MOVES];
+};