xref: /original-bsd/games/monop/monop.def (revision 4d072710)
1/*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley.  The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 *
17 *	@(#)monop.def	5.2 (Berkeley) 06/18/88
18 */
19
20# include	"monop.h"
21# include	"deck.h"
22
23bool	fixing,			/* set if fixing up debt		*/
24	trading,		/* set if in process of trading		*/
25	told_em,		/* set if told user he's out of debt	*/
26	spec;			/* set if moving by card to RR or UTIL	*/
27
28char	*name_list[MAX_PL+2],	/* list of players' names		*/
29	*comlist[]	= {	/* list of normal commands		*/
30	"quit",		/*  0 */	"print",	/*  1 */
31	"where",	/*  2 */	"own holdings",	/*  3 */
32	"holdings",	/*  4 */	"shell",	/*  5 */
33	"mortgage",	/*  6 */	"unmortgage",	/*  7 */
34	"buy houses",	/*  8 */	"sell houses",	/*  9 */
35	"card",		/* 10 */	"pay",		/* 11 */
36	"trade",	/* 12 */	"resign",	/* 13 */
37	"save",		/* 14 */	"restore",	/* 15 */
38	"roll",		/* 16 */	"",		/* 17 */
39	0
40	},
41	*yn[]		= {	/* list of commands for yes/no answers	*/
42	"yes",		/*  0 */	"no",		/*  1 */
43	"quit",		/*  2 */	"print",	/*  3 */
44	"where",	/*  4 */	"own holdings",	/*  5 */
45	"holdings",	/*  6 */	"shell",	/*  7 */
46	0
47	},
48	*lucky_mes[]	= {	/* "got lucky" messages			*/
49	"You lucky stiff",		"You got lucky",
50	"What a lucky person!",		"You must have a 4-leaf clover",
51	"My, my!  Aren't we lucky!",	"Luck smiles upon you",
52	"You got lucky this time",	"Lucky person!",
53	"Your karma must certainly be together",
54	"How beautifully Cosmic",	"Wow, you must be really with it"
55	/* "I want your autograph",	-- Save for later */
56	};
57
58int	player,			/* current player number		*/
59	num_play,		/* current number of players		*/
60	num_doub,		/* # of doubles current player rolled	*/
61				/* # of "got lucky" messages		*/
62	num_luck	= sizeof lucky_mes / sizeof (char *),
63				/* list of command functions		*/
64	buy_houses(), card(), do_move(), do_move(), list(), list_all(),
65	mortgage(), pay(), printboard(), quit(), resign(), restore(),
66	rub(), save(), sell_houses(), shell_out(), trade(),
67	unmortgage(), where(),
68	(*func[])()	= {	/* array of function calls for commands	*/
69	quit,			/* quit game		|*  0 *|	*/
70	printboard,		/* print board		|*  1 *|	*/
71	where,			/* where players are	|*  2 *|	*/
72	list,			/* own holdings		|*  3 *|	*/
73	list_all,		/* holdings list	|*  4 *|	*/
74	shell_out,		/* shell		|*  5 *|	*/
75	mortgage,		/* mortgage property	|*  6 *|	*/
76	unmortgage,		/* unmortgage property	|*  7 *|	*/
77	buy_houses,		/* buy houses		|*  8 *|	*/
78	sell_houses,		/* sell houses		|*  9 *|	*/
79	card,			/* card for jail	|* 10 *|	*/
80	pay,			/* pay for jail		|* 11 *|	*/
81	trade,			/* trade		|* 12 *|	*/
82	resign,			/* resign		|* 13 *|	*/
83	save,			/* save game		|* 14 *|	*/
84	restore,		/* restore game		|* 15 *|	*/
85	do_move,		/* roll			|* 16 *|	*/
86	do_move			/* ""			|* 17 *|	*/
87	};
88
89DECK	deck[2];		/* Chance and Community Chest		*/
90
91PLAY	*play,			/* player structure array ("calloc"ed)	*/
92	*cur_p;			/* pointer to current player's struct	*/
93
94RR_S	rr[N_RR];		/* raildroad descriptions		*/
95
96UTIL_S	util[2];		/* utility descriptions			*/
97
98MON	mon[N_MON]	= {	/* monopoly descriptions		*/
99#		include	"mon.dat"
100};
101
102PROP	prop[N_PROP]	= {	/* typical properties			*/
103#		include	"prop.dat"
104};
105
106SQUARE	board[N_SQRS+1]	= {	/* board itself (+1 for Jail)		*/
107#		include	"brd.dat"
108};
109