- // Serialize standard captures
- if (Type == CAPTURE || Type == EVASION)
- SERIALIZE_MOVES_D(b1, -TTDELTA_NE);
+ if (Delta != DELTA_N && Delta != DELTA_S)
+ b &= ~TFileABB;
+
+ while (b)
+ {
+ to = pop_1st_bit(&b);
+
+ if (Type == CAPTURE || Type == EVASION)
+ (*mlist++).move = make_promotion_move(to - Delta, to, QUEEN);
+
+ if (Type == NON_CAPTURE || Type == EVASION)
+ {
+ (*mlist++).move = make_promotion_move(to - Delta, to, ROOK);
+ (*mlist++).move = make_promotion_move(to - Delta, to, BISHOP);
+ (*mlist++).move = make_promotion_move(to - Delta, to, KNIGHT);
+ }