- // Check if pawn sacrifice plan _may_ save the day
- if (pliesToQueen[winnerSide] + 3 > pliesToGo + sacptg)
- return SCORE_ZERO;
-
- // Check if king capture plan _may_ save the day (contains some false positives)
- if (pliesToQueen[winnerSide] + 3 > pliesToGo + kingptg)
+ // Check if pawn sacrifice or king capture plan _may_ save the day
+ if (pliesToQueen[winnerSide] + 3 > pliesToGo + std::min(kingptg, sacptg))