From: H.G.Muller Date: Wed, 11 Jun 2014 20:52:18 +0000 (+0200) Subject: Fix promotion on entry X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=71d90af3d1e47be123cc9988245cbf5f0fdda27e;p=hachu.git Fix promotion on entry The promote on entry option would also allow promotion when pieces in their own promotion zone entered the zone of the opponent! --- diff --git a/hachu.c b/hachu.c index 11e1222..4416567 100644 --- a/hachu.c +++ b/hachu.c @@ -1057,8 +1057,8 @@ NewNonCapture (int x, int y, int promoFlags) { if(board[y] != EMPTY) return 1; // edge, capture or own piece //if(flag) printf("# add %c%d%c%d, pf=%d\n", x%BW+'a',x/BW,y%BW+'a',y/BW, promoFlags); - if( (promoBoard[x] | promoBoard[y]) & promoFlags && - (!entryProm || promoBoard[y] & ~promoBoard[x] & CAN_PROMOTE )){ // piece can promote with this move + if( (entryProm ? promoBoard[y] & ~promoBoard[x] & CAN_PROMOTE + : promoBoard[y] | promoBoard[x] ) & promoFlags ){ // piece can promote with this move moveStack[msp++] = moveStack[nonCapts]; // create space for promotion moveStack[nonCapts++] = x<