+/// MovePicker class is used to pick one pseudo legal move at a time from the
+/// current position. The most important method is next_move(), which returns a
+/// new pseudo legal move each time it is called, until there are no moves left,
+/// when MOVE_NONE is returned. In order to improve the efficiency of the alpha
+/// beta algorithm, MovePicker attempts to return the moves which are most likely
+/// to get a cut-off first.
+
+class MovePicker {
+
+ MovePicker& operator=(const MovePicker&); // Silence a warning under MSVC
+
+public:
+ MovePicker(const Position&, Move, Depth, const History&, Search::Stack*, Move, Value);
+ MovePicker(const Position&, Move, Depth, const History&, Square);
+ MovePicker(const Position&, Move, const History&, PieceType);
+ template<bool SpNode> Move next_move();
+
+private:
+ template<GenType> void score();
+ void generate_next();
+
+ const Position& pos;
+ const History& Hist;
+ Search::Stack* ss;
+ Depth depth;
+ Move ttMove;
+ MoveStack killers[3];
+ Square recaptureSquare;
+ int captureThreshold, phase;
+ MoveStack *cur, *end, *endQuiets, *endBadCaptures;
+ MoveStack moves[MAX_MOVES];
+};