home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / Apps / Games / NeXTGo / Source / Board.h < prev    next >
Encoding:
C/C++ Source or Header  |  1977-12-27  |  3.5 KB  |  109 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. #import <appkit/View.h>
  49. #import <dpsclient/dpsNeXT.h>
  50.  
  51. // Maximum number of tiles in the playing area...
  52.   
  53. #define WHITESTONE    1     
  54. #define BLACKSTONE    2
  55.   
  56. extern unsigned char p[19][19];
  57. extern unsigned char patternmat[19][19], scoringmat[19][19], ownermat[19][19];
  58. extern unsigned char tempmat[19][19], newpatternmat[19][19], mark[19][19];
  59. extern int rd, bothSides, neitherSide, blackSide, whiteSide, MAXX, MAXY;
  60. extern int opn[9], blackCaptured, whiteCaptured, handicap;
  61. extern int currentStone, opposingStone, blackPassed, whitePassed;
  62. extern int blackTerritory, whiteTerritory;
  63. extern float black_Score, white_Score;
  64.  
  65. @interface GoView:View 
  66. {
  67.   
  68.   BOOL gameRunning, finished;
  69.   
  70.   id blackStone, whiteStone, grayStone, backGround, gameMessage, blackPrisoners, whitePrisoners, gameMessage2, startButton, stopButton, passButton, mainMenu, upperLeft, upperRight, lowerLeft, lowerRight, midLeft, midRight, midTop, midBottom, innerSquare, innerHandicap;
  71.   
  72.   // The following six are outlets set when the nib file is being
  73.     // read in.
  74.       
  75.     }
  76.  
  77. // The following methods can be called by Interface Builder objects &
  78.   // during creation/destruction of instances of BreakView.
  79.   
  80.   - initFrame:(const NXRect *)frm;
  81. - free;
  82.  
  83. - startNewGame;
  84. - go:sender;              // mouseDown: on the view does the same thing
  85.   - stop:sender;
  86.   - passMove;
  87.  
  88. - changeBackground:sender;
  89. - revertBackground:sender;
  90.  
  91. // The following methods are internal and probably should not be called
  92.   // by others.
  93.   
  94.   - setBackgroundFile:(const char *)fileName andRemember:(BOOL)remember;
  95. - drawSelf:(NXRect *)rects :(int)rectCount;
  96. - drawBackground:(NXRect *)rect;
  97. - showBlackStone;
  98. - showWhiteStone;
  99. - showBackgroundPiece: (int)x: (int)y;
  100. - eraseStone;
  101. - updateInfo;
  102. - scoreGame;
  103. - step;
  104. - selectMove;
  105. - selectMoveEnd;
  106. - flashStone: (int)x :(int)y;
  107.  
  108. @end
  109.