57 lines
1.9 KiB
C
57 lines
1.9 KiB
C
#define MAXBOARDSTRLEN 20
|
|
void init(void);
|
|
int setupgame(int sz,int nrounds);
|
|
int setupround(void);
|
|
void line(void);
|
|
void cleanup(void);
|
|
char getmod(char *stack);
|
|
char getmodxy(int x, int y);
|
|
char getowner(char *stack);
|
|
int ismod(char ch);
|
|
int isdir(char ch);
|
|
char *getdirname(int dir);
|
|
char *getmodname(int mod);
|
|
void showboard(void);
|
|
char *readcmd(char *cmd);
|
|
int parsecmd(char *cmd);
|
|
int placetile(int who,char xch,char ych, char mod);
|
|
int nextround(void);
|
|
int nextturn(void);
|
|
char getpchar(int n);
|
|
char *getpcol(int pnum);
|
|
char modprintable(char mod);
|
|
char *getpstr(int n);
|
|
char *getpname(int n);
|
|
void dirtoxy(char dir, int *x, int *y);
|
|
int movetile(int count,char xch,char ych, char dir, char *dropstr);
|
|
int getstarttiles(int sz);
|
|
int getstartcapstones(int sz);
|
|
void determinewinner(void);
|
|
int isvalidxypos(char x, char y);
|
|
int isvalidxy(int x, int y);
|
|
void showboardbinary(int pnum);
|
|
int xtoleftshift(int num);
|
|
void printbinaryline(char prefix, int num, int wantcr);
|
|
int playerhasroads(int pnum, char (*b)[]);
|
|
void updateroadstatus(void);
|
|
char *makecolorstr(char *orig, char *newstr);
|
|
void showscores(void);
|
|
int checkxyforroad(char (*b)[], int who, int sx, int sy, int sd);
|
|
void pickfirstplayer(void);
|
|
int xyvalidforroad(char (*b)[], int who, int x, int y);
|
|
void logmove(int who, char *txt, char append);
|
|
int normalise(char *a);
|
|
char *genaicmd(char *cmd, int showdb);
|
|
int canplacetile(int who, int x, int y, int mod, char *why);
|
|
int canmoveto(int who, int x, int y, char *why);
|
|
void idxtoxy(int idx, int *x, int *y);
|
|
void xytopos(int x, int y, int *xch, int *ych);
|
|
int gotwinner(void);
|
|
int xywouldgivewinto(int who, int tx, int ty);
|
|
int modaivalue(int x,int y,int amt);
|
|
int canmovefrom(int who, int x, int y, char *why);
|
|
int canmoveanyto(int who, int x, int y, char *why);
|
|
int canmakedropstr(int who, int sx, int sy, int dx, int dy, char *str);
|
|
char getdirchar(int dir);
|
|
void showaivalues(int best);
|