#include <stdio.h>
#include <string.h>
#include <ctype.h>
 
enum location {offboard,onboard,captured,offered,to_be_captured};
enum weapons {blank,orange,red,blue,unknown};
enum info {none,top,all,to_be_top};
enum colors {black=0,white,empty};
 
#define COLOR(x) ((x < 99) ? ((x < 12) ? black : white) : empty)
 
struct square
{   int stackheight;
    int link;
};
 
struct piece
{   enum location status;
    enum weapons top;
    enum weapons bottom;
    int value;
    int link;
    enum info revealed;
    enum weapons knowninfo;
};
 
struct gameinfo
{   char name[12];
    char opp_address[50];
    enum colors color;
    int moveno;
    char status;
    char comments;
};

struct piece pieces[24];
struct square board[4][4];
struct square stack;
 
int to_capture[10];
int captureno;
 
char MAILBOX[50];
char MYADDR[50];
 
