* Copyright (c) 1980 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)jail.c 5.2 (Berkeley) %G%";
* This routine uses a get-out-of-jail-free card to get the
if (cur_p
->loc
!= JAIL
) {
printf("But you're not IN Jail\n");
if (cur_p
->num_gojf
== 0) {
printf("But you don't HAVE a get out of jail free card\n");
cur_p
->loc
= 10; /* just visiting */
* This routine returns the players get-out-of-jail-free card
* This routine deals with paying your way out of jail.
if (cur_p
->loc
!= JAIL
) {
printf("But you're not IN Jail\n");
printf("That cost you $50\n");
* This routine deals with a move in jail
printf("Sorry, that doesn't get you out\n");
if (++(cur_p
->in_jail
) == 3) {
printf("It's your third turn and you didn't roll doubles. You have to pay $50\n");
r1
= r2
- 1; /* kludge: stop new roll w/doub */
printf("Double roll gets you out.\n");
printf("(This is your ");
switch (cur_p
->in_jail
) {
printf("3rd (and final)");
printf(" turn in JAIL)\n");