// Add the new entry to the swap list
swapList[slIndex] = -swapList[slIndex - 1] + PieceValue[MG][captured];
- ++slIndex;
// Locate and remove the next least valuable attacker
captured = min_attacker<PAWN>(byTypeBB, to, stmAttackers, occupied, attackers);
// Stop before processing a king capture
if (captured == KING && stmAttackers)
- {
- swapList[slIndex++] = QueenValueMg * 16;
break;
- }
+
+ ++slIndex;
} while (stmAttackers);