|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T g
Length: 2630 (0xa46) Types: TextFile Names: »go.h«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/X/Xgo/go.h«
/* * $Header: go.h,v 1.2 88/02/13 12:57:08 hale Exp $ */ /* Copyright 1987 Greg Hale Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #include <curses.h> #include <sys/types.h> #include <sys/socket.h> #include <errno.h> #include "mesg.h" /* #include "externs.h" */ /* * HOW TO PRINT THE MAN PAGE- default is * "nroff -man /usr/man/manl/go.l | /usr/ucb/more" */ #define HELP_CMD "/usr/ucb/more /usr/public/go.doc" #define MAXDIM 19 /* maximum dimension */ #define MINDIM 9 /* minimum board dimension */ #define DEFAULTPORT 525 /* default port to connect with */ #define GOFILE "/.go_strength" /* information on player's strength */ #define DEFAULTSTR 1 /* default strength if never played */ #define MAXSTR 48 /* count from 1... maxstr */ #define WINSUP 6 /* how many wins (losses) in a row are needed to * go up a rank if you are weaker than * the other player. */ #define KOMI 5.5 /* standard komi- add to white at end of game */ #define P1 1 /* board types - player 1 pieces */ #define P2 2 /* player 2 pieces */ #define NONE 0 /* nothing */ #define MARK 3 /* neutral/marks for searches */ #define FASTMOVE 3 /* speed with <shift><dir> */ #define REDRAW '\014' /* ^l */ #define MAXBUF 200 /* maximum line buffer */ #define DEBUG(m) #define WHEN break; case #define OTHERWISE break; default #define and && #define or || #define true 1 #define false 0 #define UNSET 2 #define error(x) { fprintf(stderr,x); Exit(); } #define SEND(m) sendit(m) #define RECV(m) receive(m) typedef struct { char d[MAXDIM][MAXDIM]; } BOARD; #define b(x1,y1) board.d[x1][y1] /* JOE CODE- lazy hack. */ #define m(x2,y2) marks.d[x2][y2] /* my apologies */ #define HITAKEYMES "[Hit any key]" #define SCORE 0x1 /* state values */ #define QUIT 0x2 #define EXIT 0x4 #define REDRAWING 0x8 #define CANCEL 0x10 #define PLAY 0x20 #define HANDICAP 0x40 extern BOARD backup,board,marks; extern int curplr,hama[],MAXX,MAXY,cx,cy; extern int disable,myturn,sock,sockmask[],status,player,dimensions; extern char *blanks,display[]; extern char pieces[], buf[]; extern bool iamserver; extern int iwon; /* * $Log: go.h,v $ * Revision 1.2 88/02/13 12:57:08 hale * added logging. * */