From 9be37fd468b826cd273b3e005d6c4294958158f0 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 5 Jul 2012 23:13:26 +0200 Subject: [PATCH] Add some debug prints --- hachu.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) 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; -- 1.7.0.4