From b37ee3ab03f99fc14b8cbe2a9ca6f0c492a52c1f Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 18 Feb 2018 20:08:02 +0100 Subject: [PATCH] Fix of double-Q-sac fix The Queen is piece #4 instead of 5. --- dropper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dropper.c b/dropper.c index 5d66783..41c4ac8 100644 --- a/dropper.c +++ b/dropper.c @@ -576,7 +576,7 @@ GameInit (char *name) for(i=16,ip++; *ip >= 0; i++) pieceValues[WHITE+i] = pieceValues[BLACK+i] = *ip++; // promoted for(i=0, ip++; *ip >= 0; i++) handVal[WHITE+i] = handVal[BLACK+i] = *ip++; // in hand pawn = 2*handVal[WHITE] << 20; // used for detection of material-loosing loop - queen = v ? 0 : 2*handVal[WHITE+5] << 20; // losing two Queens overflows + queen = v ? 0 : 2*handVal[WHITE+4] << 20; // losing two Queens overflows for(i=0; i<16; i++) { int demoted = dropType[handSlot[WHITE+i+16]]-1; // piece type after demotion (could be Pawn, in Chess) handVal[WHITE+i+16] = handVal[BLACK+i+16] = pieceValues[WHITE+i+16] + handVal[demoted]; // gain by capturing promoted piece -- 1.7.0.4