home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / Apps / Games / NeXTGo / Source / gnugo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1977-12-27  |  3.9 KB  |  86 lines

  1. /*
  2.                 GNU GO - the game of Go (Wei-Chi)
  3.                 Version 1.1   last revised 3-1-89
  4.            Copyright (C) Free Software Foundation, Inc.
  5.                       written by Man L. Li
  6.                       modified by Wayne Iba
  7.                     documented by Bob Webber
  8.                     NeXT version by John Neil
  9. */
  10. /*
  11. This program is free software; you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation - version 1.
  14.  
  15. This program is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. GNU General Public License in file COPYING for more details.
  19.  
  20. You should have received a copy of the GNU General Public License
  21. along with this program; if not, write to the Free Software
  22. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23.  
  24. Please report any bug/fix, modification, suggestion to
  25.  
  26. mail address:   Man L. Li
  27.                 Dept. of Computer Science
  28.                 University of Houston
  29.                 4800 Calhoun Road
  30.                 Houston, TX 77004
  31.  
  32. e-mail address: manli@cs.uh.edu         (Internet)
  33.                 coscgbn@uhvax1.bitnet   (BITNET)
  34.                 70070,404               (CompuServe)
  35.  
  36. For the NeXT version, please report any bug/fix, modification, suggestion to
  37.  
  38. mail address:   John Neil
  39.                 Mathematics Department
  40.                 Portland State University
  41.                 PO Box 751
  42.                 Portland, OR  97207
  43.  
  44. e-mail address: neil@math.mth.pdx.edu  (Internet)
  45.                 neil@psuorvm.bitnet    (BITNET)
  46. */
  47.  
  48. extern void sethand(int i);        // set up the handicap stones.
  49. extern void examboard(int color);  // remove dead stones.
  50. extern void eval(int color);       // evaluate the liberties of the stones.
  51. extern void countlib(int m, int n, int color);
  52.                                    // count the liberties of the color at m,n.
  53. extern void count(int i, int j, int color);
  54.                                    // count the liberties of the stone at i,j.
  55. extern int suicide(int i, int j);  // determine if legally placed stone.
  56. extern void genmove(int *i, int *j);
  57.                                    // generate computer move.
  58. extern int findwinner(int *i, int *j, int *val);
  59.                                    // find opponent piece to capture or attack.
  60. extern int findopen(int m, int n, int i[], int j[], int color, int minlib, int *ct);
  61.                                    // find all open spaces i, j from m, n.
  62. extern int findsaver(int *i, int *j, int *val);
  63.                                    // find move if any pieces are threatened.
  64. extern void initmark();            // initialize all markings with zero.
  65. extern int findnextmove(int m, int n, int *i, int *j, int *val, int minlib);
  66.                                    // find new move i,j from group containing m,n.
  67. extern int fval(int newlib, int minlib);
  68.                                    // evaluate new move.
  69. extern int findpatn(int *i, int *j, int *val);
  70.                                    // find pattern to match for next move.
  71. extern int opening(int *i, int *j, int *cnd, int type);
  72.                                    // get move for opening from game tree.
  73. extern int openregion(int i1, int j1, int i2, int j2);
  74.                                    // check if region from i1,j1  to i2,j2 is open.
  75. extern int matchpat(int m, int n, int *i, int *j, int *val);
  76.                                    // match pattern and get next move.
  77. extern int fioe(int i, int j);     // check edges.
  78. extern void Random(int *i);        // return a random integer.
  79. extern void seed(int *i);          // seed a random number generator.
  80. extern void score_game(void);      // remove dead stones and score the game.
  81. extern void find_owner(void);
  82. extern int surrounds_territory(int x, int y);
  83. extern void find_pattern_in_board(int x, int y);
  84. extern void set_temp_to_p(void);
  85. extern void set_p_to_temp(void);
  86.