+/* $NetBSD: spec.c,v 1.9 2008/02/19 10:47:40 dholland Exp $ */
+
/*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1980, 1993
+ * 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
* 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
+ * 3. 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.
*
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
-/*static char sccsid[] = "from: @(#)spec.c 5.3 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: spec.c,v 1.2 1993/08/01 18:53:30 mycroft Exp $";
+#if 0
+static char sccsid[] = "@(#)spec.c 8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: spec.c,v 1.9 2008/02/19 10:47:40 dholland Exp $");
+#endif
#endif /* not lint */
-# include "monop.ext"
+#include "monop.ext"
-static char *perc[] = {
+static const char *const perc[] = {
"10%", "ten percent", "%", "$200", "200", 0
};
-inc_tax() { /* collect income tax */
-
- reg int worth, com_num;
+/*
+ * collect income tax
+ */
+void
+inc_tax()
+{
+ int worth, com_num;
- com_num = getinp("Do you wish to lose 10%% of your total worth or $200? ", perc);
+ com_num = getinp("Do you wish to lose 10% of your total worth or "
+ "$200? ", perc);
worth = cur_p->money + prop_worth(cur_p);
printf("You were worth $%d", worth);
worth /= 10;
if (worth == 200)
lucky("\nIt makes no difference! ");
}
-goto_jail() { /* move player to jail */
+/*
+ * move player to jail
+ */
+void
+goto_jail()
+{
cur_p->loc = JAIL;
}
-lux_tax() { /* landing on luxury tax */
+/*
+ * landing on luxury tax
+ */
+void
+lux_tax()
+{
printf("You lose $75\n");
cur_p->money -= 75;
}
-cc() { /* draw community chest card */
+/*
+ * draw community chest card
+ */
+void
+cc()
+{
get_card(&CC_D);
}
-chance() { /* draw chance card */
+/*
+ * draw chance card
+ */
+void
+chance()
+{
get_card(&CH_D);
}