From: H.G.Muller Date: Mon, 6 Feb 2017 18:05:37 +0000 (+0100) Subject: Fix deferral X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=211a3986232c56e328d23208f1d89c5b639fe210;p=crazywa.git Fix deferral Pieces that could promote would not be allowed to defer. Which is OK for Crazyhouse, but not for Shogi. Now only pieces that have the must-promote ormust-promote-one-last-2-ranks flags set get their promotion suppressed where these flags request it. --- diff --git a/dropper.c b/dropper.c index adcd956..d229f91 100644 --- a/dropper.c +++ b/dropper.c @@ -805,7 +805,7 @@ MoveGen (int stm, MoveStack *m, int castle) if((victim & ~COLOR) == 31) return 1; // captures King; abort! move = piece << 16; // store piece in move promote = (inZone | zoneTab[to]) & promoCode[piece-WHITE]; - if((promote & (Z_2ND | Z_MUST )) == 0) { // not in place where deferral forbidden + if((promote & ((Z_2ND | Z_MUST ) & ~COLOR)) == 0) { // not in place where deferral forbidden int slot; if(victim) { // capture slot = --m->firstMove;