summaryrefslogtreecommitdiff
path: root/noncore/games/go/goplayutils.h
Unidiff
Diffstat (limited to 'noncore/games/go/goplayutils.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/go/goplayutils.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/noncore/games/go/goplayutils.h b/noncore/games/go/goplayutils.h
new file mode 100644
index 0000000..11ab658
--- a/dev/null
+++ b/noncore/games/go/goplayutils.h
@@ -0,0 +1,85 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef __goplayutils_h
21#define __goplayutils_h
22
23#define iNil 32767 /* a distinguished value like nil */
24#define maxGroup 512
25#define maxSPoint 16
26#define tryLimit 300
27
28typedef short intBoard[19][19]; /* these were -2 to maxPoint + 2 */
29
30typedef short boolBoard[19][19];
31
32typedef struct
33{
34 short px, py;
35} point;
36
37typedef struct
38{
39 point p[401];
40 short indx;
41} pointList;
42
43typedef struct
44{
45 point p[maxSPoint+1];
46 short indx;
47} sPointList;
48
49typedef struct
50{
51 short indx,
52 v[401];
53} intList;
54
55typedef struct { short w, s, sm; } sgRec;
56
57typedef struct
58{
59 short groupMark,
60 atLevel,
61 isLive,
62 isDead,
63 libC,
64 numEyes,
65 size,
66 lx, ly;
67} groupRec;
68
69typedef enum {rem, add, chLib, reMap} playType;
70
71typedef struct { short who, xl, yl, nextGID, sNumber; } remAddRec;
72typedef struct { short oldLC, oldLevel; } chLibRec;
73typedef struct { short oldGID; } reMapRec;
74typedef struct
75{
76 short gID;
77 playType kind;
78 union {
79 remAddRec rem, add;
80 chLibRec chLib;
81 reMapRec reMap;
82 } uval;
83} playRec;
84
85#endif