- MovePicker mp = MovePicker(pos, false, MOVE_NONE, EmptySearchStack, OnePly);
+ enum { START, TO_FILE, TO_RANK, PROMOTION_OR_CHECK, PROMOTION, CHECK, END };
+ static const string pieceLetters = "KQRBN";
+
+ MoveStack mlist[MOVES_MAX], *last;
+ PieceType pt = PIECE_TYPE_NONE, promotion = PIECE_TYPE_NONE;
+ File fromFile = FILE_NONE, toFile = FILE_NONE;
+ Rank fromRank = RANK_NONE, toRank = RANK_NONE;
+ Move move = MOVE_NONE;
+ Square from, to;
+ int matches, state = START;
+
+ // Generate all legal moves for the given position
+ last = generate_moves(pos, mlist);