home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog_oth / monopoly.lzh / monopoly_source.LZH / f2.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-06  |  34.1 KB  |  1,548 lines

  1. /* f2.c contains functions for monopoly   
  2.         tax(),  auctionprop(),  fillodstr()
  3.         overdrawn(),  usefreecard(),  trydoubles(),  payfine(),
  4.         servicemenu(),  ckpropinfomsg(),  outofgame(),  fillattr(),
  5.     makeauctionmenu(),   fixauctionmenu(),
  6.     servicepropmenu(menu, item, sub)    */
  7.  
  8. #include "mono:defines"
  9. #include "mono:xvariables"
  10.  
  11. VOID fixauctionmenu()
  12. {
  13. OffMenu(auctionwindow, 0);
  14. OffMenu(auctionwindow, 2048);
  15. if (nsp > 2) OffMenu(auctionwindow, 4096);
  16. if (nsp > 3) OffMenu(auctionwindow, 6144);
  17. if (!notplaying[0])  OnMenu(auctionwindow, 0);
  18. if (!notplaying[1])  OnMenu(auctionwindow, 2048);
  19. if (!notplaying[2])  OnMenu(auctionwindow, 4096);
  20. if (!notplaying[3])  OnMenu(auctionwindow, 6144);
  21. }
  22.  
  23.  
  24. VOID tax()
  25. {
  26. USHORT iter;
  27. USHORT cost;
  28. cost=0;
  29. for (iter=0; iter<40; iter++)
  30.    {
  31.    if (owner[iter] == nowrolling)
  32.       {
  33.       cost=cost+propcost[iter];
  34.       cost=cost+(numhouses[iter]*housecost[iter]);
  35.       }
  36.    }
  37. cost=cost+(freecard[nowrolling]*50);
  38. cost=cost+bankroll[nowrolling];
  39. eft(nowrolling, SLUSH, (cost/10) );
  40. }
  41.    
  42. USHORT auction(which)
  43. USHORT which;
  44. {
  45. ULONG aclass;
  46. struct IntuiText address, msg0, msg1, msg2, msg3, msg4, msg5, msg6,
  47.                  msg7, msg8, msg9, dollar, msg10, nobid_text;
  48. struct StringInfo bidinfo;
  49. struct Border nobidborder;
  50. USHORT nobidbord[10], acode, hold_line;
  51. aclass=0;
  52. acode=0;
  53.  
  54. nobidbord[0]=-1;
  55. nobidbord[1]=-1;
  56. nobidbord[2]=57;
  57. nobidbord[3]=-1;
  58. nobidbord[4]=57;
  59. nobidbord[5]=10;
  60. nobidbord[6]=-1;
  61. nobidbord[7]=10;
  62. nobidbord[8]=-1;
  63. nobidbord[9]=-1;
  64.  
  65. nobidborder.LeftEdge=0;
  66. nobidborder.TopEdge=0;
  67. nobidborder.FrontPen=green;
  68. nobidborder.BackPen=black;
  69. nobidborder.DrawMode=JAM1;
  70. nobidborder.Count=5;
  71. nobidborder.XY=&nobidbord[0];
  72. nobidborder.NextBorder=NULL;
  73.  
  74. nobid_text.FrontPen=green;
  75. nobid_text.BackPen=black;
  76. nobid_text.DrawMode=JAM1;
  77. nobid_text.TopEdge=1;
  78. nobid_text.LeftEdge=1;
  79. nobid_text.IText=(UBYTE *)"NO BIDS";
  80. nobid_text.ITextFont=NULL;
  81. nobid_text.NextText=NULL;
  82.  
  83. address.BackPen=black;
  84. address.DrawMode=JAM1;
  85. address.TopEdge=0;
  86. address.LeftEdge=5;
  87. address.ITextFont=NULL;
  88. address.NextText=&msg0;
  89.  
  90. msg0.FrontPen=dk_maroon;
  91. msg0.BackPen=black;
  92. msg0.DrawMode=JAM1;
  93. msg0.TopEdge=10;
  94. msg0.LeftEdge=5;
  95. msg0.IText=(UBYTE *)"is for sale to the";
  96. msg0.ITextFont=NULL;
  97. msg0.NextText=&msg1;
  98.  
  99. msg1.FrontPen=dk_maroon;
  100. msg1.BackPen=black;
  101. msg1.DrawMode=JAM1;
  102. msg1.TopEdge=20;
  103. msg1.LeftEdge=5;
  104. msg1.IText=(UBYTE *)"highest bidder.  Please";
  105. msg1.ITextFont=NULL;
  106. msg1.NextText=&msg2;
  107.  
  108. msg2.FrontPen=dk_maroon;
  109. msg2.BackPen=black;
  110. msg2.DrawMode=JAM1;
  111. msg2.TopEdge=30;
  112. msg2.LeftEdge=5;
  113. msg2.IText=(UBYTE *)"bid amongst yourselves,";
  114. msg2.ITextFont=NULL;
  115. msg2.NextText=&msg3;
  116.  
  117. msg3.FrontPen=dk_maroon;
  118. msg3.BackPen=black;
  119. msg3.DrawMode=JAM1;
  120. msg3.TopEdge=40;
  121. msg3.LeftEdge=5;
  122. msg3.IText=(UBYTE *)"then enter the high";
  123. msg3.ITextFont=NULL;
  124. msg3.NextText=&msg4;
  125.  
  126. msg4.FrontPen=dk_maroon;
  127. msg4.BackPen=black;
  128. msg4.DrawMode=JAM1;
  129. msg4.TopEdge=50;
  130. msg4.LeftEdge=5;
  131. msg4.IText=(UBYTE *)"bid below by clicking";
  132. msg4.ITextFont=NULL;
  133. msg4.NextText=&msg5;
  134.  
  135. msg5.FrontPen=dk_maroon;
  136. msg5.BackPen=black;
  137. msg5.DrawMode=JAM1;
  138. msg5.TopEdge=60;
  139. msg5.LeftEdge=5;
  140. msg5.IText=(UBYTE *)"on the number and";
  141. msg5.ITextFont=NULL;
  142. msg5.NextText=&msg6;
  143.  
  144. msg6.FrontPen=dk_maroon;
  145. msg6.BackPen=black;
  146. msg6.DrawMode=JAM1;
  147. msg6.TopEdge=70;
  148. msg6.LeftEdge=5;
  149. msg6.IText=(UBYTE *)"deleting it, then enter";
  150. msg6.ITextFont=NULL;
  151. msg6.NextText=&msg7;
  152.  
  153. msg7.FrontPen=dk_maroon;
  154. msg7.BackPen=black;
  155. msg7.DrawMode=JAM1;
  156. msg7.TopEdge=80;
  157. msg7.LeftEdge=5;
  158. msg7.IText=(UBYTE *)"the bid.  Next, use the";
  159. msg7.ITextFont=NULL;
  160. msg7.NextText=&msg8;
  161.  
  162. msg8.FrontPen=dk_maroon;
  163. msg8.BackPen=black;
  164. msg8.DrawMode=JAM1;
  165. msg8.TopEdge=89;
  166. msg8.LeftEdge=5;
  167. msg8.IText=(UBYTE *)"MENU to name the";
  168. msg8.ITextFont=NULL;
  169. msg8.NextText=&msg9;
  170.  
  171. msg9.FrontPen=dk_maroon;
  172. msg9.BackPen=black;
  173. msg9.DrawMode=JAM1;
  174. msg9.TopEdge=98;
  175. msg9.LeftEdge=5;
  176. msg9.IText=(UBYTE *)"winning bidder.";
  177. msg9.ITextFont=NULL;
  178. msg9.NextText=$
  179.  
  180. dollar.FrontPen=red;
  181. dollar.BackPen=black;
  182. dollar.DrawMode=JAM2;
  183. dollar.TopEdge=109;
  184. dollar.LeftEdge=41;
  185. dollar.IText=(UBYTE *)"$";
  186. dollar.ITextFont=NULL;
  187. dollar.NextText=NULL;
  188.  
  189. msg10.FrontPen=maroon;
  190. msg10.BackPen=black;
  191. msg10.DrawMode=JAM1;
  192. msg10.TopEdge=115;
  193. msg10.LeftEdge=28;
  194. msg10.IText=(UBYTE *)"IS THIS CORRECT?";
  195. msg10.ITextFont=NULL;
  196. msg10.NextText=NULL;
  197.  
  198. nobidgag.NextGadget=NULL;
  199. nobidgag.LeftEdge=50;
  200. nobidgag.TopEdge=130;
  201. nobidgag.Width=56;
  202. nobidgag.Height=10;
  203. nobidgag.Flags=GADGHCOMP;
  204. nobidgag.Activation=GADGIMMEDIATE | RELVERIFY;
  205. nobidgag.GadgetType=BOOLGADGET;
  206. nobidgag.GadgetRender=(APTR)&nobidborder;
  207. nobidgag.SelectRender=NULL;
  208. nobidgag.GadgetText=&nobid_text;
  209. nobidgag.MutualExclude=NULL;
  210. nobidgag.SpecialInfo=NULL;
  211. nobidgag.GadgetID=8;
  212. nobidgag.UserData=NULL;
  213.  
  214. bidgag.NextGadget=&nobidgag;
  215. bidgag.LeftEdge=50;
  216. bidgag.TopEdge=109;
  217. bidgag.Width=53;
  218. bidgag.Height=10;
  219. bidgag.Flags=GADGHNONE;
  220. bidgag.Activation=LONGINT | GADGIMMEDIATE;
  221. bidgag.GadgetType=STRGADGET;
  222. bidgag.GadgetRender=(APTR)&bidborder;
  223. bidgag.SelectRender=NULL;
  224. bidgag.GadgetText=NULL;
  225. bidgag.MutualExclude=NULL;
  226. bidgag.SpecialInfo=(APTR)&bidinfo;
  227. bidgag.GadgetID=9;
  228. bidgag.UserData=NULL;
  229.  
  230. bidinfo.Buffer=nbufbid;
  231. bidinfo.UndoBuffer=undobufi;
  232. bidinfo.MaxChars=6;
  233. bidinfo.BufferPos=0;
  234. bidinfo.DispPos=0;
  235. bidinfo.LongInt=0;
  236.  
  237. if (which == 1)
  238.    {
  239.    address.IText=(UBYTE *)"MEDITERRANEAN AVENUE";
  240.    address.FrontPen=purple;
  241.    }
  242.  
  243. if (which == 3)
  244.    {
  245.    address.IText=(UBYTE *)"BALTIC AVENUE";
  246.    address.FrontPen=purple;
  247.    }
  248.  
  249. if (which == 5)
  250.    {
  251.    address.IText=(UBYTE *)"READING RR";
  252.    address.FrontPen=flesh;
  253.    }
  254.  
  255. if (which == 6)
  256.    {
  257.    address.IText=(UBYTE *)"ORIENTAL AVENUE";
  258.    address.FrontPen=lt_blue;
  259.    }
  260.  
  261. if (which == 8)
  262.    {
  263.    address.IText=(UBYTE *)"VERMONT AVENUE";
  264.    address.FrontPen=lt_blue;
  265.    }
  266.  
  267. if (which == 9)
  268.    {
  269.    address.IText=(UBYTE *)"CONNECTICUT  AVENUE";
  270.    address.FrontPen=lt_blue;
  271.    }
  272.  
  273. if (which == 11)
  274.    {
  275.    address.IText=(UBYTE *)"ST. CHARLES PLACE";
  276.    address.FrontPen=maroon;
  277.    }
  278.  
  279. if (which == 12)
  280.    {
  281.    address.IText=(UBYTE *)"ELECTRIC COMPANY";
  282.    address.FrontPen=yellow;
  283.    }
  284.  
  285. if (which == 13)
  286.    {
  287.    address.IText=(UBYTE *)"STATES  AVENUE";
  288.    address.FrontPen=maroon;
  289.    }
  290.  
  291. if (which == 14)
  292.    {
  293.    address.IText=(UBYTE *)"VIRGINIA AVENUE";
  294.    address.FrontPen=maroon;
  295.    }
  296.  
  297. if (which == 15)
  298.    {
  299.    address.IText=(UBYTE *)"PENNSYLVANIA RR";
  300.    address.FrontPen=flesh;
  301.    }
  302.  
  303. if (which == 16)
  304.    {
  305.    address.IText=(UBYTE *)"ST. JAMES PLACE";
  306.    address.FrontPen=orange;
  307.    }
  308.  
  309. if (which == 18)
  310.    {
  311.    address.IText=(UBYTE *)"TENNESSEE AVENUE";
  312.    address.FrontPen=orange;
  313.    }
  314.  
  315. if (which == 19)
  316.    {
  317.    address.IText=(UBYTE *)"NEW YORK AVENUE";
  318.    address.FrontPen=orange;
  319.    }
  320.  
  321. if (which == 21)
  322.    {
  323.    address.IText=(UBYTE *)"KENTUCKY AVENUE";
  324.    address.FrontPen=red;
  325.    }
  326.  
  327. if (which == 23)
  328.    {
  329.    address.IText=(UBYTE *)"INDIANA AVENUE";
  330.    address.FrontPen=red;
  331.    }
  332.  
  333. if (which == 24)
  334.    {
  335.    address.IText=(UBYTE *)"ILLINOIS AVENUE";
  336.    address.FrontPen=red;
  337.    }
  338.  
  339. if (which == 25)
  340.    {
  341.    address.IText=(UBYTE *)"B. & O. RR";
  342.    address.FrontPen=flesh;
  343.    }
  344.  
  345. if (which == 26)
  346.    {
  347.    address.IText=(UBYTE *)"ATLANTIC AVENUE";
  348.    address.FrontPen=yellow;
  349.    }
  350.  
  351. if (which == 27)
  352.    {
  353.    address.IText=(UBYTE *)"VENTNOR AVENUE";
  354.    address.FrontPen=yellow;
  355.    }
  356.  
  357. if (which == 28)
  358.    {
  359.    address.IText=(UBYTE *)"WATER WORKS";
  360.    address.FrontPen=royal_blue;
  361.    }
  362.  
  363. if (which == 29)
  364.    {
  365.    address.IText=(UBYTE *)"MARVIN GARDENS";
  366.    address.FrontPen=yellow;
  367.    }
  368.  
  369. if (which == 31)
  370.    {
  371.    address.IText=(UBYTE *)"PACIFIC AVENUE";
  372.    address.FrontPen=green;
  373.    }
  374.  
  375. if (which == 32)
  376.    {
  377.    address.IText=(UBYTE *)"NORTH CAROLINA AVENUE";
  378.    address.FrontPen=green;
  379.    }
  380.  
  381. if (which == 34)
  382.    {
  383.    address.IText=(UBYTE *)"PENNSYLVANIA AVENUE";
  384.    address.FrontPen=green;
  385.    }
  386.  
  387. if (which == 35)
  388.    {
  389.    address.IText=(UBYTE *)"SHORT LINE";
  390.    address.FrontPen=flesh;
  391.    }
  392.  
  393. if (which == 37)
  394.    {
  395.    address.IText=(UBYTE *)"PARK PLACE";
  396.    address.FrontPen=dk_blue;
  397.    }
  398.  
  399. if (which == 39)
  400.    {
  401.    address.IText=(UBYTE *)"BOARDWALK";
  402.    address.FrontPen=dk_blue;
  403.    }
  404.  
  405. nauctionw.Screen=screen1;
  406. nauctionw.IDCMPFlags=MENUPICK | GADGETUP | RAWKEY;
  407. nauctionw.FirstGadget=&bidgag;
  408. if ((auctionwindow=(struct Window *)OpenWindow(&nauctionw))==NULL) cleanup();
  409. rportauction=auctionwindow->RPort;
  410. SetMenuStrip(auctionwindow, &Menu12);
  411. fixauctionmenu();
  412.  
  413. PrintIText(rportauction, &address, 0, 0);
  414.  
  415. line0_text=159;   /*   AUCTION PROP  */
  416. for (j=0, hold_line=line0_text; j<SHOW_LINES; j++)
  417.     instructIT[j].IText=instructline[hold_line++];
  418.  
  419. recheckamsg:
  420. Wait(1<<auctionwindow->UserPort->mp_SigBit);
  421.  
  422. while((auctionmsg=(struct IntuiMessage *)
  423.                          GetMsg(auctionwindow->UserPort))!=NULL)
  424.    {
  425.    aclass=auctionmsg->Class;
  426.    acode=auctionmsg->Code;
  427.    if (aclass == GADGETUP)   getID(auctionmsg);
  428.    ReplyMsg(auctionmsg);
  429.    }
  430. if ( (aclass == RAWKEY) && (acode == HELP) )
  431.    {
  432.    instruction();
  433.    goto recheckamsg;
  434.    }
  435. if ( (aclass == GADGETUP) && (gagid == 8) )   return(NOBIDS);
  436. if ( (aclass == MENUPICK) && (acode == MENUNULL) )  goto recheckamsg;
  437. if ( (aclass == MENUPICK) && (acode != MENUNULL) )
  438.    {
  439.    if (MENUNUM(acode) == 1)
  440.       {
  441.       if (ITEMNUM(acode) == 0)  reviewprop();
  442.       if (ITEMNUM(acode) == 1)  viewdeeds();
  443.       if (ITEMNUM(acode) == 2)  moneybags(SUBNUM(acode));
  444.       goto recheckamsg;
  445.       }
  446.    ClearMenuStrip(auctionwindow);
  447.    CloseWindow(auctionwindow);
  448.    yesgag.TopEdge=130;
  449.    nogag.TopEdge=130;
  450.    yesgag.LeftEdge=145;
  451.    nogag.LeftEdge=10;
  452.    buyee=ITEMNUM(acode);
  453.    bidcost=bidinfo.LongInt;
  454.    if (buyee == 0)
  455.       {
  456.       msg4.IText=&name0[0];
  457.       msg4.FrontPen=25;
  458.       }
  459.    if (buyee == 1)
  460.       {
  461.       msg4.IText=&name1[0];
  462.       msg4.FrontPen=26;
  463.       }
  464.    if (buyee == 2)
  465.       { 
  466.       msg4.IText=&name2[0];
  467.       msg4.FrontPen=27;
  468.       }
  469.    if (buyee == 3)
  470.       {
  471.       msg4.IText=&name3[0];
  472.       msg4.FrontPen=28;
  473.       }
  474.    msg0.IText=(UBYTE *)"has been auctioned";
  475.    msg1.IText=(UBYTE *)"off to the highest";
  476.    msg2.IText=(UBYTE *)"bidder.";
  477.    msg3.IText=(UBYTE *)" ";
  478.    msg5.IText=(UBYTE *)"won the bidding";
  479.    msg6.IText=(UBYTE *)"with a bid of:";
  480.    msg7.IText=(UBYTE *)"$";
  481.    msg8.IText=&nbufbid[0];
  482.    msg9.IText=(UBYTE *)" ";
  483.    msg0.FrontPen=brite_green;
  484.    msg1.FrontPen=brite_green;
  485.    msg2.FrontPen=brite_green;
  486.    msg3.FrontPen=brite_green;
  487.    msg5.FrontPen=brite_green;
  488.    msg6.FrontPen=brite_green;
  489.    msg7.FrontPen=red;
  490.    msg8.FrontPen=red;
  491.    msg8.TopEdge=80;
  492.    msg8.LeftEdge=14;
  493.    msg9.NextText=&msg10;
  494.    nauctionw.FirstGadget=&yesgag;
  495.    nauctionw.IDCMPFlags=GADGETUP | RAWKEY;
  496.    if ((auctionwindow=(struct Window *)OpenWindow(&nauctionw))==NULL) cleanup();
  497.    rportauction=auctionwindow->RPort;
  498.    PrintIText(rportauction, &address, 0, 0);
  499.  
  500.    line0_text=173;   /*   AUCTION PROP  */
  501.    for (j=0, hold_line=line0_text; j<SHOW_LINES; j++)
  502.      instructIT[j].IText=instructline[hold_line++];
  503.  
  504.    getamsgagain:
  505.    Wait(1<<auctionwindow->UserPort->mp_SigBit);
  506.  
  507.    while((auctionmsg=(struct IntuiMessage *)
  508.                          GetMsg(auctionwindow->UserPort))!=NULL)
  509.       {
  510.       aclass=auctionmsg->Class;
  511.       acode=auctionmsg->Code;
  512.       if (aclass == GADGETUP)  getID(auctionmsg);
  513.       ReplyMsg(auctionmsg);
  514.       }
  515.    if ( (aclass == RAWKEY) && (acode == HELP) )
  516.       {
  517.       instruction();
  518.       goto getamsgagain;
  519.       }
  520.    if ( (aclass == GADGETUP) && (gagid == YES) )   return(GOODBID);
  521.    if ( (aclass == GADGETUP) && (gagid == NO) )   return(BADBID);
  522.    }
  523. }
  524.  
  525. VOID auctionprop(which)
  526. USHORT which;
  527. {
  528. USHORT action;
  529.  
  530. bid=TRUE;
  531. while (bid)
  532.    {
  533.    action=auction(which);
  534.    if (action == NOBIDS)
  535.       {
  536.       ClearMenuStrip(auctionwindow);
  537.       (VOID)RemoveGadget(auctionwindow, &bidgag);
  538.       (VOID)RemoveGadget(auctionwindow, &nobidgag);
  539.       CloseWindow(auctionwindow);
  540.       owner[which]=9;
  541.       bid=FALSE;
  542.       }
  543.    if (action == GOODBID)
  544.       {
  545.       CloseWindow(auctionwindow);
  546.       transfertitle((USHORT)buyee, BANK, which, (USHORT)bidcost);
  547.       bid=FALSE;
  548.       }
  549.    if (action == BADBID)  CloseWindow(auctionwindow);
  550.    }
  551. }
  552.  
  553. VOID fillodstr()
  554. {
  555. (VOID) stcl_d(odamount, lamount);
  556. SetAPen(rportoverdrawn, black);
  557. RectFill(rportoverdrawn, 83, 70, 192, 80);
  558. }
  559.  
  560. VOID overdrawn(who, amountneeded)
  561. USHORT who, amountneeded;   /*  amount will be size of debt   */
  562. {
  563. struct IntuiText odname, warn, odwad, dollarsign, useM, useM1,
  564.                  pqname, pqprompt, pqyesprompt, pqnoprompt;
  565. ULONG odclass, odcode;
  566. LONG startdollar;
  567.  
  568. odclass=0;
  569. odcode=0;
  570.  
  571. startdollar=bankroll[who];  
  572. lamount=( (LONG)amountneeded-bankroll[who] );
  573.  
  574.  
  575. pqname.BackPen=black;
  576. pqname.DrawMode=JAM1;
  577. pqname.LeftEdge=5;
  578. pqname.TopEdge=5;
  579. pqname.ITextFont=NULL;
  580. pqname.NextText=&pqprompt;
  581.  
  582. pqprompt.BackPen=black;
  583. pqprompt.DrawMode=JAM1;
  584. pqprompt.LeftEdge=5;
  585. pqprompt.TopEdge=15;
  586. pqprompt.IText=(UBYTE *)"Will YOU quit the game?";
  587. pqprompt.ITextFont=NULL;
  588. pqprompt.NextText=NULL;
  589.  
  590. pqyesprompt.BackPen=red;
  591. pqyesprompt.DrawMode=JAM1;
  592. pqyesprompt.LeftEdge=6;
  593. pqyesprompt.TopEdge=4;
  594. pqyesprompt.IText=(UBYTE *)"QUIT";
  595. pqyesprompt.ITextFont=NULL;
  596. pqyesprompt.NextText=NULL;
  597.  
  598. pqnoprompt.BackPen=green;
  599. pqnoprompt.DrawMode=JAM1;
  600. pqnoprompt.LeftEdge=6;
  601. pqnoprompt.TopEdge=4;
  602. pqnoprompt.IText=(UBYTE *)"PLAY";
  603. pqnoprompt.ITextFont=NULL;
  604. pqnoprompt.NextText=NULL;
  605.  
  606. if (who == 0)
  607.    {
  608.    pqprompt.FrontPen=25;
  609.    pqname.FrontPen=25;
  610.    odname.FrontPen=25;
  611.    odname.IText=&name0[0]; 
  612.    pqname.IText=&name0[0]; 
  613.    }
  614. if  (who == 1)
  615.    {
  616.    pqprompt.FrontPen=26;
  617.    pqname.FrontPen=26;
  618.    odname.FrontPen=26;
  619.    odname.IText=&name1[0];
  620.    pqname.IText=&name1[0];
  621.    }
  622. if  (who == 2)
  623.    {   
  624.    pqprompt.FrontPen=27;
  625.    pqname.FrontPen=27;
  626.    odname.FrontPen=27;
  627.    odname.IText=&name2[0];
  628.    pqname.IText=&name2[0];
  629.    }
  630. if  (who == 3)
  631.    {
  632.    pqprompt.FrontPen=28;
  633.    pqname.FrontPen=28;
  634.    odname.FrontPen=28;
  635.    odname.IText=&name3[0];
  636.    pqname.IText=&name3[0];
  637.    }
  638.  
  639. odname.BackPen=black;
  640. odname.DrawMode=JAM1;
  641. odname.LeftEdge=5;
  642. odname.TopEdge=35;
  643. odname.ITextFont=NULL;
  644. odname.NextText=&warn;
  645.  
  646. warn.FrontPen=maroon;
  647. warn.BackPen=black;
  648. warn.DrawMode=JAM1;
  649. warn.LeftEdge=5;
  650. warn.TopEdge=55;
  651. warn.IText=(UBYTE *)"YOU ARE OVER DRAWN!";
  652. warn.ITextFont=NULL;
  653. warn.NextText=&useM;
  654.  
  655. dollarsign.FrontPen=red;
  656. dollarsign.BackPen=black;
  657. dollarsign.DrawMode=JAM1;
  658. dollarsign.LeftEdge=5;
  659. dollarsign.TopEdge=70;
  660. dollarsign.IText=(UBYTE *)"You need $";
  661. dollarsign.ITextFont=NULL;
  662. dollarsign.NextText=&odwad;
  663.  
  664. odwad.FrontPen=red;
  665. odwad.BackPen=black;
  666. odwad.DrawMode=JAM1;
  667. odwad.LeftEdge=85;
  668. odwad.TopEdge=70;
  669. odwad.ITextFont=NULL;
  670. odwad.NextText=NULL;
  671.  
  672. useM.FrontPen=dk_maroon;
  673. useM.BackPen=black;
  674. useM.DrawMode=JAM1;
  675. useM.LeftEdge=5;
  676. useM.TopEdge=90;
  677. useM.IText=(UBYTE *)"      USE THE MENU";
  678. useM.ITextFont=NULL;
  679. useM.NextText=&useM1;
  680.  
  681. useM1.FrontPen=dk_maroon;
  682. useM1.BackPen=black;
  683. useM1.DrawMode=JAM1;
  684. useM1.LeftEdge=5;
  685. useM1.TopEdge=100;
  686. useM1.IText=(UBYTE *)"    TO OBTAIN FUNDS.";
  687. useM1.ITextFont=NULL;
  688. useM1.NextText=NULL;
  689.  
  690.  
  691. noverdrawnw.Screen=screen1;
  692. if ((overdrawnwindow=(struct Window *)OpenWindow(&noverdrawnw))==NULL) 
  693.      cleanup();
  694. rportoverdrawn=overdrawnwindow->RPort;
  695. SetMenuStrip(overdrawnwindow, &Menu10);
  696. fixodmenu();
  697.  
  698. fillodstr();
  699. odwad.IText=&odamount[0];
  700.  
  701. PrintIText(rportoverdrawn, &odname, 0, 0);
  702. PrintIText(rportoverdrawn, &dollarsign, 0, 0);
  703.  
  704. doneod=FALSE;
  705. while (!doneod)
  706.    {
  707.    if (1<<overdrawnwindow->UserPort->mp_SigBit)
  708.       {
  709.       while((overdrawnmsg=(struct IntuiMessage *)
  710.                          GetMsg(overdrawnwindow->UserPort))!=NULL)
  711.          {
  712.          odclass=overdrawnmsg->Class;
  713.          odcode=overdrawnmsg->Code;
  714.          ReplyMsg(overdrawnmsg);
  715.    
  716.          if (odclass == CLOSEWINDOW)
  717.             {
  718.         if (odqpflag || building || mortgaging)
  719.            {
  720.            doneod=TRUE;
  721.            goto excloseW;
  722.            }
  723.             doneod=(AutoRequest(overdrawnwindow, &pqname, &pqyesprompt, 
  724.                 &pqnoprompt, NULL, NULL, 215, 60));
  725.         excloseW:
  726.             }
  727.  
  728.          if ( (odclass == MENUPICK) && (odcode != MENUNULL) )
  729.             {
  730.         if ( (MENUNUM(odcode) == 0) && (ITEMNUM(odcode) == 0) )  
  731.            buildhouse(SUBNUM(odcode));
  732.             if ( (MENUNUM(odcode) == 0) && (ITEMNUM(odcode) == 1) )  
  733.            sellhouse(SUBNUM(odcode));
  734.             if ( (MENUNUM(odcode) == 0) && (ITEMNUM(odcode) == 2) )  
  735.            makemortgage(SUBNUM(odcode));
  736.             if ( (MENUNUM(odcode) == 0) && (ITEMNUM(odcode) == 3) )  
  737.            liftmortgage(SUBNUM(odcode));
  738.             if ( (MENUNUM(odcode) == 0) && (ITEMNUM(odcode) == 4) )  
  739.            reviewprop();
  740.             if ( (MENUNUM(odcode) == 0) && (ITEMNUM(odcode) == 5) )  
  741.            viewdeeds();
  742.             if ( (MENUNUM(odcode) == 1) && (ITEMNUM(odcode) == 0) )  
  743.            (VOID)offersell();
  744.             if ( (MENUNUM(odcode) == 1) && (ITEMNUM(odcode) == 1) )  
  745.            (VOID)offerbuy();
  746.             if ( (MENUNUM(odcode) == 1) && (ITEMNUM(odcode) == 2) )  
  747.                moneybags(SUBNUM(odcode));
  748.             if (startdollar != bankroll[who])
  749.            {
  750.            if (bankroll[who] <= amountneeded)
  751.               {
  752.           lamount=( (LONG)amountneeded-bankroll[who] );
  753.                   fillodstr();
  754.           odwad.IText=&odamount[0];
  755.           startdollar=bankroll[who];
  756.               PrintIText(rportoverdrawn, &odwad, 0, 0);
  757.           }
  758.                if (bankroll[who] >= amountneeded)
  759.               {
  760.           SetAPen(rportoverdrawn, black);
  761.           RectFill(rportoverdrawn, 0, 50, 192, 112);
  762.           warn.IText=(UBYTE *)"YOU ARE NOT OVERDRAWN.";
  763.           warn.NextText=NULL;
  764.           PrintIText(rportoverdrawn, &warn, 0, 0);
  765.           Delay(75);
  766.           doneod=TRUE;
  767.           }
  768.            }
  769.             }
  770.          }
  771.       }
  772.    }
  773. ClearMenuStrip(overdrawnwindow);
  774. CloseWindow(overdrawnwindow);
  775. }
  776.  
  777.  
  778. VOID usefreecard()
  779. {
  780. freecard[nowrolling]--;
  781. if  (nowrolling == 0)
  782.    {
  783.    REDX=vis[0][nowrolling];
  784.    REDY=vis[1][nowrolling];
  785.    }
  786. if  (nowrolling == 1)
  787.    {
  788.    GREENX=vis[0][nowrolling];
  789.    GREENY=vis[1][nowrolling];
  790.    }
  791. if  (nowrolling == 2)
  792.    {
  793.    BLUEX=vis[0][nowrolling];
  794.    BLUEY=vis[1][nowrolling];
  795.    }
  796. if  (nowrolling == 3)
  797.    {
  798.    YELLOWX=vis[0][nowrolling];
  799.    YELLOWY=vis[1][nowrolling];
  800.    }
  801. isinjail[nowrolling]=FALSE;
  802. WaitTOF();
  803. DrawGels();
  804. playerat[nowrolling]=10;
  805. fixmenu();
  806. }
  807.  
  808. VOID outofgame(player, in_favor_of)
  809. USHORT player, in_favor_of;
  810. {
  811. USHORT iter;
  812.  
  813. notplaying[player]=TRUE;
  814. ntp--;
  815. for (iter=0; iter<40; iter++)
  816.    {
  817.    if (owner[iter] == player)
  818.       {
  819.       if ( (iter == 12) || (iter == 28) )
  820.          {
  821.      if ( (in_favor_of != BANK) && (in_favor_of != SLUSH) )
  822.         numutil[in_favor_of]++;
  823.          }
  824.       if ( (iter == 5) || (iter == 15) || (iter == 25) || (iter ==35) )
  825.          {
  826.      if ( (in_favor_of != BANK) && (in_favor_of != SLUSH) )
  827.             numrr[in_favor_of]++;
  828.          }
  829.       if (numhouses[iter] > 0)
  830.          {
  831.      eft(BANK, player, (housecost[iter]/2)*numhouses[iter]);
  832.          drawhouse(iter, FALSE);
  833.          numhouses[iter]=0;
  834.      }
  835.       if ( (in_favor_of != BANK) && (in_favor_of != SLUSH) )
  836.          {
  837.          transfertitle(in_favor_of, player, iter, 0);
  838.      }
  839.       if ( (in_favor_of == BANK) || (in_favor_of == SLUSH) )
  840.          {
  841.      auctionprop(iter);
  842.      }
  843.       }
  844.    }
  845. numutil[player]=0;
  846. numrr[player]=0;
  847. eft(player, in_favor_of, bankroll[player]);
  848. if (player == 0)
  849.    {
  850.    RemIBob(Redbob, &screen1->RastPort, vport1);
  851.    typeplayer0=DEAD;
  852.    }
  853. if (player == 1)
  854.    {
  855.    RemIBob(Greenbob, &screen1->RastPort, vport1);
  856.    typeplayer1=DEAD;
  857.    }
  858. if (player == 2)
  859.    {
  860.    RemIBob(Bluebob, &screen1->RastPort, vport1);
  861.    typeplayer2=DEAD;
  862.    }
  863. if (player == 3)
  864.    {
  865.    RemIBob(Yellowbob, &screen1->RastPort, vport1);
  866.    typeplayer3=DEAD;
  867.    }
  868. }
  869.  
  870. VOID payfine()
  871. {
  872. if (bankroll[nowrolling]<50)  overdrawn(nowrolling, 50);
  873. if (bankroll[nowrolling]<50)
  874.    {
  875.    outofgame(nowrolling);
  876.    goto expayfine;
  877.    }
  878. bankroll[nowrolling]=bankroll[nowrolling]-50;
  879. if (nowrolling == 0)
  880.    {
  881.    REDX=vis[0][nowrolling];
  882.    REDY=vis[1][nowrolling];
  883.    }
  884. if (nowrolling == 1)
  885.    {
  886.    GREENX=vis[0][nowrolling];
  887.    GREENY=vis[1][nowrolling];
  888.    }
  889. if (nowrolling == 2)
  890.    {
  891.    BLUEX=vis[0][nowrolling];
  892.    BLUEY=vis[1][nowrolling];
  893.    }
  894. if (nowrolling == 3)
  895.    {
  896.    YELLOWX=vis[0][nowrolling];
  897.    YELLOWY=vis[1][nowrolling];
  898.    }
  899. isinjail[nowrolling]=FALSE;
  900. WaitTOF();
  901. DrawGels();
  902. playerat[nowrolling]=10;
  903. fixmenu();
  904. expayfine:
  905. }
  906.  
  907. VOID trydoubles()
  908. {
  909. jaildouble[nowrolling]++;
  910. trieddoubles=TRUE;
  911. dice0=rolldie();
  912. dice1=rolldie();
  913. dicecup(TRUE);
  914. drawdice();
  915. if (dice0 == dice1)
  916.    {
  917.    jaildouble[nowrolling]=0;
  918.    jaildoubled=TRUE;
  919.    trieddoubles=FALSE;
  920.    if  (nowrolling == 0)
  921.       {
  922.       REDX=vis[0][nowrolling];
  923.       REDY=vis[1][nowrolling];
  924.       }
  925.    if  (nowrolling == 1)
  926.       {
  927.       GREENX=vis[0][nowrolling];
  928.       GREENY=vis[1][nowrolling];
  929.       }
  930.    if  (nowrolling == 2)
  931.       {
  932.       BLUEX=vis[0][nowrolling];
  933.       BLUEY=vis[1][nowrolling];
  934.       }
  935.    if  (nowrolling == 3)
  936.       {
  937.       YELLOWX=vis[0][nowrolling];
  938.       YELLOWY=vis[1][nowrolling];
  939.       }
  940.    isinjail[nowrolling]=FALSE;
  941.    WaitTOF();
  942.    DrawGels();
  943.    fixmenu();
  944.    playerat[nowrolling]=10;
  945.    }
  946. if (jaildouble[nowrolling] == 3)
  947.    {
  948.    payfine();
  949.    trydoublethrice=TRUE;
  950.    trieddoubles=FALSE;
  951.    jaildouble[nowrolling]=0;
  952.    }
  953. roll();
  954. }
  955.  
  956. VOID servicemenu(menu, item, sub)
  957. USHORT menu, item, sub;
  958. {
  959. USHORT test_filer;
  960.  
  961.     /*  set up a menu server here  */
  962.    if ((menu == 0) && (item == 0))  changecolors(); 
  963.    if ((menu == 0) && (item == 1))  newgame();
  964.    if ((menu == 0) && (item == 2))
  965.       {
  966.       test_filer=oldgame();
  967.       if (test_filer == GAME_RESTORED)
  968.       if (test_filer != GAME_RESTORED)
  969. printf("load error %d\n", test_filer);
  970.       }  
  971.    if ((menu == 0) && (item == 3))
  972.       {
  973.       test_filer=savegame();
  974.       if (test_filer == GAME_SAVED)
  975.       if (test_filer != GAME_SAVED)
  976. printf("save error %d\n", test_filer);
  977.       }
  978.    if ((menu == 0) && (item == 4))  endgame();
  979.    if ((menu == 1) && (item == 0))  buildhouse(sub);   /*   1  */ 
  980.    if ((menu == 1) && (item == 1))  sellhouse(sub);    /*  33  */
  981.    if ((menu == 1) && (item == 2))  makemortgage(sub); /*  65  */
  982.    if ((menu == 1) && (item == 3))  liftmortgage(sub); /*  97  */
  983.    if ((menu == 1) && (item == 4))  reviewprop();
  984.    if ((menu == 1) && (item == 5))  viewdeeds();
  985.    if ((menu == 2) && (item == 0))  offersell();
  986.    if ((menu == 2) && (item == 1))  offerbuy();
  987.    if ((menu == 2) && (item == 2))  moneybags(sub);
  988.    if ((menu == 3) && (item == 0))  roll();         /*   3  */
  989.    if ((menu == 3) && (item == 1))  usefreecard();  /*  35  */
  990.    if ((menu == 3) && (item == 2))  trydoubles();   /*  67  */
  991.    if ((menu == 3) && (item == 3))  payfine();      /*  99  */
  992. }
  993.  
  994. VOID servicepropmenu(menu, item, sub)
  995. USHORT menu, item, sub;
  996. {
  997. if ( (menu == 0) && (item == 0) )  buildhouse(sub);
  998. if ( (menu == 0) && (item == 1) )  sellhouse(sub);
  999. if ( (menu == 0) && (item == 2) )  makemortgage(sub);
  1000. if ( (menu == 0) && (item == 3) )  liftmortgage(sub);
  1001. if ( (menu == 0) && (item == 4) )  reviewprop();
  1002. if ( (menu == 0) && (item == 5) )  viewdeeds();
  1003. if ( (menu == 1) && (item == 0) )  (VOID)offersell();
  1004. if ( (menu == 1) && (item == 1) )  (VOID)offerbuy();
  1005. if ( (menu == 1) && (item == 2) )  moneybags(sub);
  1006. }
  1007.  
  1008. VOID ckpropinfomsg()
  1009. {
  1010. ULONG pclass;
  1011. USHORT pcode;
  1012. pclass=0;
  1013. pcode=0;
  1014.  
  1015. recheckpropm:
  1016. while (propinfomsg=(struct IntuiMessage *)GetMsg(propinfowindow->UserPort))
  1017.    {
  1018.    pclass = propinfomsg->Class;
  1019.    pcode  = propinfomsg->Code; 
  1020.    if (pclass == GADGETUP)  getID(propinfomsg);   
  1021.    ReplyMsg(propinfomsg);
  1022.    if ( (pclass == RAWKEY) && (pcode == HELP) ) instruction();
  1023.    if (pclass == GADGETUP)
  1024.       {
  1025.       buyfrombank=FALSE;
  1026.       if (gagid == 0)  donepropinfo=TRUE;
  1027.       if (gagid == 1)
  1028.          {
  1029.          buyfrombank=TRUE;
  1030.          donepropinfo=TRUE;
  1031.          }
  1032.       if (gagid == 2)
  1033.          {
  1034.      donepropinfo=TRUE;
  1035.      didntbuyfrombank=TRUE;
  1036.      }
  1037.       if (gagid == 29)
  1038.          {
  1039.      eft(nowrolling, SLUSH, 200);  /*  $200 income tax  */
  1040.      donepropinfo=TRUE;
  1041.      }
  1042.       if (gagid == 28)
  1043.          {
  1044.      tax();
  1045.      donepropinfo=TRUE;
  1046.      }
  1047.       }
  1048.    if ( (pclass == MENUPICK) && (pcode != MENUNULL) )
  1049.       {
  1050.       servicepropmenu(MENUNUM(pcode), ITEMNUM(pcode), SUBNUM(pcode));
  1051.       goto recheckpropm;
  1052.       }
  1053.    }
  1054. }
  1055.  
  1056. VOID fillattr()
  1057. {
  1058. USHORT iter;
  1059.  
  1060. jailvectorlocation22[0][0]=86;
  1061. jailvectorlocation22[1][0]=83;
  1062. jailvectorlocation22[2][0]=80;
  1063. jailvectorlocation22[3][0]=77;
  1064. jailvectorlocation22[4][0]=74;
  1065. jailvectorlocation22[5][0]=71;
  1066. jailvectorlocation22[6][0]=68;
  1067. jailvectorlocation22[7][0]=65;
  1068. jailvectorlocation22[8][0]=62;
  1069. jailvectorlocation22[9][0]=59;
  1070. jailvectorlocation22[10][0]=56;
  1071. jailvectorlocation22[11][0]=53;
  1072. jailvectorlocation22[12][0]=50;
  1073. jailvectorlocation22[13][0]=47;
  1074. jailvectorlocation22[14][0]=44;
  1075. jailvectorlocation22[15][0]=42;
  1076.    
  1077. jailvectorlocation22[0][1]=10;
  1078. jailvectorlocation22[1][1]=20;
  1079. jailvectorlocation22[2][1]=32;
  1080. jailvectorlocation22[3][1]=43;
  1081. jailvectorlocation22[4][1]=55;
  1082. jailvectorlocation22[5][1]=66;
  1083. jailvectorlocation22[6][1]=78;
  1084. jailvectorlocation22[7][1]=89;
  1085. jailvectorlocation22[8][1]=101;
  1086. jailvectorlocation22[9][1]=112;
  1087. jailvectorlocation22[10][1]=124;
  1088. jailvectorlocation22[11][1]=135;
  1089. jailvectorlocation22[12][1]=147;
  1090. jailvectorlocation22[13][1]=158;
  1091. jailvectorlocation22[14][1]=170;
  1092. jailvectorlocation22[15][1]=178;
  1093.  
  1094. jailvectorlocation30[0][1]=10;
  1095. jailvectorlocation30[1][1]=15;
  1096. jailvectorlocation30[2][1]=20;
  1097. jailvectorlocation30[3][1]=25;
  1098. jailvectorlocation30[4][1]=30;
  1099. jailvectorlocation30[5][1]=35;
  1100. jailvectorlocation30[6][1]=40;
  1101. jailvectorlocation30[7][1]=45;
  1102. jailvectorlocation30[8][1]=50;
  1103. jailvectorlocation30[9][1]=55;
  1104. jailvectorlocation30[10][1]=60;
  1105. jailvectorlocation30[11][1]=65;
  1106. jailvectorlocation30[12][1]=70;
  1107. jailvectorlocation30[13][1]=75;
  1108. jailvectorlocation30[14][1]=80;
  1109. jailvectorlocation30[15][1]=85;
  1110. jailvectorlocation30[16][1]=90;
  1111. jailvectorlocation30[17][1]=95;
  1112. jailvectorlocation30[18][1]=100;
  1113. jailvectorlocation30[19][1]=105;
  1114. jailvectorlocation30[20][1]=110;
  1115. jailvectorlocation30[21][1]=115;
  1116. jailvectorlocation30[22][1]=120;
  1117. jailvectorlocation30[23][1]=125;
  1118. jailvectorlocation30[24][1]=130;
  1119. jailvectorlocation30[25][1]=135;
  1120. jailvectorlocation30[26][1]=140;
  1121. jailvectorlocation30[27][1]=145;
  1122. jailvectorlocation30[28][1]=150;
  1123. jailvectorlocation30[29][1]=155;
  1124. jailvectorlocation30[30][1]=160;
  1125. jailvectorlocation30[31][1]=165;
  1126. jailvectorlocation30[32][1]=170;
  1127. jailvectorlocation30[33][1]=175;
  1128. jailvectorlocation30[34][1]=179;
  1129.  
  1130. jailvectorlocation30[0][0]=273;
  1131. jailvectorlocation30[1][0]=266;
  1132. jailvectorlocation30[2][0]=259;
  1133. jailvectorlocation30[3][0]=252;
  1134. jailvectorlocation30[4][0]=245;
  1135. jailvectorlocation30[5][0]=239;
  1136. jailvectorlocation30[6][0]=232;
  1137. jailvectorlocation30[7][0]=225;
  1138. jailvectorlocation30[8][0]=218;
  1139. jailvectorlocation30[9][0]=211;
  1140. jailvectorlocation30[10][0]=204;
  1141. jailvectorlocation30[11][0]=198;
  1142. jailvectorlocation30[12][0]=191;
  1143. jailvectorlocation30[13][0]=184;
  1144. jailvectorlocation30[14][0]=177;
  1145. jailvectorlocation30[15][0]=170;
  1146. jailvectorlocation30[16][0]=163;
  1147. jailvectorlocation30[17][0]=157;
  1148. jailvectorlocation30[18][0]=150;
  1149. jailvectorlocation30[19][0]=143;
  1150. jailvectorlocation30[20][0]=136;
  1151. jailvectorlocation30[21][0]=129;
  1152. jailvectorlocation30[22][0]=122;
  1153. jailvectorlocation30[23][0]=116;
  1154. jailvectorlocation30[24][0]=109;
  1155. jailvectorlocation30[25][0]=102;
  1156. jailvectorlocation30[26][0]=95;
  1157. jailvectorlocation30[27][0]=88;
  1158. jailvectorlocation30[28][0]=81;
  1159. jailvectorlocation30[29][0]=75;
  1160. jailvectorlocation30[30][0]=68;
  1161. jailvectorlocation30[31][0]=61;
  1162. jailvectorlocation30[32][0]=54;
  1163. jailvectorlocation30[33][0]=47;
  1164. jailvectorlocation30[34][0]=42;
  1165.  
  1166. jailvectorlocation33[0][1]=62;
  1167. jailvectorlocation33[1][1]=66;
  1168. jailvectorlocation33[2][1]=70;
  1169. jailvectorlocation33[3][1]=74;
  1170. jailvectorlocation33[4][1]=78;
  1171. jailvectorlocation33[5][1]=82;
  1172. jailvectorlocation33[6][1]=86;
  1173. jailvectorlocation33[7][1]=90;
  1174. jailvectorlocation33[8][1]=94;
  1175. jailvectorlocation33[9][1]=98;
  1176. jailvectorlocation33[10][1]=102;
  1177. jailvectorlocation33[11][1]=106;
  1178. jailvectorlocation33[12][1]=110;
  1179. jailvectorlocation33[13][1]=114;
  1180. jailvectorlocation33[14][1]=118;
  1181. jailvectorlocation33[15][1]=122;
  1182. jailvectorlocation33[16][1]=126;
  1183. jailvectorlocation33[17][1]=130;
  1184. jailvectorlocation33[18][1]=134;
  1185. jailvectorlocation33[19][1]=138;
  1186. jailvectorlocation33[20][1]=142;
  1187. jailvectorlocation33[21][1]=146;
  1188. jailvectorlocation33[22][1]=150;
  1189. jailvectorlocation33[23][1]=154;
  1190. jailvectorlocation33[24][1]=158;
  1191. jailvectorlocation33[25][1]=162;
  1192. jailvectorlocation33[26][1]=166;
  1193. jailvectorlocation33[27][1]=170;
  1194. jailvectorlocation33[28][1]=174;
  1195. jailvectorlocation33[29][1]=178;
  1196. jailvectorlocation33[30][1]=179;
  1197.  
  1198. jailvectorlocation33[0][0]=273;
  1199. jailvectorlocation33[1][0]=265;
  1200. jailvectorlocation33[2][0]=257;
  1201. jailvectorlocation33[3][0]=249;
  1202. jailvectorlocation33[4][0]=241;
  1203. jailvectorlocation33[5][0]=233;
  1204. jailvectorlocation33[6][0]=225;
  1205. jailvectorlocation33[7][0]=217;
  1206. jailvectorlocation33[8][0]=209;
  1207. jailvectorlocation33[9][0]=201;
  1208. jailvectorlocation33[10][0]=194;
  1209. jailvectorlocation33[11][0]=186;
  1210. jailvectorlocation33[12][0]=178;
  1211. jailvectorlocation33[13][0]=170;
  1212. jailvectorlocation33[14][0]=162;
  1213. jailvectorlocation33[15][0]=154;
  1214. jailvectorlocation33[16][0]=146;
  1215. jailvectorlocation33[17][0]=138;
  1216. jailvectorlocation33[18][0]=130;
  1217. jailvectorlocation33[19][0]=122;
  1218. jailvectorlocation33[20][0]=115;
  1219. jailvectorlocation33[21][0]=107;
  1220. jailvectorlocation33[22][0]=99;
  1221. jailvectorlocation33[23][0]=91;
  1222. jailvectorlocation33[24][0]=83;
  1223. jailvectorlocation33[25][0]=75;
  1224. jailvectorlocation33[26][0]=67;
  1225. jailvectorlocation33[27][0]=59;
  1226. jailvectorlocation33[28][0]=51;
  1227. jailvectorlocation33[29][0]=43;
  1228. jailvectorlocation33[30][0]=42;
  1229.  
  1230. jailvectorlocation36[0][1]=117;
  1231. jailvectorlocation36[1][1]=120;
  1232. jailvectorlocation36[2][1]=123;
  1233. jailvectorlocation36[3][1]=126;
  1234. jailvectorlocation36[4][1]=129;
  1235. jailvectorlocation36[5][1]=132;
  1236. jailvectorlocation36[6][1]=135;
  1237. jailvectorlocation36[7][1]=138;
  1238. jailvectorlocation36[8][1]=141;
  1239. jailvectorlocation36[9][1]=144;
  1240. jailvectorlocation36[10][1]=147;
  1241. jailvectorlocation36[11][1]=150;
  1242. jailvectorlocation36[12][1]=153;
  1243. jailvectorlocation36[13][1]=156;
  1244. jailvectorlocation36[14][1]=159;
  1245. jailvectorlocation36[15][1]=162;
  1246. jailvectorlocation36[16][1]=165;
  1247. jailvectorlocation36[17][1]=168;
  1248. jailvectorlocation36[18][1]=171;
  1249. jailvectorlocation36[19][1]=174;
  1250. jailvectorlocation36[20][1]=177;
  1251. jailvectorlocation36[21][1]=179;
  1252.  
  1253. jailvectorlocation36[0][0]=273;
  1254. jailvectorlocation36[1][0]=260;
  1255. jailvectorlocation36[2][0]=249;
  1256. jailvectorlocation36[3][0]=238;
  1257. jailvectorlocation36[4][0]=227;
  1258. jailvectorlocation36[5][0]=216;
  1259. jailvectorlocation36[6][0]=205;
  1260. jailvectorlocation36[7][0]=193;
  1261. jailvectorlocation36[8][0]=182;
  1262. jailvectorlocation36[9][0]=171;
  1263. jailvectorlocation36[10][0]=160;
  1264. jailvectorlocation36[11][0]=149;
  1265. jailvectorlocation36[12][0]=138;
  1266. jailvectorlocation36[13][0]=126;
  1267. jailvectorlocation36[14][0]=115;
  1268. jailvectorlocation36[15][0]=104;
  1269. jailvectorlocation36[16][0]=93;
  1270. jailvectorlocation36[17][0]=82;
  1271. jailvectorlocation36[18][0]=70;
  1272. jailvectorlocation36[19][0]=59;
  1273. jailvectorlocation36[20][0]=48;
  1274. jailvectorlocation36[21][0]=41;
  1275.  
  1276. for  (iter=0; iter<40; iter++)
  1277.    {
  1278.    owner[iter]=9;
  1279.    propcost[iter]=0;
  1280.    numhouses[iter]=0;
  1281.    rentnone[iter]=0;
  1282.    rentone[iter]=0;
  1283.    renttwo[iter]=0;
  1284.    rentthree[iter]=0;
  1285.    rentfour[iter]=0;
  1286.    renthotel[iter]=0;
  1287.    housecost[iter]=0;
  1288.    ismono[iter]=FALSE;
  1289.    ismorg[iter]=FALSE;
  1290.    isutil[iter]=FALSE;
  1291.    isrr[iter]=FALSE;
  1292.    }
  1293. for  (iter=0; iter<4; iter++)
  1294.    {
  1295.    numutil[iter]=0;
  1296.    numrr[iter]=0;
  1297.    }
  1298.  
  1299. isrr[5]=TRUE;
  1300. isrr[15]=TRUE;
  1301. isrr[25]=TRUE;
  1302. isrr[35]=TRUE;   
  1303. propcost[5]=200;
  1304. propcost[15]=200;
  1305. propcost[25]=200;
  1306. propcost[35]=200;
  1307.  
  1308. isutil[12]=TRUE;
  1309. isutil[28]=TRUE;
  1310. propcost[12]=150;
  1311. propcost[28]=150;
  1312.  
  1313.  
  1314. propcost[1]=60;
  1315. housecost[1]=50;
  1316. rentnone[1]=2;
  1317. rentone[1]=10;
  1318. renttwo[1]=30;
  1319. rentthree[1]=90;
  1320. rentfour[1]=160;
  1321. renthotel[1]=250;
  1322.  
  1323. propcost[3]=60;
  1324. housecost[3]=50;
  1325. rentnone[3]=4;
  1326. rentone[3]=20;
  1327. renttwo[3]=60;
  1328. rentthree[3]=180;
  1329. rentfour[3]=320;
  1330. renthotel[3]=450;
  1331.  
  1332.  
  1333. propcost[6]=100;
  1334. housecost[6]=50;
  1335. rentnone[6]=6;
  1336. rentone[6]=30;
  1337. renttwo[6]=90;
  1338. rentthree[6]=270;
  1339. rentfour[6]=400;
  1340. renthotel[6]=550;
  1341.  
  1342.  
  1343. propcost[8]=100;
  1344. housecost[8]=50;
  1345. rentnone[8]=6;
  1346. rentone[8]=30;
  1347. renttwo[8]=90;
  1348. rentthree[8]=270;
  1349. rentfour[8]=400;
  1350. renthotel[8]=550;
  1351.  
  1352.  
  1353. propcost[9]=120;
  1354. housecost[9]=50;
  1355. rentnone[9]=8;
  1356. rentone[9]=40;
  1357. renttwo[9]=100;
  1358. rentthree[9]=300;
  1359. rentfour[9]=450;
  1360. renthotel[9]=600;
  1361.  
  1362.  
  1363. propcost[11]=140;
  1364. housecost[11]=100;
  1365. rentnone[11]=10;
  1366. rentone[11]=50;
  1367. renttwo[11]=150;
  1368. rentthree[11]=450;
  1369. rentfour[11]=625;
  1370. renthotel[11]=750;
  1371.  
  1372.  
  1373. propcost[13]=140;
  1374. housecost[13]=100;
  1375. rentnone[13]=10;
  1376. rentone[13]=50;
  1377. renttwo[13]=150;
  1378. rentthree[13]=450;
  1379. rentfour[13]=625;
  1380. renthotel[13]=750;
  1381.  
  1382.  
  1383. propcost[14]=160;
  1384. housecost[14]=100;
  1385. rentnone[14]=12;
  1386. rentone[14]=60;
  1387. renttwo[14]=180;
  1388. rentthree[14]=500;
  1389. rentfour[14]=700;
  1390. renthotel[14]=900;
  1391.  
  1392.  
  1393. propcost[16]=180;
  1394. housecost[16]=100;
  1395. rentnone[16]=14;
  1396. rentone[16]=70;
  1397. renttwo[16]=200;
  1398. rentthree[16]=550;
  1399. rentfour[16]=750;
  1400. renthotel[16]=950;
  1401.  
  1402.  
  1403. propcost[18]=180;
  1404. housecost[18]=100;
  1405. rentnone[18]=14;
  1406. rentone[18]=70;
  1407. renttwo[18]=200;
  1408. rentthree[18]=550;
  1409. rentfour[18]=750;
  1410. renthotel[18]=950;
  1411.  
  1412.  
  1413. propcost[19]=200;
  1414. housecost[19]=100;
  1415. rentnone[19]=16;
  1416. rentone[19]=80;
  1417. renttwo[19]=220;
  1418. rentthree[19]=600;
  1419. rentfour[19]=800;
  1420. renthotel[19]=1000;
  1421.  
  1422.  
  1423. propcost[21]=220;
  1424. housecost[21]=150;
  1425. rentnone[21]=18;
  1426. rentone[21]=90;
  1427. renttwo[21]=250;
  1428. rentthree[21]=700;
  1429. rentfour[21]=875;
  1430. renthotel[21]=1050;
  1431.  
  1432.  
  1433. propcost[23]=220;
  1434. housecost[23]=150;
  1435. rentnone[23]=18;
  1436. rentone[23]=90;
  1437. renttwo[23]=250;
  1438. rentthree[23]=700;
  1439. rentfour[23]=875;
  1440. renthotel[23]=1050;
  1441.  
  1442.  
  1443. propcost[24]=240;
  1444. housecost[24]=150;
  1445. rentnone[24]=20;
  1446. rentone[24]=100;
  1447. renttwo[24]=300;
  1448. rentthree[24]=750;
  1449. rentfour[24]=925;
  1450. renthotel[24]=1100;
  1451.  
  1452.  
  1453. propcost[26]=260;
  1454. housecost[26]=150;
  1455. rentnone[26]=22;
  1456. rentone[26]=110;
  1457. renttwo[26]=330;
  1458. rentthree[26]=800;
  1459. rentfour[26]=975;
  1460. renthotel[26]=1150;
  1461.  
  1462.  
  1463. propcost[27]=260;
  1464. housecost[27]=150;
  1465. rentnone[27]=22;
  1466. rentone[27]=110;
  1467. renttwo[27]=330;
  1468. rentthree[27]=800;
  1469. rentfour[27]=975;
  1470. renthotel[27]=1150;
  1471.  
  1472.  
  1473. propcost[29]=280;
  1474. housecost[29]=150;
  1475. rentnone[29]=24;
  1476. rentone[29]=120;
  1477. renttwo[29]=360;
  1478. rentthree[29]=850;
  1479. rentfour[29]=1025;
  1480. renthotel[29]=1200;
  1481.  
  1482.  
  1483. propcost[31]=300;
  1484. housecost[31]=200;
  1485. rentnone[31]=26;
  1486. rentone[31]=130;
  1487. renttwo[31]=390;
  1488. rentthree[31]=900;
  1489. rentfour[31]=1100;
  1490. renthotel[31]=1275;
  1491.  
  1492.  
  1493. propcost[32]=300;
  1494. housecost[32]=200;
  1495. rentnone[32]=26;
  1496. rentone[32]=130;
  1497. renttwo[32]=390;
  1498. rentthree[32]=900;
  1499. rentfour[32]=1100;
  1500. renthotel[32]=1275;
  1501.  
  1502.  
  1503. propcost[34]=320;
  1504. housecost[34]=200;
  1505. rentnone[34]=28;
  1506. rentone[34]=150;
  1507. renttwo[34]=450;
  1508. rentthree[34]=1000;
  1509. rentfour[34]=1200;
  1510. renthotel[34]=1400;
  1511.  
  1512.  
  1513. propcost[37]=350;
  1514. housecost[37]=200;
  1515. rentnone[37]=28;
  1516. rentone[37]=150;
  1517. renttwo[37]=450;
  1518. rentthree[37]=1000;
  1519. rentfour[37]=1200;
  1520. renthotel[37]=1400;
  1521.  
  1522.  
  1523. propcost[39]=400;
  1524. housecost[39]=200;
  1525. rentnone[39]=50;
  1526. rentone[39]=200;
  1527. renttwo[39]=600;
  1528. rentthree[39]=1400;
  1529. rentfour[39]=1700;
  1530. renthotel[39]=2000;
  1531.  
  1532. owner[0]=8;
  1533. owner[2]=8;
  1534. owner[4]=8;
  1535. owner[7]=8;
  1536. owner[10]=8;
  1537. owner[17]=8;
  1538. owner[20]=8;
  1539. owner[22]=8;
  1540. owner[30]=8;
  1541. owner[33]=8;
  1542. owner[36]=8;
  1543. owner[38]=8;
  1544. }
  1545.  
  1546.  
  1547.  
  1548.