aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/dat.h b/dat.h
index 46a3c12..07b7dd3 100644
--- a/dat.h
+++ b/dat.h
@@ -18,6 +18,9 @@ enum {
OH, /* horizontal */
OV, /* vertical */
+ GMPvP = 0,
+ GMPvAI,
+
Waiting0 = 0,
Watching,
Ready,
@@ -25,6 +28,10 @@ enum {
Waiting,
Playing,
+ ASearching = 0,
+ ACalibrating,
+ ABombing,
+
Boardmargin = 50,
TW = 16,
TH = TW,
@@ -55,6 +62,7 @@ typedef struct Map Map;
typedef struct Board Board;
typedef struct Chanpipe Chanpipe;
typedef struct Player Player;
+typedef struct Andy Andy;
typedef struct Match Match;
typedef struct Msg Msg;
typedef struct Stands Stands;
@@ -94,12 +102,32 @@ struct Player
Map;
char name[8+1];
int state;
+ int gamemode;
Match *battle;
NetConnInfo *nci;
Chanpipe io;
Channel *ctl;
};
+struct Andy
+{
+ Map; /* of the enemy */
+ Player *ego;
+ int state;
+ Point2 lastshot;
+ Point2 firsthit;
+ Point2 passdir; /* direction of current pass */
+ int ntries; /* attempts left to find the direction */
+ int passes; /* remaining passes (one per direction) */
+
+ void (*layout)(Andy*, Msg*);
+ void (*shoot)(Andy*, Msg*);
+ void (*engage)(Andy*);
+ void (*disengage)(Andy*);
+ void (*registerhit)(Andy*);
+ void (*registermiss)(Andy*);
+};
+
struct Match
{
RWLock;