In case of a mate we now check if the previous move was a Pawn drop,
and correct the score to a win if we detect one. In Crazyhouse we
test for check, and correct to draw due to stalemate without one.
} while(iterDepth < maxDepth && (ply || !TimeIsUp(1))); // IID loop
+ if(bestScore == -INF) { // we are mated!
+ if(perpLoses) { // Shogi
+ if(ff->fromSqr == handSlot[stm]) bestScore = INF; // mated by Pawn drop, so we win!
+ } else if(f.checker == CK_NONE) bestScore = 0; // stalemate in zh is draw
+ }
+
cutoff:
// delayed-loss bonus
bestScore += (bestScore < curEval);