ftp.nice.ch/pub/next/games/network/NeXTGo.2.7.NIHS.bs.gnutar.gz#/NeXTGo/eval.c

This is eval.c in view mode; [Download] [Up]

#include "comment.header"

/* $Id: eval.c,v 1.3 1997/07/06 19:34:54 ergo Exp $ */

/*
 * $Log: eval.c,v $
 * Revision 1.3  1997/07/06 19:34:54  ergo
 * actual version
 *
 * Revision 1.2  1997/05/04 18:56:59  ergo
 * added time control for moves
 *
 */

extern unsigned char p[19][19], l[19][19];
extern int lib, MAXX, MAXY;
extern void countlib(int i, int j, int color);

void eval(int color)
     /* evaluate liberty of color pieces */
{
  int i, j;
  
  /* find liberty of each piece */
  for (i = 0; i < MAXX; i++)
    for (j = 0; j < MAXY; j++)
      if (p[i][j] == color)
	{
	  lib = 0;
	  countlib(i, j, color);
	  l[i][j] = lib;
	}
}  /* end eval */

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.