home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Games 3 / cd.iso / os2 / pmgnuchs / debug12.h < prev    next >
C/C++ Source or Header  |  1993-06-22  |  788b  |  33 lines

  1.     if (1)
  2.       {
  3.         FILE *D;
  4.         int r, c, l;
  5.         extern unsigned short int PrVar[];
  6.         extern struct leaf *root;
  7.         D = fopen ("/tmp/DEBUGA", "a+");
  8.         fprintf (D, "score = %d\n", root->score);
  9.         fprintf (D, "inout move is %s\n", s);
  10.         for (r = 1; PrVar[r]; r++)
  11.           {
  12.         algbr (PrVar[r] >> 8, PrVar[r] & 0xff, (short) 0);
  13.         fprintf (D, " %s", mvstr[0]);
  14.           }
  15.         fprintf (D, "\n current board is\n");
  16.         for (r = 7; r >= 0; r--)
  17.           {
  18.         for (c = 0; c <= 7; c++)
  19.           {
  20.             l = locn (r, c);
  21.             if (color[l] == neutral)
  22.               fprintf (D, " -");
  23.             else if (color[l] == white)
  24.               fprintf (D, " %c", qxx[board[l]]);
  25.             else
  26.               fprintf (D, " %c", pxx[board[l]]);
  27.           }
  28.         fprintf (D, "\n");
  29.           }
  30.         fprintf (D, "\n");
  31.         fclose (D);
  32.       }
  33.