1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
/*=========================================================================
=== ===
=== FILE amigo.h ===
=== ===
=== CONTENTS prototypes for the various AmiGo routines. ===
=== added by neilb ===
=== ===
=========================================================================*/
#ifndef __amigo_h
#define __amigo_h
#include "go.h"
#include "goplayutils.h"
#ifdef __STDC__
#define PROTO(fp) fp
#else
#define PROTO(fp) ()
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* From goplayer.c */
/* Procedures from amigo.c */
short Connect PROTO((enum bVal, short, short, short[4], short[4], short *, short * ));
short Maxlibs PROTO((short, short));
short Suicide PROTO((enum bVal, short, short));
short StoneLibs PROTO((short, short));
void EraseMarks PROTO(());
short GoPlaceStone PROTO((enum bVal, short, short));
void GoRemoveStone PROTO((short, short));
void MergeGroups PROTO((short, short));
void DeleteGroup PROTO((short));
void ReEvalGroups PROTO((enum bVal, short, short, short));
void GroupCapture PROTO((short));
void FixLibs PROTO((enum bVal, short, short, short));
int CountUp PROTO((int*, int*));
/*void main PROTO(());*/
void goRestart PROTO((int));
void RelabelGroups PROTO(());
short CountAndMarkLibs PROTO((short, short));
void CountLiberties PROTO((short));
void CheckForEye PROTO((short, short, short[4], short, short *));
void CountEyes PROTO(());
void printGroupReport PROTO((short, short));
/* killable.c */
int tryPlay PROTO(( short, short, short ));
int sSpanGroup PROTO(( short, short, sPointList * ));
int spanGroup PROTO(( short, short, pointList *));
int pause PROTO(());
int genState PROTO(());
int initGPUtils PROTO(());
int genBord PROTO((enum bVal));
short genMove PROTO(( enum bVal, short *, short * ));
short checkPos PROTO(( short, short, short ));
short takeCorner PROTO(( short *, short * ));
short extend PROTO(( short *, short * ));
short noNbrs PROTO(( short, short ));
short extend2 PROTO(( short *, short * ));
short lookForSave PROTO(( short *, short * ));
short lookForSaveN PROTO(( short *, short * ));
short lookForKill PROTO(( short *, short * ));
short doubleAtari PROTO(( short *, short * ));
short lookForAttack PROTO(( short *, short * ));
short threaten PROTO(( short *, short * ));
short connectCut PROTO(( short *, short * ));
short heCanCut PROTO(( short, short ));
short safeMove PROTO(( short, short ));
short extendWall PROTO(( short *, short * ));
short findAttack2 PROTO(( short *, short * ));
short blockCut PROTO(( short *, short * ));
short cutHim PROTO(( short *, short * ));
short atariAnyway PROTO(( short *, short * ));
short underCut PROTO(( short *, short * ));
short dropToEdge PROTO(( short *, short * ));
short pushWall PROTO(( short *, short * ));
short reduceHisLiberties PROTO(( short *, short * ));
short dropToEdge2 PROTO(( short *, short * ));
/* goplayutils.c */
short saveable PROTO((short, short, short *, short *));
short killable PROTO((short, short, short *, short *));
int initBoolBoard PROTO((boolBoard));
int intersectPlist PROTO((pointList *, pointList *, pointList *));
int initArray PROTO((intBoard));
int initState PROTO(());
int copyArray PROTO((intBoard, intBoard));
int stake PROTO(());
int spread PROTO(());
int respreicen PROTO(());
int tryPlay PROTO((short, short, short));
int saveState PROTO(());
int restoreState PROTO(());
short tencen PROTO((short, short));
int genConnects PROTO(());
int sortLibs PROTO(());
/*-- from xinterface.c --*/
void removestone PROTO((short, short));
void placestone PROTO((enum bVal, short, short));
void intrMoveReport PROTO((enum bVal,char *,char *));
void intrPrisonerReport PROTO(( short, short ));
#ifdef __cplusplus
}
#endif
#endif
|