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: }

Defined functions

cc defined in line 42; used 1 times
chance defined in line 46; used 1 times
inc_tax defined in line 7; used 1 times
lux_tax defined in line 37; used 1 times

Defined variables

perc defined in line 3; used 1 times
  • in line 11
Last modified: 1982-06-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 980
Valid CSS Valid XHTML 1.0 Strict