386BSD 0.1 development
authorWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Tue, 9 Apr 1991 01:01:26 +0000 (17:01 -0800)
committerWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Tue, 9 Apr 1991 01:01:26 +0000 (17:01 -0800)
Work on file usr/othersrc/games/monop/mon.dat
Work on file usr/othersrc/games/monop/monop.def
Work on file usr/othersrc/games/monop/prop.dat
Work on file usr/othersrc/games/monop/monop.ext

Co-Authored-By: Lynne Greer Jolitz <ljolitz@cardio.ucsf.edu>
Synthesized-from: 386BSD-0.1

usr/othersrc/games/monop/mon.dat [new file with mode: 0644]
usr/othersrc/games/monop/monop.def [new file with mode: 0644]
usr/othersrc/games/monop/monop.ext [new file with mode: 0644]
usr/othersrc/games/monop/prop.dat [new file with mode: 0644]

diff --git a/usr/othersrc/games/monop/mon.dat b/usr/othersrc/games/monop/mon.dat
new file mode 100644 (file)
index 0000000..3c18524
--- /dev/null
@@ -0,0 +1,44 @@
+/*-
+ * Copyright (c) 1980 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)mon.dat     5.3 (Berkeley) 4/8/91
+ */
+
+/* name        owner   num_in  num_own h_cost  not_m           mon_n       sq */
+{0,    -1,     2,      0,      1,      "Purple",       "PURPLE",   {1,3}},
+{0,    -1,     3,      0,      1,      "Lt. Blue",     "LT. BLUE", {6,8,9}},
+{0,    -1,     3,      0,      2,      "Violet",       "VIOLET",   {11,13,14}},
+{0,    -1,     3,      0,      2,      "Orange",       "ORANGE",   {16,18,19}},
+{0,    -1,     3,      0,      3,      "Red",          "RED",      {21,23,24}},
+{0,    -1,     3,      0,      3,      "Yellow",       "YELLOW",   {26,27,29}},
+{0,    -1,     3,      0,      4,      "Green",        "GREEN",    {31,32,34}},
+{0,    -1,     2,      0,      4,      "Dk. Blue",     "DK. BLUE", {37,39}}
diff --git a/usr/othersrc/games/monop/monop.def b/usr/othersrc/games/monop/monop.def
new file mode 100644 (file)
index 0000000..27da9e7
--- /dev/null
@@ -0,0 +1,124 @@
+/*-
+ * Copyright (c) 1980 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)monop.def   5.3 (Berkeley) 4/8/91
+ */
+
+# include      "monop.h"
+# include      "deck.h"
+
+bool   fixing,                 /* set if fixing up debt                */
+       trading,                /* set if in process of trading         */
+       told_em,                /* set if told user he's out of debt    */
+       spec;                   /* set if moving by card to RR or UTIL  */
+
+char   *name_list[MAX_PL+2],   /* list of players' names               */
+       *comlist[]      = {     /* list of normal commands              */
+       "quit",         /*  0 */        "print",        /*  1 */
+       "where",        /*  2 */        "own holdings", /*  3 */
+       "holdings",     /*  4 */        "shell",        /*  5 */
+       "mortgage",     /*  6 */        "unmortgage",   /*  7 */
+       "buy houses",   /*  8 */        "sell houses",  /*  9 */
+       "card",         /* 10 */        "pay",          /* 11 */
+       "trade",        /* 12 */        "resign",       /* 13 */
+       "save",         /* 14 */        "restore",      /* 15 */
+       "roll",         /* 16 */        "",             /* 17 */
+       0
+       },
+       *yn[]           = {     /* list of commands for yes/no answers  */
+       "yes",          /*  0 */        "no",           /*  1 */
+       "quit",         /*  2 */        "print",        /*  3 */
+       "where",        /*  4 */        "own holdings", /*  5 */
+       "holdings",     /*  6 */        "shell",        /*  7 */
+       0
+       },
+       *lucky_mes[]    = {     /* "got lucky" messages                 */
+       "You lucky stiff",              "You got lucky",
+       "What a lucky person!",         "You must have a 4-leaf clover",
+       "My, my!  Aren't we lucky!",    "Luck smiles upon you",
+       "You got lucky this time",      "Lucky person!",
+       "Your karma must certainly be together",
+       "How beautifully Cosmic",       "Wow, you must be really with it"
+       /* "I want your autograph",     -- Save for later */
+       };
+
+int    player,                 /* current player number                */
+       num_play,               /* current number of players            */
+       num_doub,               /* # of doubles current player rolled   */
+                               /* # of "got lucky" messages            */
+       num_luck        = sizeof lucky_mes / sizeof (char *),
+                               /* list of command functions            */
+       buy_houses(), card(), do_move(), do_move(), list(), list_all(),
+       mortgage(), pay(), printboard(), quit(), resign(), restore(),
+       rub(), save(), sell_houses(), shell_out(), trade(),
+       unmortgage(), where(),
+       (*func[])()     = {     /* array of function calls for commands */
+       quit,                   /* quit game            |*  0 *|        */
+       printboard,             /* print board          |*  1 *|        */
+       where,                  /* where players are    |*  2 *|        */
+       list,                   /* own holdings         |*  3 *|        */
+       list_all,               /* holdings list        |*  4 *|        */
+       shell_out,              /* shell                |*  5 *|        */
+       mortgage,               /* mortgage property    |*  6 *|        */
+       unmortgage,             /* unmortgage property  |*  7 *|        */
+       buy_houses,             /* buy houses           |*  8 *|        */
+       sell_houses,            /* sell houses          |*  9 *|        */
+       card,                   /* card for jail        |* 10 *|        */
+       pay,                    /* pay for jail         |* 11 *|        */
+       trade,                  /* trade                |* 12 *|        */
+       resign,                 /* resign               |* 13 *|        */
+       save,                   /* save game            |* 14 *|        */
+       restore,                /* restore game         |* 15 *|        */
+       do_move,                /* roll                 |* 16 *|        */
+       do_move                 /* ""                   |* 17 *|        */
+       };
+
+DECK   deck[2];                /* Chance and Community Chest           */
+
+PLAY   *play,                  /* player structure array ("calloc"ed)  */
+       *cur_p;                 /* pointer to current player's struct   */
+
+RR_S   rr[N_RR];               /* raildroad descriptions               */
+
+UTIL_S util[2];                /* utility descriptions                 */
+
+MON    mon[N_MON]      = {     /* monopoly descriptions                */
+#              include "mon.dat"
+};
+
+PROP   prop[N_PROP]    = {     /* typical properties                   */
+#              include "prop.dat"
+};
+
+SQUARE board[N_SQRS+1] = {     /* board itself (+1 for Jail)           */
+#              include "brd.dat"
+};
diff --git a/usr/othersrc/games/monop/monop.ext b/usr/othersrc/games/monop/monop.ext
new file mode 100644 (file)
index 0000000..0f10999
--- /dev/null
@@ -0,0 +1,57 @@
+/*-
+ * Copyright (c) 1980 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)monop.ext   5.3 (Berkeley) 4/8/91
+ */
+
+# include      "monop.h"
+# include      "deck.h"
+
+extern bool    trading, spec, fixing, told_em;
+
+extern char    *yn[], *comlist[], *name_list[], *lucky_mes[];
+
+extern int     num_play, player, num_doub, num_luck, (*func[])();
+
+extern DECK    deck[2];
+
+extern MON     mon[];
+
+extern PLAY    *play, *cur_p;
+
+extern PROP    prop[];
+
+extern RR_S    rr[];
+
+extern SQUARE  board[];
+
+extern UTIL_S  util[];
diff --git a/usr/othersrc/games/monop/prop.dat b/usr/othersrc/games/monop/prop.dat
new file mode 100644 (file)
index 0000000..dd4081d
--- /dev/null
@@ -0,0 +1,58 @@
+/*-
+ * Copyright (c) 1980 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)prop.dat    5.3 (Berkeley) 4/8/91
+ */
+
+/* morg        monop   square  houses  mon_desc        rent    */
+{0,    0,      1,      0,      &mon[0],        { 2, 10, 30,  90, 160, 250} },
+{0,    0,      3,      0,      &mon[0],        { 4, 20, 60, 180, 320, 450} },
+{0,    0,      6,      0,      &mon[1],        { 6, 30, 90, 270, 400, 550} },
+{0,    0,      7,      0,      &mon[1],        { 6, 30, 90, 270, 400, 550} },
+{0,    0,      9,      0,      &mon[1],        { 8, 40,100, 300, 450, 600} },
+{0,    0,      11,     0,      &mon[2],        {10, 50,150, 450, 625, 750} },
+{0,    0,      13,     0,      &mon[2],        {10, 50,150, 450, 625, 750} },
+{0,    0,      14,     0,      &mon[2],        {12, 60,180, 500, 700, 900} },
+{0,    0,      16,     0,      &mon[3],        {14, 70,200, 550, 750, 950} },
+{0,    0,      17,     0,      &mon[3],        {14, 70,200, 550, 750, 950} },
+{0,    0,      19,     0,      &mon[3],        {16, 80,220, 600, 800,1000} },
+{0,    0,      21,     0,      &mon[4],        {18, 90,250, 700, 875,1050} },
+{0,    0,      23,     0,      &mon[4],        {18, 90,250, 700, 875,1050} },
+{0,    0,      24,     0,      &mon[4],        {20,100,300, 750, 925,1100} },
+{0,    0,      26,     0,      &mon[5],        {22,110,330, 800, 975,1150} },
+{0,    0,      27,     0,      &mon[5],        {22,110,330, 800, 975,1150} },
+{0,    0,      29,     0,      &mon[5],        {24,120,360, 850,1025,1200} },
+{0,    0,      31,     0,      &mon[6],        {26,130,390, 900,1100,1275} },
+{0,    0,      32,     0,      &mon[6],        {26,130,390, 900,1100,1275} },
+{0,    0,      34,     0,      &mon[6],        {28,150,450,1000,1200,1400} },
+{0,    0,      37,     0,      &mon[7],        {35,175,500,1100,1300,1500} },
+{0,    0,      39,     0,      &mon[7],        {50,200,600,1400,1700,2000} }