home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuch40.zip / gnuchess-4.0.pl79 / src / debug512.h < prev    next >
C/C++ Source or Header  |  1998-09-28  |  920b  |  43 lines

  1. #ifdef DEBUG
  2. /*
  3.     types debug?
  4.  
  5.         enter:
  6.             pxx    trace plys > xx
  7.             xxxx    moves in alg. notation. 1 per line
  8.                     empty line terminates input
  9.  
  10.     trace is printed for all lines deeper than xx and beginning with the 
  11.     move sequence entered.
  12. */
  13. if (debuglevel & 2560)
  14. {
  15.     int             j;
  16.  
  17.     if (debuglevel & 512 && (tracen > 0 && traceflag))
  18.     {
  19.     traceline[0]='\0';
  20.     for (j=1;tracelog[j];j++){
  21.         algbr(tracelog[j]>>8,tracelog[j]&0xff,0);
  22.         strcat(traceline," ");
  23.         strcat(traceline,mvstr[0]);
  24.     }
  25.  
  26.     printf("Ply %d alpha %d beta %d score %d %s\n", ply, alpha, beta, score,traceline);
  27.     if(debuglevel & 2048){
  28.         for (j = ply; j < ply + 1; j++)
  29.         {
  30.             int             idb;
  31.  
  32.             for (idb = TrPnt[j]; idb < TrPnt[j + 1]; idb++)
  33.             {
  34.                 algbr(Tree[idb].f, Tree[idb].t, Tree[idb].flags);
  35.                 printf("level 512 %d-->%d %s %d %d %x\n", ply, idb, mvstr[0], Tree[idb].score, Tree[idb].width, Tree[idb].flags);
  36.             }
  37.         }
  38. }
  39. }
  40.     }
  41.  
  42. #endif
  43.