xref: /original-bsd/games/monop/monop.def (revision 5252b5cb)
1/*-
2 * Copyright (c) 1980, 1993
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 *
7 *	@(#)monop.def	5.5 (Berkeley) 05/31/93
8 */
9
10# include	"monop.h"
11# include	"deck.h"
12
13bool	fixing,			/* set if fixing up debt		*/
14	trading,		/* set if in process of trading		*/
15	told_em,		/* set if told user he's out of debt	*/
16	spec;			/* set if moving by card to RR or UTIL	*/
17
18char	*name_list[MAX_PL+2],	/* list of players' names		*/
19	*comlist[]	= {	/* list of normal commands		*/
20	"quit",		/*  0 */	"print",	/*  1 */
21	"where",	/*  2 */	"own holdings",	/*  3 */
22	"holdings",	/*  4 */	"mortgage",	/*  5 */
23	"unmortgage",	/*  6 */	"buy houses",	/*  7 */
24	"sell houses",	/*  8 */	"card",		/*  9 */
25	"pay",		/* 10 */	"trade",	/* 11 */
26	"resign",	/* 12 */	"save",		/* 13 */
27	"restore",	/* 14 */	"roll",		/* 15 */
28	"",		/* 16 */
29	0
30	},
31	*yn[]		= {	/* list of commands for yes/no answers	*/
32	"yes",		/*  0 */	"no",		/*  1 */
33	"quit",		/*  2 */	"print",	/*  3 */
34	"where",	/*  4 */	"own holdings",	/*  5 */
35	"holdings",	/*  6 */
36	0
37	},
38	*lucky_mes[]	= {	/* "got lucky" messages			*/
39	"You lucky stiff",		"You got lucky",
40	"What a lucky person!",		"You must have a 4-leaf clover",
41	"My, my!  Aren't we lucky!",	"Luck smiles upon you",
42	"You got lucky this time",	"Lucky person!",
43	"Your karma must certainly be together",
44	"How beautifully Cosmic",	"Wow, you must be really with it"
45	/* "I want your autograph",	-- Save for later */
46	};
47
48int	player,			/* current player number		*/
49	num_play,		/* current number of players		*/
50	num_doub,		/* # of doubles current player rolled	*/
51				/* # of "got lucky" messages		*/
52	num_luck	= sizeof lucky_mes / sizeof (char *),
53				/* list of command functions		*/
54	buy_houses(), card(), do_move(), do_move(), list(), list_all(),
55	mortgage(), pay(), printboard(), quit(), resign(), restore(),
56	rub(), save(), sell_houses(), trade(),
57	unmortgage(), where(),
58	(*func[])()	= {	/* array of function calls for commands	*/
59	quit,			/* quit game		|*  0 *|	*/
60	printboard,		/* print board		|*  1 *|	*/
61	where,			/* where players are	|*  2 *|	*/
62	list,			/* own holdings		|*  3 *|	*/
63	list_all,		/* holdings list	|*  4 *|	*/
64	mortgage,		/* mortgage property	|*  5 *|	*/
65	unmortgage,		/* unmortgage property	|*  6 *|	*/
66	buy_houses,		/* buy houses		|*  7 *|	*/
67	sell_houses,		/* sell houses		|*  8 *|	*/
68	card,			/* card for jail	|*  9 *|	*/
69	pay,			/* pay for jail		|* 10 *|	*/
70	trade,			/* trade		|* 11 *|	*/
71	resign,			/* resign		|* 12 *|	*/
72	save,			/* save game		|* 13 *|	*/
73	restore,		/* restore game		|* 14 *|	*/
74	do_move,		/* roll			|* 15 *|	*/
75	do_move			/* ""			|* 16 *|	*/
76	};
77
78DECK	deck[2];		/* Chance and Community Chest		*/
79
80PLAY	*play,			/* player structure array ("calloc"ed)	*/
81	*cur_p;			/* pointer to current player's struct	*/
82
83RR_S	rr[N_RR];		/* raildroad descriptions		*/
84
85UTIL_S	util[2];		/* utility descriptions			*/
86
87MON	mon[N_MON]	= {	/* monopoly descriptions		*/
88#		include	"mon.dat"
89};
90
91PROP	prop[N_PROP]	= {	/* typical properties			*/
92#		include	"prop.dat"
93};
94
95SQUARE	board[N_SQRS+1]	= {	/* board itself (+1 for Jail)		*/
96#		include	"brd.dat"
97};
98