told_em, /* set if told user he's out of debt */
spec; /* set if moving by card to RR or UTIL */
told_em, /* set if told user he's out of debt */
spec; /* set if moving by card to RR or UTIL */
-const char *name_list[MAX_PL+2], /* list of players' names */
- *const comlist[] = { /* list of normal commands */
+const char *name_list[MAX_PL+2]; /* list of players' names */
+static const char *const comlist[] = { /* list of normal commands */
"quit", /* 0 */ "print", /* 1 */
"where", /* 2 */ "own holdings", /* 3 */
"holdings", /* 4 */ "mortgage", /* 5 */
"quit", /* 0 */ "print", /* 1 */
"where", /* 2 */ "own holdings", /* 3 */
"holdings", /* 4 */ "mortgage", /* 5 */
"yes", /* 0 */ "no", /* 1 */
"quit", /* 2 */ "print", /* 3 */
"where", /* 4 */ "own holdings", /* 5 */
"holdings", /* 6 */
0
"yes", /* 0 */ "no", /* 1 */
"quit", /* 2 */ "print", /* 3 */
"where", /* 4 */ "own holdings", /* 5 */
"holdings", /* 6 */
0
"You lucky stiff", "You got lucky",
"What a lucky person!", "You must have a 4-leaf clover",
"My, my! Aren't we lucky!", "Luck smiles upon you",
"You lucky stiff", "You got lucky",
"What a lucky person!", "You must have a 4-leaf clover",
"My, my! Aren't we lucky!", "Luck smiles upon you",
"Your karma must certainly be together",
"How beautifully Cosmic", "Wow, you must be really with it"
/* "I want your autograph", -- Save for later */
"Your karma must certainly be together",
"How beautifully Cosmic", "Wow, you must be really with it"
/* "I want your autograph", -- Save for later */
int player, /* current player number */
num_play, /* current number of players */
int player, /* current player number */
num_play, /* current number of players */
PLAY *play, /* player structure array ("calloc"ed) */
*cur_p; /* pointer to current player's struct */
PLAY *play, /* player structure array ("calloc"ed) */
*cur_p; /* pointer to current player's struct */
#define MONINIT(num_in, h_cost, not_m, mon_n, sq1,sq2,sq3) \
{0, -1, num_in, 0, h_cost, not_m, mon_n, {sq1,sq2,sq3}, {0,0,0}}
/* name owner num_own sq */
#define MONINIT(num_in, h_cost, not_m, mon_n, sq1,sq2,sq3) \
{0, -1, num_in, 0, h_cost, not_m, mon_n, {sq1,sq2,sq3}, {0,0,0}}
/* name owner num_own sq */
/* num_in h_cost not_m mon_n sqnums */
MONINIT(2, 1, "Purple", "PURPLE", 1,3, 0),
MONINIT(3, 1, "Lt. Blue", "LT. BLUE", 6,8,9),
/* num_in h_cost not_m mon_n sqnums */
MONINIT(2, 1, "Purple", "PURPLE", 1,3, 0),
MONINIT(3, 1, "Lt. Blue", "LT. BLUE", 6,8,9),
printf("Player %d's name: ", i + 1);
fgets(buf, sizeof(buf), stdin);
if (feof(stdin)) {
printf("Player %d's name: ", i + 1);
fgets(buf, sizeof(buf), stdin);
if (feof(stdin)) {
}
buf[strcspn(buf, "\n")] = '\0';
} while (strlen(buf) == 0);
}
buf[strcspn(buf, "\n")] = '\0';
} while (strlen(buf) == 0);