xref: /csrg-svn/games/monop/monop.def (revision 60819)
147860Sbostic/*-
2*60819Sbostic * Copyright (c) 1980, 1993
3*60819Sbostic *	The Regents of the University of California.  All rights reserved.
433210Sbostic *
547860Sbostic * %sccs.include.redist.c%
633210Sbostic *
7*60819Sbostic *	@(#)monop.def	5.5 (Berkeley) 05/31/93
833210Sbostic */
933210Sbostic
1033210Sbostic# include	"monop.h"
1133210Sbostic# include	"deck.h"
1233210Sbostic
1333210Sbosticbool	fixing,			/* set if fixing up debt		*/
1433210Sbostic	trading,		/* set if in process of trading		*/
1533210Sbostic	told_em,		/* set if told user he's out of debt	*/
1633210Sbostic	spec;			/* set if moving by card to RR or UTIL	*/
1733210Sbostic
1833210Sbosticchar	*name_list[MAX_PL+2],	/* list of players' names		*/
1933210Sbostic	*comlist[]	= {	/* list of normal commands		*/
2033210Sbostic	"quit",		/*  0 */	"print",	/*  1 */
2133210Sbostic	"where",	/*  2 */	"own holdings",	/*  3 */
2258799Sbostic	"holdings",	/*  4 */	"mortgage",	/*  5 */
2358799Sbostic	"unmortgage",	/*  6 */	"buy houses",	/*  7 */
2458799Sbostic	"sell houses",	/*  8 */	"card",		/*  9 */
2558799Sbostic	"pay",		/* 10 */	"trade",	/* 11 */
2658799Sbostic	"resign",	/* 12 */	"save",		/* 13 */
2758799Sbostic	"restore",	/* 14 */	"roll",		/* 15 */
2858799Sbostic	"",		/* 16 */
2933210Sbostic	0
3033210Sbostic	},
3133210Sbostic	*yn[]		= {	/* list of commands for yes/no answers	*/
3233210Sbostic	"yes",		/*  0 */	"no",		/*  1 */
3333210Sbostic	"quit",		/*  2 */	"print",	/*  3 */
3433210Sbostic	"where",	/*  4 */	"own holdings",	/*  5 */
3558799Sbostic	"holdings",	/*  6 */
3633210Sbostic	0
3733210Sbostic	},
3833210Sbostic	*lucky_mes[]	= {	/* "got lucky" messages			*/
3933210Sbostic	"You lucky stiff",		"You got lucky",
4033210Sbostic	"What a lucky person!",		"You must have a 4-leaf clover",
4133210Sbostic	"My, my!  Aren't we lucky!",	"Luck smiles upon you",
4233210Sbostic	"You got lucky this time",	"Lucky person!",
4333210Sbostic	"Your karma must certainly be together",
4433210Sbostic	"How beautifully Cosmic",	"Wow, you must be really with it"
4533210Sbostic	/* "I want your autograph",	-- Save for later */
4633210Sbostic	};
4733210Sbostic
4833210Sbosticint	player,			/* current player number		*/
4933210Sbostic	num_play,		/* current number of players		*/
5033210Sbostic	num_doub,		/* # of doubles current player rolled	*/
5133210Sbostic				/* # of "got lucky" messages		*/
5233210Sbostic	num_luck	= sizeof lucky_mes / sizeof (char *),
5333210Sbostic				/* list of command functions		*/
5433210Sbostic	buy_houses(), card(), do_move(), do_move(), list(), list_all(),
5533210Sbostic	mortgage(), pay(), printboard(), quit(), resign(), restore(),
5658799Sbostic	rub(), save(), sell_houses(), trade(),
5733210Sbostic	unmortgage(), where(),
5833210Sbostic	(*func[])()	= {	/* array of function calls for commands	*/
5933210Sbostic	quit,			/* quit game		|*  0 *|	*/
6033210Sbostic	printboard,		/* print board		|*  1 *|	*/
6133210Sbostic	where,			/* where players are	|*  2 *|	*/
6233210Sbostic	list,			/* own holdings		|*  3 *|	*/
6333210Sbostic	list_all,		/* holdings list	|*  4 *|	*/
6458799Sbostic	mortgage,		/* mortgage property	|*  5 *|	*/
6558799Sbostic	unmortgage,		/* unmortgage property	|*  6 *|	*/
6658799Sbostic	buy_houses,		/* buy houses		|*  7 *|	*/
6758799Sbostic	sell_houses,		/* sell houses		|*  8 *|	*/
6858799Sbostic	card,			/* card for jail	|*  9 *|	*/
6958799Sbostic	pay,			/* pay for jail		|* 10 *|	*/
7058799Sbostic	trade,			/* trade		|* 11 *|	*/
7158799Sbostic	resign,			/* resign		|* 12 *|	*/
7258799Sbostic	save,			/* save game		|* 13 *|	*/
7358799Sbostic	restore,		/* restore game		|* 14 *|	*/
7458799Sbostic	do_move,		/* roll			|* 15 *|	*/
7558799Sbostic	do_move			/* ""			|* 16 *|	*/
7633210Sbostic	};
7733210Sbostic
7833210SbosticDECK	deck[2];		/* Chance and Community Chest		*/
7933210Sbostic
8033210SbosticPLAY	*play,			/* player structure array ("calloc"ed)	*/
8133210Sbostic	*cur_p;			/* pointer to current player's struct	*/
8233210Sbostic
8333210SbosticRR_S	rr[N_RR];		/* raildroad descriptions		*/
8433210Sbostic
8533210SbosticUTIL_S	util[2];		/* utility descriptions			*/
8633210Sbostic
8733210SbosticMON	mon[N_MON]	= {	/* monopoly descriptions		*/
8833210Sbostic#		include	"mon.dat"
8933210Sbostic};
9033210Sbostic
9133210SbosticPROP	prop[N_PROP]	= {	/* typical properties			*/
9233210Sbostic#		include	"prop.dat"
9333210Sbostic};
9433210Sbostic
9533210SbosticSQUARE	board[N_SQRS+1]	= {	/* board itself (+1 for Jail)		*/
9633210Sbostic#		include	"brd.dat"
9733210Sbostic};
98