-/* $NetBSD: spec.c,v 1.7 2003/08/07 09:37:30 agc Exp $ */
+/* $NetBSD: spec.c,v 1.11 2012/06/19 05:35:32 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)spec.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: spec.c,v 1.7 2003/08/07 09:37:30 agc Exp $");
+__RCSID("$NetBSD: spec.c,v 1.11 2012/06/19 05:35:32 dholland Exp $");
#endif
#endif /* not lint */
-#include "monop.ext"
+#include "monop.h"
+#include "deck.h"
static const char *const perc[] = {
"10%", "ten percent", "%", "$200", "200", 0
};
+/*
+ * collect income tax
+ */
void
-inc_tax()
-{ /* collect income tax */
+inc_tax(void)
+{
int worth, com_num;
- com_num = getinp("Do you wish to lose 10%% of your total worth or "
+ 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);
lucky("\nIt makes no difference! ");
}
+/*
+ * move player to jail
+ */
void
-goto_jail()
-{ /* move player to jail */
+goto_jail(void)
+{
cur_p->loc = JAIL;
}
+/*
+ * landing on luxury tax
+ */
void
-lux_tax()
-{ /* landing on luxury tax */
+lux_tax(void)
+{
printf("You lose $75\n");
cur_p->money -= 75;
}
+/*
+ * draw community chest card
+ */
void
-cc()
-{ /* draw community chest card */
+cc(void)
+{
get_card(&CC_D);
}
+/*
+ * draw chance card
+ */
void
-chance()
-{ /* draw chance card */
+chance(void)
+{
get_card(&CH_D);
}