| Rules Applied | JavaKeywordRule | app0.txt | PPspaceRule | PPifndefRule | PPRule | PPdefineRule.DefineReplacementRule | MissingFunctionTypeRule | snippets0b.txt | TypedefRule.DefineReplacementRule | FunctionPointerReferenceRule | OneDeclarationPerLineRule | ArrayDeclaration0Rule | AddBracesRule | VoidArgumentRule.ModifyFunctionCallRule notify1 | voidstarsnippet.txt | ConflictingVariableDeclarationRule | StaticVariablesRule | StaticFunctionsRule | MultipleAssignmentRule | ArrayDeclarationRule | StringRule | strings1.txt | ZeroAssignmentRule | DeclarationAssignmentRule | PointerRule | ForceToBooleanRule | snippets2.txt | snippets3.txt | PrintfRule | UninitializedVariableRule | InsertClassRule | (Final Version) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JavaKeywordRule app0.txt PPspaceRule PPifndefRule PPRule PPdefineRule.DefineReplacementRule MissingFunctionTypeRule snippets0b.txt TypedefRule.DefineReplacementRule FunctionPointerReferenceRule OneDeclarationPerLineRule ArrayDeclaration0Rule AddBracesRule VoidArgumentRule.ModifyFunctionCallRule notify1 voidstarsnippet.txt ConflictingVariableDeclarationRule StaticVariablesRule StaticFunctionsRule MultipleAssignmentRule ArrayDeclarationRule StringRule strings1.txt ZeroAssignmentRule DeclarationAssignmentRule PointerRule ForceToBooleanRule snippets2.txt snippets3.txt PrintfRule UninitializedVariableRule InsertClassRule final | #ifndef lint
static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
#endif
# include "monop.ext"
static char * names[MAX_PRP + 2],
* morg_coms[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static shrt square[MAX_PRP + 2];
static int num_good,
got_houses;
void mortgage(void) {
regint prop;
for (;;) {
if (set_mlist() == 0) {
if (got_houses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (num_good == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getyn("Do you want to mortgage it? ") == 0) m(square[0]);
return;
}
prop = getinp("Which property do you want to mortgage? ", names);
if (prop == num_good) return;
m(square[prop]);
notify1(cur_p);
}
}
set_mlist(void) {
reg OWN * op;
num_good = 0;
for (op = cur_p->own_list;op;op = op->next) if (!op->sqr->desc->morg) if (op->sqr->type == PRPTY && op->sqr->desc->houses) got_houses++;
else {
names[num_good] = op->sqr->name;
square[num_good++] = sqnum(op->sqr);
}
names[num_good++] = "done";
names[num_good--] = 0;
return num_good;
}
void m(register int prop) {
regint price;
price = board[prop].cost / 2;
board[prop].desc->morg = TRUE;
printf("That got you $%d\n", price);
cur_p->money += price;
}
void unmortgage(void) {
regint prop;
for (;;) {
if (set_umlist() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (num_good == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getyn("Do you want to unmortgage it? ") == 0) unm(square[0]);
return;
}
prop = getinp("Which property do you want to unmortgage? ", names);
if (prop == num_good) return;
unm(square[prop]);
}
}
set_umlist(void) {
reg OWN * op;
num_good = 0;
for (op = cur_p->own_list;op;op = op->next) if (op->sqr->desc->morg) {
names[num_good] = op->sqr->name;
square[num_good++] = sqnum(op->sqr);
}
names[num_good++] = "done";
names[num_good--] = 0;
return num_good;
}
void unm(register int prop) {
regint price;
price = board[prop].cost / 2;
board[prop].desc->morg = FALSE;
price += price / 10;
printf("That cost you $%d\n", price);
cur_p->money -= price;
set_umlist();
}
void force_morg(void) {
told_em = fixing = TRUE;
while (cur_p->money <= 0) fix_ex(getinp("How are you going to fix it up? ", morg_coms));
fixing = FALSE;
}
void fix_ex(register int com_num) {
told_em = FALSE;
( * func[com_num]) ();
notify1();
}
| #ifndef lint
static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
#endif
# include "monop.ext"
static char * names[MAX_PROPERTIES + 2],
* mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static shrt square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount,
hasHouses;
void mortgagePrompt(void) {
regint properties;
for (;;) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
initializeMortgagedList(void) {
reg OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(register int properties) {
regint price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = TRUE;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
void unmortgagePrompt(void) {
regint properties;
for (;;) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
initializeUnmortgagedList(void) {
reg OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(register int properties) {
regint price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = FALSE;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = TRUE;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = FALSE;
}
void executeFix(register int answer) {
moneyStatusGiven = FALSE;
( * functions[answer]) ();
notify1();
}
| #ifndef lint
static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
#endif
#include "monop.ext"
static char * names[MAX_PROPERTIES + 2],
* mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static shrt square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount,
hasHouses;
void mortgagePrompt(void) {
regint properties;
for (;;) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
initializeMortgagedList(void) {
reg OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(register int properties) {
regint price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = TRUE;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
void unmortgagePrompt(void) {
regint properties;
for (;;) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
initializeUnmortgagedList(void) {
reg OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(register int properties) {
regint price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = FALSE;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = TRUE;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = FALSE;
}
void executeFix(register int answer) {
moneyStatusGiven = FALSE;
( * functions[answer]) ();
notify1();
}
| #if !defined(lint)
static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
#endif
#include "monop.ext"
static char * names[MAX_PROPERTIES + 2],
* mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static shrt square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount,
hasHouses;
void mortgagePrompt(void) {
regint properties;
for (;;) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
initializeMortgagedList(void) {
reg OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(register int properties) {
regint price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = TRUE;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
void unmortgagePrompt(void) {
regint properties;
for (;;) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
initializeUnmortgagedList(void) {
reg OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(register int properties) {
regint price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = FALSE;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = TRUE;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = FALSE;
}
void executeFix(register int answer) {
moneyStatusGiven = FALSE;
( * functions[answer]) ();
notify1();
}
| static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static char * names[MAX_PROPERTIES + 2],
* mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static shrt square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount,
hasHouses;
void mortgagePrompt(void) {
regint properties;
for (;;) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
initializeMortgagedList(void) {
reg OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(register int properties) {
regint price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = TRUE;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
void unmortgagePrompt(void) {
regint properties;
for (;;) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
initializeUnmortgagedList(void) {
reg OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(register int properties) {
regint price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = FALSE;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = TRUE;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = FALSE;
}
void executeFix(register int answer) {
moneyStatusGiven = FALSE;
( * functions[answer]) ();
notify1();
}
| static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static char * names[MAX_PROPERTIES + 2],
* mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount,
hasHouses;
void mortgagePrompt(void) {
register int properties;
for (;;) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
initializeMortgagedList(void) {
register OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(register int properties) {
register int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
void unmortgagePrompt(void) {
register int properties;
for (;;) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
initializeUnmortgagedList(void) {
register OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(register int properties) {
register int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = false;
}
void executeFix(register int answer) {
moneyStatusGiven = false;
( * functions[answer]) ();
notify1();
}
| static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static char * names[MAX_PROPERTIES + 2],
* mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount,
hasHouses;
void mortgagePrompt(void) {
register int properties;
for (;;) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
int initializeMortgagedList(void) {
register OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(register int properties) {
register int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
void unmortgagePrompt(void) {
register int properties;
for (;;) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
int initializeUnmortgagedList(void) {
register OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(register int properties) {
register int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = false;
}
void executeFix(register int answer) {
moneyStatusGiven = false;
( * functions[answer]) ();
notify1();
}
| static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static char * names[MAX_PROPERTIES + 2],
* mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount,
hasHouses;
void mortgagePrompt(void) {
int properties;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
int initializeMortgagedList(void) {
OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
void unmortgagePrompt(void) {
int properties;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
int initializeUnmortgagedList(void) {
OWN * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = false;
}
void executeFix(int answer) {
moneyStatusGiven = false;
( * functions[answer]) ();
notify1();
}
| static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static char * names[MAX_PROPERTIES + 2],
* mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount,
hasHouses;
void mortgagePrompt(void) {
int properties;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
int initializeMortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
void unmortgagePrompt(void) {
int properties;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
int initializeUnmortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = false;
}
void executeFix(int answer) {
moneyStatusGiven = false;
( * functions[answer]) ();
notify1();
}
| static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static char * names[MAX_PROPERTIES + 2],
* mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount,
hasHouses;
public static void mortgagePrompt(void) {
int properties;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
int initializeMortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
public static void unmortgagePrompt(void) {
int properties;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
int initializeUnmortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = false;
}
void executeFix(int answer) {
moneyStatusGiven = false;
Invoker.invoke(functions[answer]) notify1();
}
| static char sccsid[] = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static char * names[MAX_PROPERTIES + 2];
static char * mortgageChoices[] = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char square[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt(void) {
int properties;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
int initializeMortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
public static void unmortgagePrompt(void) {
int properties;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
int initializeUnmortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = false;
}
void executeFix(int answer) {
moneyStatusGiven = false;
Invoker.invoke(functions[answer]) notify1();
}
| static char[] sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[MAX_PROPERTIES + 2] names;
static String[] mortgageChoices = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char[MAX_PROPERTIES + 2] square;
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt(void) {
int properties;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) printf("You can't mortgage property with houses on it.\n");
else printf("You don't have any un-mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) mortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) return;
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
int initializeMortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (!propertyList->square1->description->isMortgaged) if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) hasHouses++;
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
public static void unmortgagePrompt(void) {
int properties;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) unmortgageProperty(square[0]);
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) return;
unmortgageProperty(square[properties]);
}
}
int initializeUnmortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
fixing = false;
}
void executeFix(int answer) {
moneyStatusGiven = false;
Invoker.invoke(functions[answer]) notify1();
}
| static char[] sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[MAX_PROPERTIES + 2] names;
static String[] mortgageChoices = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char[MAX_PROPERTIES + 2] square;
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt(void) {
int properties;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square[0]);
}
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) {
return;
}
mortgageProperty(square[properties]);
notify1(currentPlayer);
}
}
int initializeMortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) {
if (!propertyList->square1->description->isMortgaged) {
if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
public static void unmortgagePrompt(void) {
int properties;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square[0]);
}
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square[properties]);
}
}
int initializeUnmortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) {
if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) {
executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
}
fixing = false;
}
void executeFix(int answer) {
moneyStatusGiven = false;
Invoker.invoke(functions[answer]) notify1();
}
| static char[] sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[MAX_PROPERTIES + 2] names;
static String[] mortgageChoices = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char[MAX_PROPERTIES + 2] square;
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt(void) {
int properties;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square[0]);
}
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) {
return;
}
mortgageProperty(square[properties]);
notify1();
}
}
int initializeMortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) {
if (!propertyList->square1->description->isMortgaged) {
if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
public static void unmortgagePrompt(void) {
int properties;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square[0]);
}
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square[properties]);
}
}
int initializeUnmortgagedList(void) {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) {
if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt(void) {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) {
executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
}
fixing = false;
}
void executeFix(int answer) {
moneyStatusGiven = false;
Invoker.invoke(functions[answer]) notify1();
}
| static char[] sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[MAX_PROPERTIES + 2] names;
static String[] mortgageChoices = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char[MAX_PROPERTIES + 2] square;
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square[0]);
}
return;
}
properties = getinp("Which property do you want to mortgage? ", names);
if (properties == mortgagedPropertyCount) {
return;
}
mortgageProperty(square[properties]);
notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) {
if (!propertyList->square1->description->isMortgaged) {
if (propertyList->square1->type == TYPE_PROPERTY && propertyList->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square[0]);
}
return;
}
properties = getinp("Which property do you want to unmortgage? ", names);
if (properties == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square[properties]);
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList;
mortgagedPropertyCount = 0;
for (propertyList = currentPlayer->ownedPropertyList;propertyList;propertyList = propertyList->next) {
if (propertyList->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList->square1);
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties) {
int price;
price = board[properties].cost / 2;
board[properties].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt() {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) {
executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
}
fixing = false;
}
void executeFix(int answer) {
moneyStatusGiven = false;
Invoker.invoke(functions[answer]) notify1();
}
| static char[] sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[MAX_PROPERTIES + 2] names;
static String[] mortgageChoices = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char[MAX_PROPERTIES + 2] square;
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square[0]);
}
return;
}
properties1 = getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square[properties1]);
notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = currentPlayer->ownedPropertyList;propertyList5;propertyList5 = propertyList5->next) {
if (!propertyList5->square1->description->isMortgaged) {
if (propertyList5->square1->type == TYPE_PROPERTY && propertyList5->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList5->square1);
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = board[properties2].cost / 2;
board[properties2].description->isMortgaged = true;
printf("That got you $%d\n", price);
currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square[0]);
}
return;
}
properties3 = getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square[properties3]);
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = currentPlayer->ownedPropertyList;propertyList6;propertyList6 = propertyList6->next) {
if (propertyList6->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList6->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList6->square1);
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = board[properties4].cost / 2;
board[properties4].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt() {
moneyStatusGiven = fixing = true;
while (currentPlayer->money <= 0) {
executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
}
fixing = false;
}
void executeFix(int answer) {
moneyStatusGiven = false;
Invoker.invoke(functions[answer]) notify1();
}
| static char[] sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[MAX_PROPERTIES + 2] names;
static String[] mortgageChoices = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char[MAX_PROPERTIES + 2] square;
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square[0]);
}
return;
}
properties1 = getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square[properties1]);
notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer->ownedPropertyList;propertyList5;propertyList5 = propertyList5->next) {
if (!propertyList5->square1->description->isMortgaged) {
if (propertyList5->square1->type == TYPE_PROPERTY && propertyList5->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList5->square1);
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description->isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square[0]);
}
return;
}
properties3 = getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square[properties3]);
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer->ownedPropertyList;propertyList6;propertyList6 = propertyList6->next) {
if (propertyList6->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList6->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList6->square1);
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer->money -= price;
initializeUnmortgagedList();
}
void fixupPrompt() {
Monop.moneyStatusGiven = Monop.fixing = true;
while (Monop.currentPlayer->money <= 0) {
executeFix(getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) notify1();
}
| static char[] sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[MAX_PROPERTIES + 2] names;
static String[] mortgageChoices = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char[MAX_PROPERTIES + 2] square;
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square[0]);
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square[properties1]);
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer->ownedPropertyList;propertyList5;propertyList5 = propertyList5->next) {
if (!propertyList5->square1->description->isMortgaged) {
if (propertyList5->square1->type == TYPE_PROPERTY && propertyList5->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList5->square1);
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description->isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square[0]);
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square[properties3]);
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer->ownedPropertyList;propertyList6;propertyList6 = propertyList6->next) {
if (propertyList6->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList6->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList6->square1);
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer->money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.moneyStatusGiven = Monop.fixing = true;
while (Monop.currentPlayer->money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
| static char[] sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[MAX_PROPERTIES + 2] names;
static String[] mortgageChoices = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char[MAX_PROPERTIES + 2] square;
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square[0]);
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square[properties1]);
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer->ownedPropertyList;propertyList5;propertyList5 = propertyList5->next) {
if (!propertyList5->square1->description->isMortgaged) {
if (propertyList5->square1->type == TYPE_PROPERTY && propertyList5->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList5->square1);
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description->isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square[0]);
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square[properties3]);
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer->ownedPropertyList;propertyList6;propertyList6 = propertyList6->next) {
if (propertyList6->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList6->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList6->square1);
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer->money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer->money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
| static char[] sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names = new String[MAX_PROPERTIES + 2];
static String[] mortgageChoices = {
"quit",
"print",
"where",
"own holdings",
"holdings",
"mortgage",
"unmortgage",
"buy",
"sell",
"card",
"pay",
"trade",
"resign",
"save game",
"restore game",
0}
;
static char[] square = new char[MAX_PROPERTIES + 2];
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square[0]);
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square[properties1]);
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer->ownedPropertyList;propertyList5;propertyList5 = propertyList5->next) {
if (!propertyList5->square1->description->isMortgaged) {
if (propertyList5->square1->type == TYPE_PROPERTY && propertyList5->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList5->square1);
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description->isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square[0]);
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square[properties3]);
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer->ownedPropertyList;propertyList6;propertyList6 = propertyList6->next) {
if (propertyList6->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList6->square1->name;
square[mortgagedPropertyCount++] = getSquareIndex(propertyList6->square1);
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer->money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer->money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names = new String[MAX_PROPERTIES + 2];
static String[] mortgageChoices = "";
static String square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer->ownedPropertyList;propertyList5;propertyList5 = propertyList5->next) {
if (!propertyList5->square1->description->isMortgaged) {
if (propertyList5->square1->type == TYPE_PROPERTY && propertyList5->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5->square1->name;
square.charAt(mortgagedPropertyCount++) = getSquareIndex(propertyList5->square1);
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description->isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square.charAt(0));
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square.charAt(properties3));
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer->ownedPropertyList;propertyList6;propertyList6 = propertyList6->next) {
if (propertyList6->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList6->square1->name;
square.charAt(mortgagedPropertyCount++) = getSquareIndex(propertyList6->square1);
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer->money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer->money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names = new String[MAX_PROPERTIES + 2];
static String[] mortgageChoices = "";
static String square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer->ownedPropertyList;propertyList5;propertyList5 = propertyList5->next) {
if (!propertyList5->square1->description->isMortgaged) {
if (propertyList5->square1->type == TYPE_PROPERTY && propertyList5->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5->square1->name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList5->square1));
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description->isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square.charAt(0));
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square.charAt(properties3));
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer->ownedPropertyList;propertyList6;propertyList6 = propertyList6->next) {
if (propertyList6->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList6->square1->name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList6->square1));
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = 0;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer->money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer->money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names = new String[MAX_PROPERTIES + 2];
static String[] mortgageChoices = "";
static String square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer->ownedPropertyList;propertyList5;propertyList5 = propertyList5->next) {
if (!propertyList5->square1->description->isMortgaged) {
if (propertyList5->square1->type == TYPE_PROPERTY && propertyList5->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5->square1->name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList5->square1));
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description->isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square.charAt(0));
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square.charAt(properties3));
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer->ownedPropertyList;propertyList6;propertyList6 = propertyList6->next) {
if (propertyList6->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList6->square1->name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList6->square1));
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer->money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer->money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid;
sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names;
names = new String[MAX_PROPERTIES + 2];
static String[] mortgageChoices;
mortgageChoices = "";
static String square;
square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList * propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer->ownedPropertyList;propertyList5;propertyList5 = propertyList5->next) {
if (!propertyList5->square1->description->isMortgaged) {
if (propertyList5->square1->type == TYPE_PROPERTY && propertyList5->square1->description->houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5->square1->name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList5->square1));
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description->isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer->money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square.charAt(0));
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square.charAt(properties3));
}
}
int initializeUnmortgagedList() {
OwnedPropertyList * propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer->ownedPropertyList;propertyList6;propertyList6 = propertyList6->next) {
if (propertyList6->square1->description->isMortgaged) {
names[mortgagedPropertyCount] = propertyList6->square1->name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList6->square1));
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description->isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer->money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer->money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid;
sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names;
names = new String[MAX_PROPERTIES + 2];
static String mortgageChoices;
mortgageChoices = "";
static String square;
square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer.ownedPropertyList;propertyList5;propertyList5 = propertyList5.next) {
if (!propertyList5.square1.description.isMortgaged) {
if (propertyList5.square1.type == TYPE_PROPERTY && propertyList5.square1.description.houseCount) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList5.square1));
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description.isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer.money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square.charAt(0));
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square.charAt(properties3));
}
}
int initializeUnmortgagedList() {
OwnedPropertyList propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer.ownedPropertyList;propertyList6;propertyList6 = propertyList6.next) {
if (propertyList6.square1.description.isMortgaged) {
names[mortgagedPropertyCount] = propertyList6.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList6.square1));
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description.isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer.money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer.money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid;
sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names;
names = new String[MAX_PROPERTIES + 2];
static String mortgageChoices;
mortgageChoices = "";
static String square;
square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses != 0) {
printf("You can't mortgage property with houses on it.\n");
}
else {
printf("You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer.ownedPropertyList;propertyList5 != null;propertyList5 = propertyList5.next) {
if (!propertyList5.square1.description.isMortgaged) {
if (propertyList5.square1.type == TYPE_PROPERTY && propertyList5.square1.description.houseCount != 0) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList5.square1));
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description.isMortgaged = true;
printf("That got you $%d\n", price);
Monop.currentPlayer.money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
printf("You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
printf("Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square.charAt(0));
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square.charAt(properties3));
}
}
int initializeUnmortgagedList() {
OwnedPropertyList propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer.ownedPropertyList;propertyList6 != null;propertyList6 = propertyList6.next) {
if (propertyList6.square1.description.isMortgaged) {
names[mortgagedPropertyCount] = propertyList6.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList6.square1));
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description.isMortgaged = false;
price += price / 10;
printf("That cost you $%d\n", price);
Monop.currentPlayer.money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer.money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid;
sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names;
names = new String[MAX_PROPERTIES + 2];
static String mortgageChoices;
mortgageChoices = "";
static String square;
square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses != 0) {
fprintf(stdout, "You can't mortgage property with houses on it.\n");
}
else {
fprintf(stdout, "You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
fprintf(stdout, "Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer.ownedPropertyList;propertyList5 != null;propertyList5 = propertyList5.next) {
if (!propertyList5.square1.description.isMortgaged) {
if (propertyList5.square1.type == TYPE_PROPERTY && propertyList5.square1.description.houseCount != 0) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList5.square1));
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price;
price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description.isMortgaged = true;
fprintf(stdout, "That got you $%d\n", price);
Monop.currentPlayer.money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
fprintf(stdout, "You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
fprintf(stdout, "Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square.charAt(0));
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square.charAt(properties3));
}
}
int initializeUnmortgagedList() {
OwnedPropertyList propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer.ownedPropertyList;propertyList6 != null;propertyList6 = propertyList6.next) {
if (propertyList6.square1.description.isMortgaged) {
names[mortgagedPropertyCount] = propertyList6.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList6.square1));
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price;
price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description.isMortgaged = false;
price += price / 10;
fprintf(stdout, "That cost you $%d\n", price);
Monop.currentPlayer.money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer.money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names = new String[MAX_PROPERTIES + 2];
static String mortgageChoices = "";
static String square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses != 0) {
fprintf(stdout, "You can't mortgage property with houses on it.\n");
}
else {
fprintf(stdout, "You don't have any un-mortgaged property.\n");
}
return;
}
if (mortgagedPropertyCount == 1) {
fprintf(stdout, "Your only mortageable property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer.ownedPropertyList;propertyList5 != null;propertyList5 = propertyList5.next) {
if (!propertyList5.square1.description.isMortgaged) {
if (propertyList5.square1.type == TYPE_PROPERTY && propertyList5.square1.description.houseCount != 0) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList5.square1));
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description.isMortgaged = true;
fprintf(stdout, "That got you $%d\n", price);
Monop.currentPlayer.money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
fprintf(stdout, "You don't have any mortgaged property.\n");
return;
}
if (mortgagedPropertyCount == 1) {
fprintf(stdout, "Your only mortaged property is %s\n", names[0]);
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square.charAt(0));
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square.charAt(properties3));
}
}
int initializeUnmortgagedList() {
OwnedPropertyList propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer.ownedPropertyList;propertyList6 != null;propertyList6 = propertyList6.next) {
if (propertyList6.square1.description.isMortgaged) {
names[mortgagedPropertyCount] = propertyList6.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList6.square1));
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description.isMortgaged = false;
price += price / 10;
fprintf(stdout, "That cost you $%d\n", price);
Monop.currentPlayer.money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer.money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names = new String[MAX_PROPERTIES + 2];
static String mortgageChoices = "";
static String square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses != 0) {
System.out.println("You can't mortgage property with houses on it.");
}
else {
System.out.println("You don't have any un-mortgaged property.");
}
return;
}
if (mortgagedPropertyCount == 1) {
System.out.println("Your only mortageable property is " + (names[0]));
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList propertyList5;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer.ownedPropertyList;propertyList5 != null;propertyList5 = propertyList5.next) {
if (!propertyList5.square1.description.isMortgaged) {
if (propertyList5.square1.type == TYPE_PROPERTY && propertyList5.square1.description.houseCount != 0) {
hasHouses++;
}
else {
names[mortgagedPropertyCount] = propertyList5.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList5.square1));
}
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void mortgageProperty(int properties2) {
int price = Monop.board[properties2].cost / 2;
Monop.board[properties2].description.isMortgaged = true;
System.out.println("That got you $" + price);
Monop.currentPlayer.money += price;
}
public static void unmortgagePrompt() {
int properties3;
while (true) {
if (initializeUnmortgagedList() == 0) {
System.out.println("You don't have any mortgaged property.");
return;
}
if (mortgagedPropertyCount == 1) {
System.out.println("Your only mortaged property is " + (names[0]));
if (Misc.getYesOrNo("Do you want to unmortgage it? ") == 0) {
unmortgageProperty(square.charAt(0));
}
return;
}
properties3 = GetInput.getinp("Which property do you want to unmortgage? ", names);
if (properties3 == mortgagedPropertyCount) {
return;
}
unmortgageProperty(square.charAt(properties3));
}
}
int initializeUnmortgagedList() {
OwnedPropertyList propertyList6;
mortgagedPropertyCount = 0;
for (propertyList6 = Monop.currentPlayer.ownedPropertyList;propertyList6 != null;propertyList6 = propertyList6.next) {
if (propertyList6.square1.description.isMortgaged) {
names[mortgagedPropertyCount] = propertyList6.square1.name;
square = CStringUtils.setCharAt(square, mortgagedPropertyCount++, getSquareIndex(propertyList6.square1));
}
}
names[mortgagedPropertyCount++] = "done";
names[mortgagedPropertyCount--] = null;
return mortgagedPropertyCount;
}
void unmortgageProperty(int properties4) {
int price = Monop.board[properties4].cost / 2;
Monop.board[properties4].description.isMortgaged = false;
price += price / 10;
System.out.println("That cost you $" + price);
Monop.currentPlayer.money -= price;
initializeUnmortgagedList();
}
static void fixupPrompt() {
Monop.fixing = true;
Monop.moneyStatusGiven = Monop.fixing;
while (Monop.currentPlayer.money <= 0) {
executeFix(GetInput.getinp("How are you going to fix it up? ", mortgageChoices));
}
Monop.fixing = false;
}
void executeFix(int answer) {
Monop.moneyStatusGiven = false;
Invoker.invoke(Monop.functions[answer]) Misc.notify1();
}
static {
for (int names1 = 0;names1 < names.length;names1++) {
names[names1] = new String();
}
}
| static String sccsid = "@(#)morg.c 5.4 (Berkeley) 3/25/93";
static String[] names = new String[MAX_PROPERTIES + 2];
static String mortgageChoices = "";
static String square = new String();
static int mortgagedPropertyCount;
static int hasHouses;
public static void mortgagePrompt() {
int properties1 = 0;
while (true) {
if (initializeMortgagedList() == 0) {
if (hasHouses != 0) {
System.out.println("You can't mortgage property with houses on it.");
}
else {
System.out.println("You don't have any un-mortgaged property.");
}
return;
}
if (mortgagedPropertyCount == 1) {
System.out.println("Your only mortageable property is " + (names[0]));
if (Misc.getYesOrNo("Do you want to mortgage it? ") == 0) {
mortgageProperty(square.charAt(0));
}
return;
}
properties1 = GetInput.getinp("Which property do you want to mortgage? ", names);
if (properties1 == mortgagedPropertyCount) {
return;
}
mortgageProperty(square.charAt(properties1));
Misc.notify1();
}
}
int initializeMortgagedList() {
OwnedPropertyList propertyList5 = null;
mortgagedPropertyCount = 0;
for (propertyList5 = Monop.currentPlayer.ownedPropertyList;propertyList5 != null;propertyList5 = propertyList5.next) {
if (!propertyList5.square1.descripti |