home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Games / NeXTGo-3.0-MIS / countlib.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-06  |  665 b   |  33 lines

  1. #include "comment.header"
  2.  
  3. /* $Id: countlib.c,v 1.3 1997/07/06 19:34:53 ergo Exp $ */
  4.  
  5. /*
  6.  * $Log: countlib.c,v $
  7.  * Revision 1.3  1997/07/06 19:34:53  ergo
  8.  * actual version
  9.  *
  10.  * Revision 1.2  1997/05/04 18:56:58  ergo
  11.  * added time control for moves
  12.  *
  13.  */
  14.  
  15. extern unsigned char ml[19][19];
  16. extern int MAXX, MAXY;
  17. extern void count(int m, int n, int color);
  18.  
  19. void countlib(int m,int n,int color)
  20.      /* count liberty of color piece at m, n */
  21. {
  22.   int i, j;
  23.   
  24.   /* set all piece as unmarked */
  25.   for (i = 0; i < MAXX; i++)
  26.     for (j = 0; j < MAXY; j++)
  27.       ml[i][j] = 1;
  28.   
  29.   /* count liberty of current piece */
  30.   count(m, n, color);
  31. }  /* end countlib */
  32.  
  33.