From: H.G. Muller Date: Thu, 5 Jul 2012 21:13:26 +0000 (+0200) Subject: Add some debug prints X-Git-Tag: 0.18~98 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=9be37fd468b826cd273b3e005d6c4294958158f0;p=hachu.git Add some debug prints --- diff --git a/hachu.c b/hachu.c index 1f0fcfc..f7846b8 100644 --- a/hachu.c +++ b/hachu.c @@ -675,10 +675,13 @@ AddMove (int i, int x, int y) } #endif +int flag; + inline int 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) { // piece can promote with this move moveStack[msp++] = moveStack[nonCapts]; // create space for promotion moveStack[nonCapts++] = x<=retMSP) { // no exact match if(deferred) { // but maybe non-sensical deferral int flags = p[board[f]].promoFlag; +printf("# deferral of %d\n", deferred); i = deferred; // in any case we take that move if(!(flags & promoBoard[t] & (CANT_DEFER | LAST_RANK))) { // but change it into a deferral if that is allowed moveStack[i] &= ~PROMOTE;