Transformation Rules Applied to File:Jail.java

Showing full text of file after each rule

Rules AppliedJavaKeywordRule app0.txt PPspaceRule PPifndefRule PPRule PPdefineRule.DefineReplacementRule MissingFunctionTypeRule snippets0b.txt TypedefRule.DefineReplacementRule FunctionPointerReferenceRule ArrayDeclaration0Rule AddBracesRule LabelRemoverRule voidstarsnippet.txt StaticVariablesRule StaticFunctionsRule ArrayDeclarationRule StringRule DeclarationAssignmentRule PointerRule BooleanFunctionRule snippets2.txt snippets3.txt PrintfRule InsertClassRule (Final Version)
JavaKeywordRule
app0.txt
PPspaceRule
PPifndefRule
PPRule
PPdefineRule.DefineReplacementRule
MissingFunctionTypeRule
snippets0b.txt
TypedefRule.DefineReplacementRule
FunctionPointerReferenceRule
ArrayDeclaration0Rule
AddBracesRule
LabelRemoverRule
voidstarsnippet.txt
StaticVariablesRule
StaticFunctionsRule
ArrayDeclarationRule
StringRule
DeclarationAssignmentRule
PointerRule
BooleanFunctionRule
snippets2.txt
snippets3.txt
PrintfRule
InsertClassRule
final
#ifndef lint
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
#endif
# include	"monop.ext"
void card(void) {
    if (cur_p->loc != JAIL) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (cur_p->num_gojf == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    ret_card(cur_p);
    cur_p->loc = 10;
    cur_p->in_jail = 0;
}
void ret_card(register PLAY * plr) {
    plr->num_gojf--;
    if (CC_D.gojf_used) CC_D.gojf_used = FALSE;
    else CH_D.gojf_used = FALSE;
}
void pay(void) {
    if (cur_p->loc != JAIL) {
        printf("But you're not IN Jail\n");
        return;
    }
    cur_p->loc = 10;
    cur_p->money -= 50;
    cur_p->in_jail = 0;
    printf("That cost you $50\n");
}
move_jail(register int r1, register int r2) {
    if (r1 != r2) {
        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");
            cur_p->money -= 50;
            moveit:cur_p->loc = 10;
            cur_p->in_jail = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return TRUE;
        }
        return FALSE;
    }
    else {
        printf("Double roll gets you out.\n");
        cur_p->loc = 10;
        cur_p->in_jail = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return TRUE;
    }
}
void printturn(void) {
    if (cur_p->loc != JAIL) return;
    printf("(This is your ");
    switch (cur_p->in_jail) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
#ifndef lint
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
#endif
# include	"monop.ext"
void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(register PLAY * player) {
    player->getOutOfJailFreeCardCount--;
    if (CC_D.getOutOfJailFreeUsed) CC_D.getOutOfJailFreeUsed = FALSE;
    else CH_D.getOutOfJailFreeUsed = FALSE;
}
void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
checkForDoubles(register int r1, register int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return TRUE;
        }
        return FALSE;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return TRUE;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
#ifndef lint
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
#endif
#include	"monop.ext"
void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(register PLAY * player) {
    player->getOutOfJailFreeCardCount--;
    if (CC_D.getOutOfJailFreeUsed) CC_D.getOutOfJailFreeUsed = FALSE;
    else CH_D.getOutOfJailFreeUsed = FALSE;
}
void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
checkForDoubles(register int r1, register int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return TRUE;
        }
        return FALSE;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return TRUE;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
#if !defined(lint)
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
#endif
#include	"monop.ext"
void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(register PLAY * player) {
    player->getOutOfJailFreeCardCount--;
    if (CC_D.getOutOfJailFreeUsed) CC_D.getOutOfJailFreeUsed = FALSE;
    else CH_D.getOutOfJailFreeUsed = FALSE;
}
void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
checkForDoubles(register int r1, register int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return TRUE;
        }
        return FALSE;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return TRUE;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(register PLAY * player) {
    player->getOutOfJailFreeCardCount--;
    if (CC_D.getOutOfJailFreeUsed) CC_D.getOutOfJailFreeUsed = FALSE;
    else CH_D.getOutOfJailFreeUsed = FALSE;
}
void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
checkForDoubles(register int r1, register int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return TRUE;
        }
        return FALSE;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return TRUE;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(register PLAY * player) {
    player->getOutOfJailFreeCardCount--;
    if (deck[0].getOutOfJailFreeUsed) deck[0].getOutOfJailFreeUsed = false;
    else deck[1].getOutOfJailFreeUsed = false;
}
void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
checkForDoubles(register int r1, register int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(register PLAY * player) {
    player->getOutOfJailFreeCardCount--;
    if (deck[0].getOutOfJailFreeUsed) deck[0].getOutOfJailFreeUsed = false;
    else deck[1].getOutOfJailFreeUsed = false;
}
void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
int checkForDoubles(register int r1, register int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(PLAY * player) {
    player->getOutOfJailFreeCardCount--;
    if (deck[0].getOutOfJailFreeUsed) deck[0].getOutOfJailFreeUsed = false;
    else deck[1].getOutOfJailFreeUsed = false;
}
void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (deck[0].getOutOfJailFreeUsed) deck[0].getOutOfJailFreeUsed = false;
    else deck[1].getOutOfJailFreeUsed = false;
}
void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char sccsid[] = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (deck[0].getOutOfJailFreeUsed) deck[0].getOutOfJailFreeUsed = false;
    else deck[1].getOutOfJailFreeUsed = false;
}
public static void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char[] sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (deck[0].getOutOfJailFreeUsed) deck[0].getOutOfJailFreeUsed = false;
    else deck[1].getOutOfJailFreeUsed = false;
}
public static void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) return;
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char[] sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (deck[0].getOutOfJailFreeUsed) {
        deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            moveit:currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char[] sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (deck[0].getOutOfJailFreeUsed) {
        deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn(void) {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char[] sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(currentPlayer);
    currentPlayer->location = 10;
    currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (deck[0].getOutOfJailFreeUsed) {
        deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    currentPlayer->location = 10;
    currentPlayer->money -= 50;
    currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            currentPlayer->money -= 50;
            currentPlayer->location = 10;
            currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        currentPlayer->location = 10;
        currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn() {
    if (currentPlayer->location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char[] sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (Monop.currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->jailRollCount = 0;
}
void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->money -= 50;
    Monop.currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(Monop.currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            Monop.currentPlayer->money -= 50;
            Monop.currentPlayer->location = 10;
            Monop.currentPlayer->jailRollCount = 0;
            move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        Monop.currentPlayer->location = 10;
        Monop.currentPlayer->jailRollCount = 0;
        move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
void printTurn() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (Monop.currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char[] sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (Monop.currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->jailRollCount = 0;
}
static void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->money -= 50;
    Monop.currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
static int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(Monop.currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            Monop.currentPlayer->money -= 50;
            Monop.currentPlayer->location = 10;
            Monop.currentPlayer->jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        Monop.currentPlayer->location = 10;
        Monop.currentPlayer->jailRollCount = 0;
        Execute.move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
static void printTurn() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (Monop.currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static char[] sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (Monop.currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->jailRollCount = 0;
}
static void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->money -= 50;
    Monop.currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
static int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(Monop.currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            Monop.currentPlayer->money -= 50;
            Monop.currentPlayer->location = 10;
            Monop.currentPlayer->jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        Monop.currentPlayer->location = 10;
        Monop.currentPlayer->jailRollCount = 0;
        Execute.move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
static void printTurn() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (Monop.currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static String sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (Monop.currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->jailRollCount = 0;
}
static void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->money -= 50;
    Monop.currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
static int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(Monop.currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            Monop.currentPlayer->money -= 50;
            Monop.currentPlayer->location = 10;
            Monop.currentPlayer->jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        Monop.currentPlayer->location = 10;
        Monop.currentPlayer->jailRollCount = 0;
        Execute.move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
static void printTurn() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (Monop.currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static String sccsid;
sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (Monop.currentPlayer->getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->jailRollCount = 0;
}
static void returnCardToDeck(Player * player) {
    player->getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    Monop.currentPlayer->location = 10;
    Monop.currentPlayer->money -= 50;
    Monop.currentPlayer->jailRollCount = 0;
    printf("That cost you $50\n");
}
static int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(Monop.currentPlayer->jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            Monop.currentPlayer->money -= 50;
            Monop.currentPlayer->location = 10;
            Monop.currentPlayer->jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        Monop.currentPlayer->location = 10;
        Monop.currentPlayer->jailRollCount = 0;
        Execute.move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
static void printTurn() {
    if (Monop.currentPlayer->location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (Monop.currentPlayer->jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static String sccsid;
sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (Monop.currentPlayer.getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.jailRollCount = 0;
}
static void returnCardToDeck(Player player) {
    player.getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.money -= 50;
    Monop.currentPlayer.jailRollCount = 0;
    printf("That cost you $50\n");
}
static int checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(Monop.currentPlayer.jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            Monop.currentPlayer.money -= 50;
            Monop.currentPlayer.location = 10;
            Monop.currentPlayer.jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        Monop.currentPlayer.location = 10;
        Monop.currentPlayer.jailRollCount = 0;
        Execute.move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
static void printTurn() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (Monop.currentPlayer.jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static String sccsid;
sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    if (Monop.currentPlayer.getOutOfJailFreeCardCount == 0) {
        printf("But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.jailRollCount = 0;
}
static void returnCardToDeck(Player player) {
    player.getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        printf("But you're not IN Jail\n");
        return;
    }
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.money -= 50;
    Monop.currentPlayer.jailRollCount = 0;
    printf("That cost you $50\n");
}
static boolean checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        printf("Sorry, that doesn't get you out\n");
        if (++(Monop.currentPlayer.jailRollCount) == 3) {
            printf("It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            Monop.currentPlayer.money -= 50;
            Monop.currentPlayer.location = 10;
            Monop.currentPlayer.jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        printf("Double roll gets you out.\n");
        Monop.currentPlayer.location = 10;
        Monop.currentPlayer.jailRollCount = 0;
        Execute.move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
static void printTurn() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        return;
    }
    printf("(This is your ");
    switch (Monop.currentPlayer.jailRollCount) {
        case 0:
            printf("1st");
            break;
        case 1:
            printf("2nd");
            break;
        case 2:
            printf("3rd (and final)");
            break;
    }
    printf(" turn in JAIL)\n");
}
static String sccsid;
sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        fprintf(stdout, "But you're not IN Jail\n");
        return;
    }
    if (Monop.currentPlayer.getOutOfJailFreeCardCount == 0) {
        fprintf(stdout, "But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.jailRollCount = 0;
}
static void returnCardToDeck(Player player) {
    player.getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        fprintf(stdout, "But you're not IN Jail\n");
        return;
    }
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.money -= 50;
    Monop.currentPlayer.jailRollCount = 0;
    fprintf(stdout, "That cost you $50\n");
}
static boolean checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        fprintf(stdout, "Sorry, that doesn't get you out\n");
        if (++(Monop.currentPlayer.jailRollCount) == 3) {
            fprintf(stdout, "It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            Monop.currentPlayer.money -= 50;
            Monop.currentPlayer.location = 10;
            Monop.currentPlayer.jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        fprintf(stdout, "Double roll gets you out.\n");
        Monop.currentPlayer.location = 10;
        Monop.currentPlayer.jailRollCount = 0;
        Execute.move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
static void printTurn() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        return;
    }
    fprintf(stdout, "(This is your ");
    switch (Monop.currentPlayer.jailRollCount) {
        case 0:
            fprintf(stdout, "1st");
            break;
        case 1:
            fprintf(stdout, "2nd");
            break;
        case 2:
            fprintf(stdout, "3rd (and final)");
            break;
    }
    fprintf(stdout, " turn in JAIL)\n");
}
static String sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        fprintf(stdout, "But you're not IN Jail\n");
        return;
    }
    if (Monop.currentPlayer.getOutOfJailFreeCardCount == 0) {
        fprintf(stdout, "But you don't HAVE a get out of jail free card\n");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.jailRollCount = 0;
}
static void returnCardToDeck(Player player) {
    player.getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        fprintf(stdout, "But you're not IN Jail\n");
        return;
    }
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.money -= 50;
    Monop.currentPlayer.jailRollCount = 0;
    fprintf(stdout, "That cost you $50\n");
}
static boolean checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        fprintf(stdout, "Sorry, that doesn't get you out\n");
        if (++(Monop.currentPlayer.jailRollCount) == 3) {
            fprintf(stdout, "It's your third turn and you didn't roll doubles.  You have to pay $50\n");
            Monop.currentPlayer.money -= 50;
            Monop.currentPlayer.location = 10;
            Monop.currentPlayer.jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        fprintf(stdout, "Double roll gets you out.\n");
        Monop.currentPlayer.location = 10;
        Monop.currentPlayer.jailRollCount = 0;
        Execute.move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
static void printTurn() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        return;
    }
    fprintf(stdout, "(This is your ");
    switch (Monop.currentPlayer.jailRollCount) {
        case 0:
            fprintf(stdout, "1st");
            break;
        case 1:
            fprintf(stdout, "2nd");
            break;
        case 2:
            fprintf(stdout, "3rd (and final)");
            break;
    }
    fprintf(stdout, " turn in JAIL)\n");
}
static String sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
public static void playGetOutOfJailCard() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        System.out.println("But you're not IN Jail");
        return;
    }
    if (Monop.currentPlayer.getOutOfJailFreeCardCount == 0) {
        System.out.println("But you don't HAVE a get out of jail free card");
        return;
    }
    returnCardToDeck(Monop.currentPlayer);
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.jailRollCount = 0;
}
static void returnCardToDeck(Player player) {
    player.getOutOfJailFreeCardCount--;
    if (Monop.deck[0].getOutOfJailFreeUsed) {
        Monop.deck[0].getOutOfJailFreeUsed = false;
    }
    else {
        Monop.deck[1].getOutOfJailFreeUsed = false;
    }
}
public static void payToGetOut() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        System.out.println("But you're not IN Jail");
        return;
    }
    Monop.currentPlayer.location = 10;
    Monop.currentPlayer.money -= 50;
    Monop.currentPlayer.jailRollCount = 0;
    System.out.println("That cost you $50");
}
static boolean checkForDoubles(int r1, int r2) {
    if (r1 != r2) {
        System.out.println("Sorry, that doesn't get you out");
        if (++(Monop.currentPlayer.jailRollCount) == 3) {
            System.out.println("It's your third turn and you didn't roll doubles.  You have to pay $50");
            Monop.currentPlayer.money -= 50;
            Monop.currentPlayer.location = 10;
            Monop.currentPlayer.jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
        return false;
    }
    else {
        System.out.println("Double roll gets you out.");
        Monop.currentPlayer.location = 10;
        Monop.currentPlayer.jailRollCount = 0;
        Execute.move(r1 + r2);
        r1 = r2 - 1;
        return true;
    }
}
static void printTurn() {
    if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
        return;
    }
    System.out.print("(This is your ");
    switch (Monop.currentPlayer.jailRollCount) {
        case 0:
            System.out.print("1st");
            break;
        case 1:
            System.out.print("2nd");
            break;
        case 2:
            System.out.print("3rd (and final)");
            break;
    }
    System.out.println(" turn in JAIL)");
}
public class Jail {
    static String sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
    public static void playGetOutOfJailCard() {
        if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
            System.out.println("But you're not IN Jail");
            return;
        }
        if (Monop.currentPlayer.getOutOfJailFreeCardCount == 0) {
            System.out.println("But you don't HAVE a get out of jail free card");
            return;
        }
        returnCardToDeck(Monop.currentPlayer);
        Monop.currentPlayer.location = 10;
        Monop.currentPlayer.jailRollCount = 0;
    }

    static void returnCardToDeck(Player player) {
        player.getOutOfJailFreeCardCount--;
        if (Monop.deck[0].getOutOfJailFreeUsed) {
            Monop.deck[0].getOutOfJailFreeUsed = false;
        }
        else {
            Monop.deck[1].getOutOfJailFreeUsed = false;
        }
    }

    public static void payToGetOut() {
        if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
            System.out.println("But you're not IN Jail");
            return;
        }
        Monop.currentPlayer.location = 10;
        Monop.currentPlayer.money -= 50;
        Monop.currentPlayer.jailRollCount = 0;
        System.out.println("That cost you $50");
    }

    static boolean checkForDoubles(int r1, int r2) {
        if (r1 != r2) {
            System.out.println("Sorry, that doesn't get you out");
            if (++(Monop.currentPlayer.jailRollCount) == 3) {
                System.out.println("It's your third turn and you didn't roll doubles.  You have to pay $50");
                Monop.currentPlayer.money -= 50;
                Monop.currentPlayer.location = 10;
                Monop.currentPlayer.jailRollCount = 0;
                Execute.move(r1 + r2);
                r1 = r2 - 1;
                return true;
            }
            return false;
        }
        else {
            System.out.println("Double roll gets you out.");
            Monop.currentPlayer.location = 10;
            Monop.currentPlayer.jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
    }

    static void printTurn() {
        if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
            return;
        }
        System.out.print("(This is your ");
        switch (Monop.currentPlayer.jailRollCount) {
            case 0:
                System.out.print("1st");
                break;
            case 1:
                System.out.print("2nd");
                break;
            case 2:
                System.out.print("3rd (and final)");
                break;
        }
        System.out.println(" turn in JAIL)");
    }

}
public class Jail {
    static String sccsid = "@(#)jail.c	5.3 (Berkeley) 6/1/90";
    public static void playGetOutOfJailCard() {
        if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
            System.out.println("But you're not IN Jail");
            return;
        }
        if (Monop.currentPlayer.getOutOfJailFreeCardCount == 0) {
            System.out.println("But you don't HAVE a get out of jail free card");
            return;
        }
        returnCardToDeck(Monop.currentPlayer);
        Monop.currentPlayer.location = 10;
        Monop.currentPlayer.jailRollCount = 0;
    }

    static void returnCardToDeck(Player player) {
        player.getOutOfJailFreeCardCount--;
        if (Monop.deck[0].getOutOfJailFreeUsed) {
            Monop.deck[0].getOutOfJailFreeUsed = false;
        }
        else {
            Monop.deck[1].getOutOfJailFreeUsed = false;
        }
    }

    public static void payToGetOut() {
        if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
            System.out.println("But you're not IN Jail");
            return;
        }
        Monop.currentPlayer.location = 10;
        Monop.currentPlayer.money -= 50;
        Monop.currentPlayer.jailRollCount = 0;
        System.out.println("That cost you $50");
    }

    static boolean checkForDoubles(int r1, int r2) {
        if (r1 != r2) {
            System.out.println("Sorry, that doesn't get you out");
            if (++(Monop.currentPlayer.jailRollCount) == 3) {
                System.out.println("It's your third turn and you didn't roll doubles.  You have to pay $50");
                Monop.currentPlayer.money -= 50;
                Monop.currentPlayer.location = 10;
                Monop.currentPlayer.jailRollCount = 0;
                Execute.move(r1 + r2);
                r1 = r2 - 1;
                return true;
            }
            return false;
        }
        else {
            System.out.println("Double roll gets you out.");
            Monop.currentPlayer.location = 10;
            Monop.currentPlayer.jailRollCount = 0;
            Execute.move(r1 + r2);
            r1 = r2 - 1;
            return true;
        }
    }

    static void printTurn() {
        if (Monop.currentPlayer.location != JAIL_SQUARE_NUMBER) {
            return;
        }
        System.out.print("(This is your ");
        switch (Monop.currentPlayer.jailRollCount) {
            case 0:
                System.out.print("1st");
                break;
            case 1:
                System.out.print("2nd");
                break;
            case 2:
                System.out.print("3rd (and final)");
                break;
        }
        System.out.println(" turn in JAIL)");
    }

}