1: # include   <stdio.h>
   2: 
   3: # define    reg register
   4: # define    shrt    char
   5: # define    bool    char
   6: # define    unsgn   unsigned
   7: 
   8: # define    TRUE    (1)
   9: # define    FALSE   (0)
  10: 
  11: # define    N_MON   8   /* number of monopolies			*/
  12: # define    N_PROP  22  /* number of normal property squares	*/
  13: # define    N_RR    4   /* number of railroads			*/
  14: # define    N_UTIL  2   /* number of utilities			*/
  15: # define    N_SQRS  40  /* number of squares on board		*/
  16: # define    MAX_PL  9   /* maximum number of players		*/
  17: # define    MAX_PRP (N_PROP+N_RR+N_UTIL) /* max # ownable property	*/
  18: 
  19:                 /* square type numbers			*/
  20: # define    PRPTY   0   /* normal property			*/
  21: # define    RR  1   /* railroad				*/
  22: # define    UTIL    2   /* water works - electric co		*/
  23: # define    SAFE    3   /* safe spot				*/
  24: # define    CC  4   /* community chest			*/
  25: # define    CHANCE  5   /* chance (surprise!!!)			*/
  26: # define    SPEC    6   /* special				*/
  27: 
  28: # define    JAIL    40  /* JAIL square number			*/
  29: 
  30: # define    lucky(str)  printf("%s%s\n",str,lucky_mes[roll(1,num_luck)-1])
  31: # define    printline() printf("------------------------------\n")
  32: # define    sqnum(sqp)  (sqp - board)
  33: # define    swap(A1,A2) if ((A1) != (A2)) { \
  34:                     (A1) ^= (A2); \
  35:                     (A2) ^= (A1); \
  36:                     (A1) ^= (A2); \
  37:                 }
  38: 
  39: struct sqr_st {         /* structure for square			*/
  40:     char    *name;          /* place name			*/
  41:     shrt    owner;          /* owner number			*/
  42:     shrt    type;           /* place type			*/
  43:     char    *desc;          /* description struct		*/
  44:     int cost;           /* cost				*/
  45: };
  46: 
  47: typedef struct sqr_st   SQUARE;
  48: 
  49: struct mon_st {         /* monopoly descriptin structure	*/
  50:     char    *name;          /* monop. name (color)		*/
  51:     shrt    owner;          /* owner of monopoly		*/
  52:     shrt    num_in;         /* # in monopoly		*/
  53:     shrt    num_own;        /* # owned (-1: not poss. monop)*/
  54:     shrt    h_cost;         /* price of houses		*/
  55:     char    *not_m;         /* name if not monopoly		*/
  56:     char    *mon_n;         /* name if a monopoly		*/
  57:     SQUARE  *sq[3];         /* list of squares in monop	*/
  58: };
  59: 
  60: typedef struct mon_st   MON;
  61: 
  62: struct prp_st {         /* property description structure	*/
  63:     bool    morg;           /* set if mortgaged		*/
  64:     bool    monop;          /* set if monopoly		*/
  65:     shrt    square;         /* square description		*/
  66:     shrt    houses;         /* number of houses		*/
  67:     MON *mon_desc;      /* name of color		*/
  68:     int rent[6];        /* rents			*/
  69: };
  70: 
  71: struct own_st {         /* element in list owned things		*/
  72:     SQUARE  *sqr;           /* pointer to square		*/
  73:     struct own_st   *next;      /* next in list			*/
  74: };
  75: 
  76: typedef struct own_st   OWN;
  77: 
  78: struct plr_st {         /* player description structure		*/
  79:     char    *name;          /* owner name			*/
  80:     shrt    num_gojf;       /* # of get-out-of-jail-free's	*/
  81:     shrt    num_rr;         /* # of railroads owned		*/
  82:     shrt    num_util;       /* # of water works/elec. co.	*/
  83:     shrt    loc;            /* location on board		*/
  84:     shrt    in_jail;        /* count of turns in jail	*/
  85:     int money;          /* amount of money		*/
  86:     OWN *own_list;      /* start of propery list	*/
  87: };
  88: 
  89: struct rr_st {          /* railroad description structure	*/
  90:     bool    morg;           /* set if morgaged		*/
  91: };
  92: 
  93: typedef struct plr_st   PLAY;
  94: typedef struct prp_st   PROP;
  95: typedef struct rr_st    RR_S;
  96: typedef struct rr_st    UTIL_S;
  97: 
  98: int cc(), chance(), lux_tax(), goto_jail(), inc_tax();

Defined struct's

mon_st defined in line 49; used 2 times
  • in line 60(2)
own_st defined in line 71; used 4 times
plr_st defined in line 78; used 2 times
  • in line 93(2)
prp_st defined in line 62; used 2 times
  • in line 94(2)
rr_st defined in line 89; used 4 times
sqr_st defined in line 39; used 2 times
  • in line 47(2)

Defined typedef's

MON defined in line 60; used 1 times
  • in line 67
OWN defined in line 76; used 1 times
  • in line 86
PLAY defined in line 93; never used
PROP defined in line 94; never used
RR_S defined in line 95; never used
SQUARE defined in line 47; used 2 times
UTIL_S defined in line 96; never used

Defined macros

CC defined in line 24; never used
CHANCE defined in line 25; never used
FALSE defined in line 9; never used
JAIL defined in line 28; never used
MAX_PL defined in line 16; never used
MAX_PRP defined in line 17; never used
N_MON defined in line 11; never used
N_PROP defined in line 12; used 1 times
  • in line 17
N_RR defined in line 13; used 1 times
  • in line 17
N_SQRS defined in line 15; never used
N_UTIL defined in line 14; used 1 times
  • in line 17
PRPTY defined in line 20; never used
RR defined in line 21; never used
SAFE defined in line 23; never used
SPEC defined in line 26; never used
TRUE defined in line 8; never used
UTIL defined in line 22; never used
bool defined in line 5; used 3 times
lucky defined in line 30; never used
printline defined in line 31; never used
reg defined in line 3; never used
shrt defined in line 4; used 13 times
sqnum defined in line 32; never used
swap defined in line 33; never used
unsgn defined in line 6; never used
Last modified: 1982-06-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1474
Valid CSS Valid XHTML 1.0 Strict