version 1.22, 2011/12/01 07:05:52 |
version 1.23, 2012/06/19 05:35:32 |
Line 52 static void is_monop(MON *, int); |
|
Line 52 static void is_monop(MON *, int); |
|
* "yes or "no" answer is gotten. |
* "yes or "no" answer is gotten. |
*/ |
*/ |
int |
int |
getyn(prompt) |
getyn(const char *prompt) |
const char *prompt; |
|
{ |
{ |
int com; |
int com; |
|
|
|
|
* This routine tells the player if he's out of money. |
* This routine tells the player if he's out of money. |
*/ |
*/ |
void |
void |
notify() |
notify(void) |
{ |
{ |
if (cur_p->money < 0) |
if (cur_p->money < 0) |
printf("That leaves you $%d in debt\n", -cur_p->money); |
printf("That leaves you $%d in debt\n", -cur_p->money); |
|
|
* This routine switches to the next player |
* This routine switches to the next player |
*/ |
*/ |
void |
void |
next_play() |
next_play(void) |
{ |
{ |
player = (player + 1) % num_play; |
player = (player + 1) % num_play; |
cur_p = &play[player]; |
cur_p = &play[player]; |
|
|
* given prompt. |
* given prompt. |
*/ |
*/ |
int |
int |
get_int(prompt) |
get_int(const char *prompt) |
const char *prompt; |
|
{ |
{ |
long num; |
long num; |
char *sp; |
char *sp; |
|
|
* This routine sets the monopoly flag from the list given. |
* This routine sets the monopoly flag from the list given. |
*/ |
*/ |
void |
void |
set_ownlist(pl) |
set_ownlist(int pl) |
int pl; |
|
{ |
{ |
int num; /* general counter */ |
int num; /* general counter */ |
MON *orig; /* remember starting monop ptr */ |
MON *orig; /* remember starting monop ptr */ |
|
|
* This routine sets things up as if it is a new monopoly |
* This routine sets things up as if it is a new monopoly |
*/ |
*/ |
static void |
static void |
is_monop(mp, pl) |
is_monop(MON *mp, int pl) |
MON *mp; |
|
int pl; |
|
{ |
{ |
int i; |
int i; |
|
|
Line 255 is_monop(mp, pl) |
|
Line 250 is_monop(mp, pl) |
|
* This routine sets things up as if it is no longer a monopoly |
* This routine sets things up as if it is no longer a monopoly |
*/ |
*/ |
void |
void |
is_not_monop(mp) |
is_not_monop(MON *mp) |
MON *mp; |
|
{ |
{ |
int i; |
int i; |
|
|
Line 270 is_not_monop(mp) |
|
Line 264 is_not_monop(mp) |
|
* This routine gives a list of the current player's routine |
* This routine gives a list of the current player's routine |
*/ |
*/ |
void |
void |
list() |
list(void) |
{ |
{ |
printhold(player); |
printhold(player); |
} |
} |
|
|
* This routine gives a list of a given players holdings |
* This routine gives a list of a given players holdings |
*/ |
*/ |
void |
void |
list_all() |
list_all(void) |
{ |
{ |
int pl; |
int pl; |
|
|
|
|
* This routine gives the players a chance before it exits. |
* This routine gives the players a chance before it exits. |
*/ |
*/ |
void |
void |
quit() |
quit(void) |
{ |
{ |
putchar('\n'); |
putchar('\n'); |
|
|