1 /* $NetBSD: monop.def,v 1.5 1999/08/21 10:40:04 simonb Exp $ */
4 * Copyright (c) 1980, 1993
5 * The Regents of the University of California. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by the University of
18 * California, Berkeley and its contributors.
19 * 4. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * @(#)monop.def 5.5 (Berkeley) 5/31/93
41 bool fixing, /* set if fixing up debt */
42 trading, /* set if in process of trading */
43 told_em, /* set if told user he's out of debt */
44 spec; /* set if moving by card to RR or UTIL */
46 char *name_list[MAX_PL+2], /* list of players' names */
47 *comlist[] = { /* list of normal commands */
48 "quit", /* 0 */ "print", /* 1 */
49 "where", /* 2 */ "own holdings", /* 3 */
50 "holdings", /* 4 */ "mortgage", /* 5 */
51 "unmortgage", /* 6 */ "buy houses", /* 7 */
52 "sell houses", /* 8 */ "card", /* 9 */
53 "pay", /* 10 */ "trade", /* 11 */
54 "resign", /* 12 */ "save", /* 13 */
55 "restore", /* 14 */ "roll", /* 15 */
59 *yn[] = { /* list of commands for yes/no answers */
60 "yes", /* 0 */ "no", /* 1 */
61 "quit", /* 2 */ "print", /* 3 */
62 "where", /* 4 */ "own holdings", /* 5 */
66 *lucky_mes[] = { /* "got lucky" messages */
67 "You lucky stiff", "You got lucky",
68 "What a lucky person!", "You must have a 4-leaf clover",
69 "My, my! Aren't we lucky!", "Luck smiles upon you",
70 "You got lucky this time", "Lucky person!",
71 "Your karma must certainly be together",
72 "How beautifully Cosmic", "Wow, you must be really with it"
73 /* "I want your autograph", -- Save for later */
76 int player, /* current player number */
77 num_play, /* current number of players */
78 num_doub, /* # of doubles current player rolled */
79 /* # of "got lucky" messages */
80 num_luck = sizeof lucky_mes / sizeof (char *);
82 /* list of command functions */
83 void (*func[]) __P((void)) = { /* array of function calls for commands */
84 quit, /* quit game |* 0 *| */
85 printboard, /* print board |* 1 *| */
86 where, /* where players are |* 2 *| */
87 list, /* own holdings |* 3 *| */
88 list_all, /* holdings list |* 4 *| */
89 mortgage, /* mortgage property |* 5 *| */
90 unmortgage, /* unmortgage property |* 6 *| */
91 buy_houses, /* buy houses |* 7 *| */
92 sell_houses, /* sell houses |* 8 *| */
93 card, /* card for jail |* 9 *| */
94 pay, /* pay for jail |* 10 *| */
95 trade, /* trade |* 11 *| */
96 resign, /* resign |* 12 *| */
97 save, /* save game |* 13 *| */
98 restore, /* restore game |* 14 *| */
99 do_move, /* roll |* 15 *| */
100 do_move /* "" |* 16 *| */
103 DECK deck[2]; /* Chance and Community Chest */
105 PLAY *play, /* player structure array ("calloc"ed) */
106 *cur_p; /* pointer to current player's struct */
108 RR_S rr[N_RR]; /* raildroad descriptions */
110 UTIL_S util[2]; /* utility descriptions */
112 MON mon[N_MON] = { /* monopoly descriptions */
116 PROP prop[N_PROP] = { /* typical properties */
120 SQUARE board[N_SQRS+1] = { /* board itself (+1 for Jail) */