diff options
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -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; |