xref: /original-bsd/games/monop/monop.def (revision cfa2a17a)
1/*-
2 * Copyright (c) 1980 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 *
7 *	@(#)monop.def	5.3 (Berkeley) 04/08/91
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 */	"shell",	/*  5 */
23	"mortgage",	/*  6 */	"unmortgage",	/*  7 */
24	"buy houses",	/*  8 */	"sell houses",	/*  9 */
25	"card",		/* 10 */	"pay",		/* 11 */
26	"trade",	/* 12 */	"resign",	/* 13 */
27	"save",		/* 14 */	"restore",	/* 15 */
28	"roll",		/* 16 */	"",		/* 17 */
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 */	"shell",	/*  7 */
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(), shell_out(), 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	shell_out,		/* shell		|*  5 *|	*/
65	mortgage,		/* mortgage property	|*  6 *|	*/
66	unmortgage,		/* unmortgage property	|*  7 *|	*/
67	buy_houses,		/* buy houses		|*  8 *|	*/
68	sell_houses,		/* sell houses		|*  9 *|	*/
69	card,			/* card for jail	|* 10 *|	*/
70	pay,			/* pay for jail		|* 11 *|	*/
71	trade,			/* trade		|* 12 *|	*/
72	resign,			/* resign		|* 13 *|	*/
73	save,			/* save game		|* 14 *|	*/
74	restore,		/* restore game		|* 15 *|	*/
75	do_move,		/* roll			|* 16 *|	*/
76	do_move			/* ""			|* 17 *|	*/
77	};
78
79DECK	deck[2];		/* Chance and Community Chest		*/
80
81PLAY	*play,			/* player structure array ("calloc"ed)	*/
82	*cur_p;			/* pointer to current player's struct	*/
83
84RR_S	rr[N_RR];		/* raildroad descriptions		*/
85
86UTIL_S	util[2];		/* utility descriptions			*/
87
88MON	mon[N_MON]	= {	/* monopoly descriptions		*/
89#		include	"mon.dat"
90};
91
92PROP	prop[N_PROP]	= {	/* typical properties			*/
93#		include	"prop.dat"
94};
95
96SQUARE	board[N_SQRS+1]	= {	/* board itself (+1 for Jail)		*/
97#		include	"brd.dat"
98};
99