Promotions in Kyoto Shogi are not moves that deserve to be treated as
captures. This would search basically all moves in QS, and would hardly
sort any moves by history. Now that demotions are treated as non-captures
QS search explosion is much less of a problem.
moveStack[slot] = move | from << 8 | to;
}
if(promote & stm) { // promotion is (also?) possible
- moveStack[--m->firstMove] = (move | from << 8 | to + 11) + (vVal[victim-WHITE] + 20 << 24); // put it amongst captures
+ int slot = (promoDrops && !victim && piece&16 ? moveSP++ : --m->firstMove); // group demotions with non-captures
+ moveStack[slot] = (move | from << 8 | to + 11) + (vVal[victim-WHITE] + 20 << 24); // put it amongst captures
if(!perpLoses) { // only for FIDE Pawns
moveStack[--m->firstMove] = move | from << 8 | to - 11 + (stm >> 6)*44; // turn previously-generated deferral into under-promotion
// other under-promotions could go here (Capahouse?)