|
|
1.1 ! root 1: # include "monop.ext" ! 2: ! 3: static char *perc[] = { ! 4: "10%", "ten percent", "%", "$200", "200", 0 ! 5: }; ! 6: ! 7: inc_tax() { /* collect income tax */ ! 8: ! 9: reg int worth, com_num; ! 10: ! 11: com_num = getinp("Do you wish to lose 10%% of your total worth or $200? ", perc); ! 12: worth = cur_p->money + prop_worth(cur_p); ! 13: printf("You were worth $%d", worth); ! 14: worth /= 10; ! 15: if (com_num > 2) { ! 16: if (worth < 200) ! 17: printf(". Good try, but not quite.\n"); ! 18: else if (worth > 200) ! 19: lucky(".\nGood guess. "); ! 20: cur_p->money -= 200; ! 21: } ! 22: else { ! 23: printf(", so you pay $%d", worth); ! 24: if (worth > 200) ! 25: printf(" OUCH!!!!.\n"); ! 26: else if (worth < 200) ! 27: lucky("\nGood guess. "); ! 28: cur_p->money -= worth; ! 29: } ! 30: if (worth == 200) ! 31: lucky("\nIt makes no difference! "); ! 32: } ! 33: goto_jail() { /* move player to jail */ ! 34: ! 35: cur_p->loc = JAIL; ! 36: } ! 37: lux_tax() { /* landing on luxury tax */ ! 38: ! 39: printf("You lose $75\n"); ! 40: cur_p->money -= 75; ! 41: } ! 42: cc() { /* draw community chest card */ ! 43: ! 44: get_card(&CC_D); ! 45: } ! 46: chance() { /* draw chance card */ ! 47: ! 48: get_card(&CH_D); ! 49: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.