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 / f5.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-06  |  44.7 KB  |  1,920 lines

  1. /*  f5.c contains these monopoly functions  
  2.          reviewprop(),
  3.      transfertitle,  eft,  ran16,  shuffle,  getchancecard
  4.          getchestcard(),  counthouses,  counthotels,  
  5.      rolldie(one),  rolldice(both),  roll(),  writeyourturn()   */ 
  6.  
  7. #include "mono:defines"
  8. #include "mono:xvariables"
  9.  
  10. VOID reviewprop()
  11. {
  12. struct IntuiMessage  *reviewpropmsg;
  13. struct Window   *reviewpropwindow;
  14. struct RastPort *rportreviewprop;
  15. ULONG rpclass;
  16. USHORT rpcode, hold_line;
  17. struct IntuiText reviewhouse, reviewmorg, reviewowner,
  18.                  reviewprop0, reviewprop1, reviewprop2, reviewprop3, 
  19.                  reviewprop4, reviewprop5, reviewprop6, reviewprop7, 
  20.                  reviewprop8, reviewprop9, reviewprop10, reviewprop11, 
  21.                  reviewprop12, reviewprop13, reviewprop14, reviewprop15, 
  22.                  reviewprop16, reviewprop17, reviewprop18, reviewprop19, 
  23.                  reviewprop20, reviewprop21, reviewprop22, reviewprop23, 
  24.                  reviewprop24, reviewprop25, reviewprop26, reviewprop27;
  25. rpclass=0;
  26. rpcode=0;
  27.  
  28.  
  29. reviewhouse.TopEdge=0;
  30. reviewhouse.FrontPen=8;
  31. reviewhouse.BackPen=0;
  32. reviewhouse.DrawMode=JAM1;
  33. reviewhouse.LeftEdge=133;
  34. reviewhouse.IText=NULL;
  35. reviewhouse.ITextFont=NULL;
  36. reviewhouse.NextText=&reviewmorg;
  37.  
  38. reviewmorg.TopEdge=0;
  39. reviewmorg.FrontPen=8;
  40. reviewmorg.BackPen=0;
  41. reviewmorg.DrawMode=JAM1;
  42. reviewmorg.LeftEdge=196;
  43. reviewmorg.IText=NULL;
  44. reviewmorg.ITextFont=NULL;
  45. reviewmorg.NextText=&reviewowner;
  46.  
  47. reviewowner.TopEdge=0;
  48. reviewowner.BackPen=0;
  49. reviewowner.DrawMode=JAM1;
  50. reviewowner.LeftEdge=252;
  51. reviewowner.IText=NULL;
  52. reviewowner.ITextFont=NULL;
  53. reviewowner.NextText=NULL;
  54.  
  55. reviewprop0.TopEdge=0;
  56. reviewprop0.FrontPen=8;
  57. reviewprop0.BackPen=0;
  58. reviewprop0.DrawMode=JAM1;
  59. reviewprop0.LeftEdge=5;
  60. reviewprop0.IText=NULL;
  61. reviewprop0.ITextFont=NULL;
  62. reviewprop0.NextText=NULL;
  63.  
  64. reviewprop1=reviewprop0;
  65. reviewprop2=reviewprop1;
  66. reviewprop3=reviewprop2;
  67. reviewprop4=reviewprop3;
  68. reviewprop5=reviewprop4;
  69. reviewprop6=reviewprop5;
  70. reviewprop7=reviewprop6;
  71. reviewprop8=reviewprop7;
  72. reviewprop9=reviewprop8;
  73. reviewprop10=reviewprop9;
  74. reviewprop11=reviewprop10;
  75. reviewprop12=reviewprop11;
  76. reviewprop13=reviewprop12;
  77. reviewprop14=reviewprop13;
  78. reviewprop15=reviewprop14;
  79. reviewprop16=reviewprop15;
  80. reviewprop17=reviewprop16;
  81. reviewprop18=reviewprop17;
  82. reviewprop19=reviewprop18;
  83. reviewprop20=reviewprop19;
  84. reviewprop21=reviewprop20;
  85. reviewprop22=reviewprop21;
  86. reviewprop23=reviewprop22;
  87. reviewprop24=reviewprop23;
  88. reviewprop25=reviewprop24;
  89. reviewprop26=reviewprop25;
  90. reviewprop27=reviewprop26;
  91.  
  92.  
  93.  
  94.  
  95. reviewprop0.NextText=&reviewprop1;
  96. reviewprop1.NextText=&reviewprop2;
  97. reviewprop2.NextText=&reviewprop3;
  98. reviewprop3.NextText=&reviewprop4;
  99. reviewprop4.NextText=&reviewprop5;
  100. reviewprop5.NextText=&reviewprop6;
  101. reviewprop6.NextText=&reviewprop7;
  102. reviewprop7.NextText=&reviewprop8;
  103. reviewprop8.NextText=&reviewprop9;
  104. reviewprop9.NextText=&reviewprop10;
  105. reviewprop10.NextText=&reviewprop11;
  106. reviewprop11.NextText=&reviewprop12;
  107. reviewprop12.NextText=&reviewprop13;
  108. reviewprop13.NextText=NULL;
  109. reviewprop14.NextText=&reviewprop15;
  110. reviewprop15.NextText=&reviewprop16;
  111. reviewprop16.NextText=&reviewprop17;
  112. reviewprop17.NextText=&reviewprop18;
  113. reviewprop18.NextText=&reviewprop19;
  114. reviewprop19.NextText=&reviewprop20;
  115. reviewprop20.NextText=&reviewprop21;
  116. reviewprop21.NextText=&reviewprop22;
  117. reviewprop22.NextText=&reviewprop23;
  118. reviewprop23.NextText=&reviewprop24;
  119. reviewprop24.NextText=&reviewprop25;
  120. reviewprop25.NextText=&reviewprop26;
  121. reviewprop26.NextText=&reviewprop27;
  122. reviewprop27.NextText=NULL;
  123.  
  124. reviewprop0.TopEdge=15;
  125. reviewprop1.TopEdge=27;
  126. reviewprop2.TopEdge=39;
  127. reviewprop3.TopEdge=51;
  128. reviewprop4.TopEdge=63;
  129. reviewprop5.TopEdge=75;
  130. reviewprop6.TopEdge=87;
  131. reviewprop7.TopEdge=99;
  132. reviewprop8.TopEdge=111;
  133. reviewprop9.TopEdge=123;
  134. reviewprop10.TopEdge=135;
  135. reviewprop11.TopEdge=147;
  136. reviewprop12.TopEdge=159;
  137. reviewprop13.TopEdge=171;
  138.  
  139. reviewprop14.TopEdge=15;
  140. reviewprop15.TopEdge=27;
  141. reviewprop16.TopEdge=39;
  142. reviewprop17.TopEdge=51;
  143. reviewprop18.TopEdge=63;
  144. reviewprop19.TopEdge=75;
  145. reviewprop20.TopEdge=87;
  146. reviewprop21.TopEdge=99;
  147. reviewprop22.TopEdge=111;
  148. reviewprop23.TopEdge=123;
  149. reviewprop24.TopEdge=135;
  150. reviewprop25.TopEdge=147;
  151. reviewprop26.TopEdge=159;
  152. reviewprop27.TopEdge=171;
  153.  
  154. reviewprop0.IText=(UBYTE *)"MEDITERRANEAN";
  155. reviewprop1.IText=(UBYTE *)"BALTIC";
  156. reviewprop2.IText=(UBYTE *)"READING RR";
  157. reviewprop3.IText=(UBYTE *)"ORIENTAL";
  158. reviewprop4.IText=(UBYTE *)"VERMONT";
  159. reviewprop5.IText=(UBYTE *)"CONNECTICUT";
  160. reviewprop6.IText=(UBYTE *)"ST. CHARLES";
  161. reviewprop7.IText=(UBYTE *)"ELECTRIC CO.";
  162. reviewprop8.IText=(UBYTE *)"STATES";
  163. reviewprop9.IText=(UBYTE *)"VIRGINIA";
  164. reviewprop10.IText=(UBYTE *)"PENNSYLVANIA";
  165. reviewprop11.IText=(UBYTE *)"ST. JAMES";
  166. reviewprop12.IText=(UBYTE *)"TENNESSEE";
  167. reviewprop13.IText=(UBYTE *)"NEW YORK";
  168.  
  169. reviewprop14.IText=(UBYTE *)"KENTUCKY";
  170. reviewprop15.IText=(UBYTE *)"INDIANA";
  171. reviewprop16.IText=(UBYTE *)"ILLINOIS";
  172. reviewprop17.IText=(UBYTE *)"B. & O. RR";
  173. reviewprop18.IText=(UBYTE *)"ATLANTIC";
  174. reviewprop19.IText=(UBYTE *)"VENTNOR";
  175. reviewprop20.IText=(UBYTE *)"WATER WORKS";
  176. reviewprop21.IText=(UBYTE *)"MARVIN GARDENS";
  177. reviewprop22.IText=(UBYTE *)"PACIFIC";
  178. reviewprop23.IText=(UBYTE *)"NORTH CAROLINA";
  179. reviewprop24.IText=(UBYTE *)"PENNSYLVANIA";
  180. reviewprop25.IText=(UBYTE *)"SHORT LINE";
  181. reviewprop26.IText=(UBYTE *)"PARK PLACE";
  182. reviewprop27.IText=(UBYTE *)"BOARDWALK";
  183.  
  184. reviewprop0.FrontPen=purple;
  185. reviewprop1.FrontPen=purple;
  186. reviewprop2.FrontPen=lt_gray;
  187. reviewprop3.FrontPen=lt_blue;
  188. reviewprop4.FrontPen=lt_blue;
  189. reviewprop5.FrontPen=lt_blue;
  190. reviewprop6.FrontPen=maroon;
  191. reviewprop7.FrontPen=dk_gray;
  192. reviewprop8.FrontPen=maroon;
  193. reviewprop9.FrontPen=maroon;
  194. reviewprop10.FrontPen=lt_gray;
  195. reviewprop11.FrontPen=orange;
  196. reviewprop12.FrontPen=orange;
  197. reviewprop13.FrontPen=orange;
  198.  
  199. reviewprop14.FrontPen=red;
  200. reviewprop15.FrontPen=red;
  201. reviewprop16.FrontPen=red;
  202. reviewprop17.FrontPen=lt_gray;
  203. reviewprop18.FrontPen=yellow;
  204. reviewprop19.FrontPen=yellow;
  205. reviewprop20.FrontPen=royal_blue;
  206. reviewprop21.FrontPen=yellow;
  207. reviewprop22.FrontPen=green;
  208. reviewprop23.FrontPen=green;
  209. reviewprop24.FrontPen=green;
  210. reviewprop25.FrontPen=lt_gray;
  211. reviewprop26.FrontPen=dk_blue;
  212. reviewprop27.FrontPen=dk_blue;
  213.  
  214.  
  215. pageone:
  216. nreviewpropw.Screen=screen1;
  217. if ((reviewpropwindow=(struct Window *)OpenWindow(&nreviewpropw))==NULL)
  218.    cleanexit("Can't open reviewprop window.\n");
  219. rportreviewprop=reviewpropwindow->RPort;
  220.  
  221. PrintIText(rportreviewprop, &reviewprop0, 0, 0);
  222.  
  223. reviewhouse.LeftEdge=133;
  224. reviewhouse.TopEdge=15;
  225. reviewmorg.TopEdge=15;
  226. reviewowner.TopEdge=15;
  227. reviewhouse.FrontPen=purple;
  228. reviewmorg.FrontPen=purple;
  229. if (numhouses[1] == 0)   reviewhouse.IText=(UBYTE *)"0";
  230. if (numhouses[1] == 1)   reviewhouse.IText=(UBYTE *)"1";
  231. if (numhouses[1] == 2)   reviewhouse.IText=(UBYTE *)"2";
  232. if (numhouses[1] == 3)   reviewhouse.IText=(UBYTE *)"3";
  233. if (numhouses[1] == 4)   reviewhouse.IText=(UBYTE *)"4";
  234. if (numhouses[1] == 5)
  235.    {
  236.    reviewhouse.IText=(UBYTE *)"HOTEL";
  237.    reviewhouse.LeftEdge=117;
  238.    }
  239. if (ismorg[1])  reviewmorg.IText=(UBYTE *)"YES";
  240. else  reviewmorg.IText=(UBYTE *)" ";
  241. if (owner[1] == 9)
  242.    {
  243.    reviewowner.FrontPen=white;
  244.    reviewowner.IText=(UBYTE *)"BANK";
  245.    }
  246. if (owner[1] == 0)
  247.    {
  248.    reviewowner.FrontPen=25;
  249.    reviewowner.IText=&name0[0];
  250.    }
  251. if (owner[1] == 1)
  252.    {
  253.    reviewowner.FrontPen=26;
  254.    reviewowner.IText=&name1[0];
  255.    }
  256. if (owner[1] == 2)
  257.    {
  258.    reviewowner.FrontPen=27;
  259.    reviewowner.IText=&name2[0];
  260.    }
  261. if (owner[1] == 3)
  262.    {
  263.    reviewowner.FrontPen=28;
  264.    reviewowner.IText=&name3[0];
  265.    }
  266. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  267.  
  268. reviewhouse.LeftEdge=133;
  269. reviewhouse.TopEdge=27;
  270. reviewmorg.TopEdge=27;
  271. reviewowner.TopEdge=27;
  272. reviewhouse.FrontPen=purple;
  273. reviewmorg.FrontPen=purple;
  274. if (numhouses[3] == 0)   reviewhouse.IText=(UBYTE *)"0";
  275. if (numhouses[3] == 1)   reviewhouse.IText=(UBYTE *)"1";
  276. if (numhouses[3] == 2)   reviewhouse.IText=(UBYTE *)"2";
  277. if (numhouses[3] == 3)   reviewhouse.IText=(UBYTE *)"3";
  278. if (numhouses[3] == 4)   reviewhouse.IText=(UBYTE *)"4";
  279. if (numhouses[3] == 5)
  280.    {
  281.    reviewhouse.IText=(UBYTE *)"HOTEL";
  282.    reviewhouse.LeftEdge=117;
  283.    }
  284. if (ismorg[3])  reviewmorg.IText=(UBYTE *)"YES";
  285. else  reviewmorg.IText=(UBYTE *)" ";
  286. if (owner[3] == 9)
  287.    {
  288.    reviewowner.FrontPen=white;
  289.    reviewowner.IText=(UBYTE *)"BANK";
  290.    }
  291. if (owner[3] == 0)
  292.    {
  293.    reviewowner.FrontPen=25;
  294.    reviewowner.IText=&name0[0];
  295.    }
  296. if (owner[3] == 1)
  297.    {
  298.    reviewowner.FrontPen=26;
  299.    reviewowner.IText=&name1[0];
  300.    }
  301. if (owner[3] == 2)
  302.    {
  303.    reviewowner.FrontPen=27;
  304.    reviewowner.IText=&name2[0];
  305.    }
  306. if (owner[3] == 3)
  307.    {
  308.    reviewowner.FrontPen=28;
  309.    reviewowner.IText=&name3[0];
  310.    }
  311. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  312.  
  313. reviewhouse.LeftEdge=133;
  314. reviewhouse.TopEdge=39;
  315. reviewmorg.TopEdge=39;
  316. reviewowner.TopEdge=39;
  317. reviewhouse.FrontPen=lt_gray;
  318. reviewmorg.FrontPen=lt_gray;
  319. reviewhouse.IText=(UBYTE *)"n/a";
  320. reviewhouse.LeftEdge=125;
  321. if (ismorg[5])  reviewmorg.IText=(UBYTE *)"YES";
  322. else  reviewmorg.IText=(UBYTE *)" ";
  323. if (owner[5] == 9)
  324.    {
  325.    reviewowner.FrontPen=white;
  326.    reviewowner.IText=(UBYTE *)"BANK";
  327.    }
  328. if (owner[5] == 0)
  329.    {
  330.    reviewowner.FrontPen=25;
  331.    reviewowner.IText=&name0[0];
  332.    }
  333. if (owner[5] == 1)
  334.    {
  335.    reviewowner.FrontPen=26;
  336.    reviewowner.IText=&name1[0];
  337.    }
  338. if (owner[5] == 2)
  339.    {
  340.    reviewowner.FrontPen=27;
  341.    reviewowner.IText=&name2[0];
  342.    }
  343. if (owner[5] == 3)
  344.    {
  345.    reviewowner.FrontPen=28;
  346.    reviewowner.IText=&name3[0];
  347.    }
  348. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  349.  
  350. reviewhouse.LeftEdge=133;
  351. reviewhouse.TopEdge=51;
  352. reviewmorg.TopEdge=51;
  353. reviewowner.TopEdge=51;
  354. reviewhouse.FrontPen=lt_blue;
  355. reviewmorg.FrontPen=lt_blue;
  356. if (numhouses[6] == 0)   reviewhouse.IText=(UBYTE *)"0";
  357. if (numhouses[6] == 1)   reviewhouse.IText=(UBYTE *)"1";
  358. if (numhouses[6] == 2)   reviewhouse.IText=(UBYTE *)"2";
  359. if (numhouses[6] == 3)   reviewhouse.IText=(UBYTE *)"3";
  360. if (numhouses[6] == 4)   reviewhouse.IText=(UBYTE *)"4";
  361. if (numhouses[6] == 5)
  362.    {
  363.    reviewhouse.IText=(UBYTE *)"HOTEL";
  364.    reviewhouse.LeftEdge=117;
  365.    }
  366. if (ismorg[6])  reviewmorg.IText=(UBYTE *)"YES";
  367. else  reviewmorg.IText=(UBYTE *)" ";
  368. if (owner[6] == 9)
  369.    {
  370.    reviewowner.FrontPen=white;
  371.    reviewowner.IText=(UBYTE *)"BANK";
  372.    }
  373. if (owner[6] == 0)
  374.    {
  375.    reviewowner.FrontPen=25;
  376.    reviewowner.IText=&name0[0];
  377.    }
  378. if (owner[6] == 1)
  379.    {
  380.    reviewowner.FrontPen=26;
  381.    reviewowner.IText=&name1[0];
  382.    }
  383. if (owner[6] == 2)
  384.    {
  385.    reviewowner.FrontPen=27;
  386.    reviewowner.IText=&name2[0];
  387.    }
  388. if (owner[6] == 3)
  389.    {
  390.    reviewowner.FrontPen=28;
  391.    reviewowner.IText=&name3[0];
  392.    }
  393. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  394.  
  395. reviewhouse.LeftEdge=133;
  396. reviewhouse.TopEdge=63;
  397. reviewmorg.TopEdge=63;
  398. reviewowner.TopEdge=63;
  399. reviewhouse.FrontPen=lt_blue;
  400. reviewmorg.FrontPen=lt_blue;
  401. if (numhouses[8] == 0)   reviewhouse.IText=(UBYTE *)"0";
  402. if (numhouses[8] == 1)   reviewhouse.IText=(UBYTE *)"1";
  403. if (numhouses[8] == 2)   reviewhouse.IText=(UBYTE *)"2";
  404. if (numhouses[8] == 3)   reviewhouse.IText=(UBYTE *)"3";
  405. if (numhouses[8] == 4)   reviewhouse.IText=(UBYTE *)"4";
  406. if (numhouses[8] == 5)
  407.    {
  408.    reviewhouse.IText=(UBYTE *)"HOTEL";
  409.    reviewhouse.LeftEdge=117;
  410.    }
  411. if (ismorg[8])  reviewmorg.IText=(UBYTE *)"YES";
  412. else  reviewmorg.IText=(UBYTE *)" ";
  413. if (owner[8] == 9)
  414.    {
  415.    reviewowner.FrontPen=white;
  416.    reviewowner.IText=(UBYTE *)"BANK";
  417.    }
  418. if (owner[8] == 0)
  419.    {
  420.    reviewowner.FrontPen=25;
  421.    reviewowner.IText=&name0[0];
  422.    }
  423. if (owner[8] == 1)
  424.    {
  425.    reviewowner.FrontPen=26;
  426.    reviewowner.IText=&name1[0];
  427.    }
  428. if (owner[8] == 2)
  429.    {
  430.    reviewowner.FrontPen=27;
  431.    reviewowner.IText=&name2[0];
  432.    }
  433. if (owner[8] == 3)
  434.    {
  435.    reviewowner.FrontPen=28;
  436.    reviewowner.IText=&name3[0];
  437.    }
  438. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  439.  
  440. reviewhouse.LeftEdge=133;
  441. reviewhouse.TopEdge=75;
  442. reviewmorg.TopEdge=75;
  443. reviewowner.TopEdge=75;
  444. reviewhouse.FrontPen=lt_blue;
  445. reviewmorg.FrontPen=lt_blue;
  446. if (numhouses[9] == 0)   reviewhouse.IText=(UBYTE *)"0";
  447. if (numhouses[9] == 1)   reviewhouse.IText=(UBYTE *)"1";
  448. if (numhouses[9] == 2)   reviewhouse.IText=(UBYTE *)"2";
  449. if (numhouses[9] == 3)   reviewhouse.IText=(UBYTE *)"3";
  450. if (numhouses[9] == 4)   reviewhouse.IText=(UBYTE *)"4";
  451. if (numhouses[9] == 5)
  452.    {
  453.    reviewhouse.IText=(UBYTE *)"HOTEL";
  454.    reviewhouse.LeftEdge=117;
  455.    }
  456. if (ismorg[9])  reviewmorg.IText=(UBYTE *)"YES";
  457. else  reviewmorg.IText=(UBYTE *)" ";
  458. if (owner[9] == 9)
  459.    {
  460.    reviewowner.FrontPen=white;
  461.    reviewowner.IText=(UBYTE *)"BANK";
  462.    }
  463. if (owner[9] == 0)
  464.    {
  465.    reviewowner.FrontPen=25;
  466.    reviewowner.IText=&name0[0];
  467.    }
  468. if (owner[9] == 1)
  469.    {
  470.    reviewowner.FrontPen=26;
  471.    reviewowner.IText=&name1[0];
  472.    }
  473. if (owner[9] == 2)
  474.    {
  475.    reviewowner.FrontPen=27;
  476.    reviewowner.IText=&name2[0];
  477.    }
  478. if (owner[9] == 3)
  479.    {
  480.    reviewowner.FrontPen=28;
  481.    reviewowner.IText=&name3[0];
  482.    }
  483. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  484.  
  485. reviewhouse.LeftEdge=133;
  486. reviewhouse.TopEdge=87;
  487. reviewmorg.TopEdge=87;
  488. reviewowner.TopEdge=87;
  489. reviewhouse.FrontPen=maroon;
  490. reviewmorg.FrontPen=maroon;
  491. if (numhouses[11] == 0)   reviewhouse.IText=(UBYTE *)"0";
  492. if (numhouses[11] == 1)   reviewhouse.IText=(UBYTE *)"1";
  493. if (numhouses[11] == 2)   reviewhouse.IText=(UBYTE *)"2";
  494. if (numhouses[11] == 3)   reviewhouse.IText=(UBYTE *)"3";
  495. if (numhouses[11] == 4)   reviewhouse.IText=(UBYTE *)"4";
  496. if (numhouses[11] == 5)
  497.    {
  498.    reviewhouse.IText=(UBYTE *)"HOTEL";
  499.    reviewhouse.LeftEdge=117;
  500.    }
  501. if (ismorg[11])  reviewmorg.IText=(UBYTE *)"YES";
  502. else  reviewmorg.IText=(UBYTE *)" ";
  503. if (owner[11] == 9)
  504.    {
  505.    reviewowner.FrontPen=white;
  506.    reviewowner.IText=(UBYTE *)"BANK";
  507.    }
  508. if (owner[11] == 0)
  509.    {
  510.    reviewowner.FrontPen=25;
  511.    reviewowner.IText=&name0[0];
  512.    }
  513. if (owner[11] == 1)
  514.    {
  515.    reviewowner.FrontPen=26;
  516.    reviewowner.IText=&name1[0];
  517.    }
  518. if (owner[11] == 2)
  519.    {
  520.    reviewowner.FrontPen=27;
  521.    reviewowner.IText=&name2[0];
  522.    }
  523. if (owner[11] == 3)
  524.    {
  525.    reviewowner.FrontPen=28;
  526.    reviewowner.IText=&name3[0];
  527.    }
  528. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  529.  
  530. reviewhouse.LeftEdge=133;
  531. reviewhouse.TopEdge=99;
  532. reviewmorg.TopEdge=99;
  533. reviewowner.TopEdge=99;
  534. reviewhouse.FrontPen=dk_gray;
  535. reviewmorg.FrontPen=dk_gray;
  536. reviewhouse.IText=(UBYTE *)"n/a";
  537. reviewhouse.LeftEdge=125;
  538. if (ismorg[12])  reviewmorg.IText=(UBYTE *)"YES";
  539. else  reviewmorg.IText=(UBYTE *)" ";
  540. if (owner[12] == 9)
  541.    {
  542.    reviewowner.FrontPen=white;
  543.    reviewowner.IText=(UBYTE *)"BANK";
  544.    }
  545. if (owner[12] == 0)
  546.    {
  547.    reviewowner.FrontPen=25;
  548.    reviewowner.IText=&name0[0];
  549.    }
  550. if (owner[12] == 1)
  551.    {
  552.    reviewowner.FrontPen=26;
  553.    reviewowner.IText=&name1[0];
  554.    }
  555. if (owner[12] == 2)
  556.    {
  557.    reviewowner.FrontPen=27;
  558.    reviewowner.IText=&name2[0];
  559.    }
  560. if (owner[12] == 3)
  561.    {
  562.    reviewowner.FrontPen=28;
  563.    reviewowner.IText=&name3[0];
  564.    }
  565. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  566.  
  567. reviewhouse.LeftEdge=133;
  568. reviewhouse.TopEdge=111;
  569. reviewmorg.TopEdge=111;
  570. reviewowner.TopEdge=111;
  571. reviewhouse.FrontPen=maroon;
  572. reviewmorg.FrontPen=maroon;
  573. if (numhouses[13] == 0)   reviewhouse.IText=(UBYTE *)"0";
  574. if (numhouses[13] == 1)   reviewhouse.IText=(UBYTE *)"1";
  575. if (numhouses[13] == 2)   reviewhouse.IText=(UBYTE *)"2";
  576. if (numhouses[13] == 3)   reviewhouse.IText=(UBYTE *)"3";
  577. if (numhouses[13] == 4)   reviewhouse.IText=(UBYTE *)"4";
  578. if (numhouses[13] == 5)
  579.    {
  580.    reviewhouse.IText=(UBYTE *)"HOTEL";
  581.    reviewhouse.LeftEdge=117;
  582.    }
  583. if (ismorg[13])  reviewmorg.IText=(UBYTE *)"YES";
  584. else  reviewmorg.IText=(UBYTE *)" ";
  585. if (owner[13] == 9)
  586.    {
  587.    reviewowner.FrontPen=white;
  588.    reviewowner.IText=(UBYTE *)"BANK";
  589.    }
  590. if (owner[13] == 0)
  591.    {
  592.    reviewowner.FrontPen=25;
  593.    reviewowner.IText=&name0[0];
  594.    }
  595. if (owner[13] == 1)
  596.    {
  597.    reviewowner.FrontPen=26;
  598.    reviewowner.IText=&name1[0];
  599.    }
  600. if (owner[13] == 2)
  601.    {
  602.    reviewowner.FrontPen=27;
  603.    reviewowner.IText=&name2[0];
  604.    }
  605. if (owner[13] == 3)
  606.    {
  607.    reviewowner.FrontPen=28;
  608.    reviewowner.IText=&name3[0];
  609.    }
  610. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  611.  
  612. reviewhouse.LeftEdge=133;
  613. reviewhouse.TopEdge=123;
  614. reviewmorg.TopEdge=123;
  615. reviewowner.TopEdge=123;
  616. reviewhouse.FrontPen=maroon;
  617. reviewmorg.FrontPen=maroon;
  618. if (numhouses[14] == 0)   reviewhouse.IText=(UBYTE *)"0";
  619. if (numhouses[14] == 1)   reviewhouse.IText=(UBYTE *)"1";
  620. if (numhouses[14] == 2)   reviewhouse.IText=(UBYTE *)"2";
  621. if (numhouses[14] == 3)   reviewhouse.IText=(UBYTE *)"3";
  622. if (numhouses[14] == 4)   reviewhouse.IText=(UBYTE *)"4";
  623. if (numhouses[14] == 5)
  624.    {
  625.    reviewhouse.IText=(UBYTE *)"HOTEL";
  626.    reviewhouse.LeftEdge=117;
  627.    }
  628. if (ismorg[14])  reviewmorg.IText=(UBYTE *)"YES";
  629. else  reviewmorg.IText=(UBYTE *)" ";
  630. if (owner[14] == 9)
  631.    {
  632.    reviewowner.FrontPen=white;
  633.    reviewowner.IText=(UBYTE *)"BANK";
  634.    }
  635. if (owner[14] == 0)
  636.    {
  637.    reviewowner.FrontPen=25;
  638.    reviewowner.IText=&name0[0];
  639.    }
  640. if (owner[14] == 1)
  641.    {
  642.    reviewowner.FrontPen=26;
  643.    reviewowner.IText=&name1[0];
  644.    }
  645. if (owner[14] == 2)
  646.    {
  647.    reviewowner.FrontPen=27;
  648.    reviewowner.IText=&name2[0];
  649.    }
  650. if (owner[14] == 3)
  651.    {
  652.    reviewowner.FrontPen=28;
  653.    reviewowner.IText=&name3[0];
  654.    }
  655. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  656.  
  657. reviewhouse.LeftEdge=133;
  658. reviewhouse.TopEdge=135;
  659. reviewmorg.TopEdge=135;
  660. reviewowner.TopEdge=135;
  661. reviewhouse.FrontPen=lt_gray;
  662. reviewmorg.FrontPen=lt_gray;
  663. reviewhouse.IText=(UBYTE *)"n/a";
  664. reviewhouse.LeftEdge=125;
  665. if (ismorg[15])  reviewmorg.IText=(UBYTE *)"YES";
  666. else  reviewmorg.IText=(UBYTE *)" ";
  667. if (owner[15] == 9)
  668.    {
  669.    reviewowner.FrontPen=white;
  670.    reviewowner.IText=(UBYTE *)"BANK";
  671.    }
  672. if (owner[15] == 0)
  673.    {
  674.    reviewowner.FrontPen=25;
  675.    reviewowner.IText=&name0[0];
  676.    }
  677. if (owner[15] == 1)
  678.    {
  679.    reviewowner.FrontPen=26;
  680.    reviewowner.IText=&name1[0];
  681.    }
  682. if (owner[15] == 2)
  683.    {
  684.    reviewowner.FrontPen=27;
  685.    reviewowner.IText=&name2[0];
  686.    }
  687. if (owner[15] == 3)
  688.    {
  689.    reviewowner.FrontPen=28;
  690.    reviewowner.IText=&name3[0];
  691.    }
  692. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  693.  
  694. reviewhouse.LeftEdge=133;
  695. reviewhouse.TopEdge=147;
  696. reviewmorg.TopEdge=147;
  697. reviewowner.TopEdge=147;
  698. reviewhouse.FrontPen=orange;
  699. reviewmorg.FrontPen=orange;
  700. if (numhouses[16] == 0)   reviewhouse.IText=(UBYTE *)"0";
  701. if (numhouses[16] == 1)   reviewhouse.IText=(UBYTE *)"1";
  702. if (numhouses[16] == 2)   reviewhouse.IText=(UBYTE *)"2";
  703. if (numhouses[16] == 3)   reviewhouse.IText=(UBYTE *)"3";
  704. if (numhouses[16] == 4)   reviewhouse.IText=(UBYTE *)"4";
  705. if (numhouses[16] == 5)
  706.    {
  707.    reviewhouse.IText=(UBYTE *)"HOTEL";
  708.    reviewhouse.LeftEdge=117;
  709.    }
  710. if (ismorg[16])  reviewmorg.IText=(UBYTE *)"YES";
  711. else  reviewmorg.IText=(UBYTE *)" ";
  712. if (owner[16] == 9)
  713.    {
  714.    reviewowner.FrontPen=white;
  715.    reviewowner.IText=(UBYTE *)"BANK";
  716.    }
  717. if (owner[16] == 0)
  718.    {
  719.    reviewowner.FrontPen=25;
  720.    reviewowner.IText=&name0[0];
  721.    }
  722. if (owner[16] == 1)
  723.    {
  724.    reviewowner.FrontPen=26;
  725.    reviewowner.IText=&name1[0];
  726.    }
  727. if (owner[16] == 2)
  728.    {
  729.    reviewowner.FrontPen=27;
  730.    reviewowner.IText=&name2[0];
  731.    }
  732. if (owner[16] == 3)
  733.    {
  734.    reviewowner.FrontPen=28;
  735.    reviewowner.IText=&name3[0];
  736.    }
  737. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  738.  
  739. reviewhouse.LeftEdge=133;
  740. reviewhouse.TopEdge=159;
  741. reviewmorg.TopEdge=159;
  742. reviewowner.TopEdge=159;
  743. reviewhouse.FrontPen=orange;
  744. reviewmorg.FrontPen=orange;
  745. if (numhouses[18] == 0)   reviewhouse.IText=(UBYTE *)"0";
  746. if (numhouses[18] == 1)   reviewhouse.IText=(UBYTE *)"1";
  747. if (numhouses[18] == 2)   reviewhouse.IText=(UBYTE *)"2";
  748. if (numhouses[18] == 3)   reviewhouse.IText=(UBYTE *)"3";
  749. if (numhouses[18] == 4)   reviewhouse.IText=(UBYTE *)"4";
  750. if (numhouses[18] == 5)
  751.    {
  752.    reviewhouse.IText=(UBYTE *)"HOTEL";
  753.    reviewhouse.LeftEdge=117;
  754.    }
  755. if (ismorg[18])  reviewmorg.IText=(UBYTE *)"YES";
  756. else  reviewmorg.IText=(UBYTE *)" ";
  757. if (owner[18] == 9)
  758.    {
  759.    reviewowner.FrontPen=white;
  760.    reviewowner.IText=(UBYTE *)"BANK";
  761.    }
  762. if (owner[18] == 0)
  763.    {
  764.    reviewowner.FrontPen=25;
  765.    reviewowner.IText=&name0[0];
  766.    }
  767. if (owner[18] == 1)
  768.    {
  769.    reviewowner.FrontPen=26;
  770.    reviewowner.IText=&name1[0];
  771.    }
  772. if (owner[18] == 2)
  773.    {
  774.    reviewowner.FrontPen=27;
  775.    reviewowner.IText=&name2[0];
  776.    }
  777. if (owner[18] == 3)
  778.    {
  779.    reviewowner.FrontPen=28;
  780.    reviewowner.IText=&name3[0];
  781.    }
  782. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  783.  
  784. reviewhouse.LeftEdge=133;
  785. reviewhouse.TopEdge=171;
  786. reviewmorg.TopEdge=171;
  787. reviewowner.TopEdge=171;
  788. reviewhouse.FrontPen=orange;
  789. reviewmorg.FrontPen=orange;
  790. if (numhouses[19] == 0)   reviewhouse.IText=(UBYTE *)"0";
  791. if (numhouses[19] == 1)   reviewhouse.IText=(UBYTE *)"1";
  792. if (numhouses[19] == 2)   reviewhouse.IText=(UBYTE *)"2";
  793. if (numhouses[19] == 3)   reviewhouse.IText=(UBYTE *)"3";
  794. if (numhouses[19] == 4)   reviewhouse.IText=(UBYTE *)"4";
  795. if (numhouses[19] == 5)
  796.    {
  797.    reviewhouse.IText=(UBYTE *)"HOTEL";
  798.    reviewhouse.LeftEdge=117;
  799.    }
  800. if (ismorg[19])  reviewmorg.IText=(UBYTE *)"YES";
  801. else  reviewmorg.IText=(UBYTE *)" ";
  802. if (owner[19] == 9)
  803.    {
  804.    reviewowner.FrontPen=white;
  805.    reviewowner.IText=(UBYTE *)"BANK";
  806.    }
  807. if (owner[19] == 0)
  808.    {
  809.    reviewowner.FrontPen=25;
  810.    reviewowner.IText=&name0[0];
  811.    }
  812. if (owner[19] == 1)
  813.    {
  814.    reviewowner.FrontPen=26;
  815.    reviewowner.IText=&name1[0];
  816.    }
  817. if (owner[19] == 2)
  818.    {
  819.    reviewowner.FrontPen=27;
  820.    reviewowner.IText=&name2[0];
  821.    }
  822. if (owner[19] == 3)
  823.    {
  824.    reviewowner.FrontPen=28;
  825.    reviewowner.IText=&name3[0];
  826.    }
  827. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  828.  
  829. DrawBorder(rportreviewprop, &line0border, 0, 0);
  830.  
  831. line0_text=82;
  832. for (j=0, hold_line=line0_text; j<SHOW_LINES; j++)
  833.       instructIT[j].IText=instructline[hold_line++];
  834.  
  835. ckpg1:
  836. Wait(1<<reviewpropwindow->UserPort->mp_SigBit);
  837. while((reviewpropmsg=(struct IntuiMessage *)
  838.                          GetMsg(reviewpropwindow->UserPort))!=NULL)
  839.    {
  840.    rpclass=reviewpropmsg->Class;
  841.    rpcode=reviewpropmsg->Code;
  842.    ReplyMsg(reviewpropmsg);
  843.    }
  844. if (rpclass == CLOSEWINDOW)
  845.    {
  846.    CloseWindow(reviewpropwindow);
  847.    goto exrp;
  848.    }
  849. if (rpclass == GADGETUP)
  850.    {   
  851.    CloseWindow(reviewpropwindow);
  852.    goto pagetwo;
  853.    }
  854. if ( (rpclass == RAWKEY) && (rpcode == HELP) )
  855.    {
  856.    instruction();
  857.    goto ckpg1;
  858.    }
  859.  
  860. pagetwo:
  861. nreviewpropw.Screen=screen1;
  862. if ((reviewpropwindow=(struct Window *)OpenWindow(&nreviewpropw))==NULL)
  863.    cleanexit("Can't open reviewprop window.\n");
  864. rportreviewprop=reviewpropwindow->RPort;
  865.  
  866. PrintIText(rportreviewprop, &reviewprop14, 0, 0);
  867.  
  868. reviewhouse.LeftEdge=133;
  869. reviewhouse.TopEdge=15;
  870. reviewmorg.TopEdge=15;
  871. reviewowner.TopEdge=15;
  872. reviewhouse.FrontPen=red;
  873. reviewmorg.FrontPen=red;
  874. if (numhouses[21] == 0)   reviewhouse.IText=(UBYTE *)"0";
  875. if (numhouses[21] == 1)   reviewhouse.IText=(UBYTE *)"1";
  876. if (numhouses[21] == 2)   reviewhouse.IText=(UBYTE *)"2";
  877. if (numhouses[21] == 3)   reviewhouse.IText=(UBYTE *)"3";
  878. if (numhouses[21] == 4)   reviewhouse.IText=(UBYTE *)"4";
  879. if (numhouses[21] == 5)
  880.    {
  881.    reviewhouse.IText=(UBYTE *)"HOTEL";
  882.    reviewhouse.LeftEdge=117;
  883.    }
  884. if (ismorg[21])  reviewmorg.IText=(UBYTE *)"YES";
  885. else  reviewmorg.IText=(UBYTE *)" ";
  886. if (owner[21] == 9)
  887.    {
  888.    reviewowner.FrontPen=white;
  889.    reviewowner.IText=(UBYTE *)"BANK";
  890.    }
  891. if (owner[21] == 0)
  892.    {
  893.    reviewowner.FrontPen=25;
  894.    reviewowner.IText=&name0[0];
  895.    }
  896. if (owner[21] == 1)
  897.    {
  898.    reviewowner.FrontPen=26;
  899.    reviewowner.IText=&name1[0];
  900.    }
  901. if (owner[21] == 2)
  902.    {
  903.    reviewowner.FrontPen=27;
  904.    reviewowner.IText=&name2[0];
  905.    }
  906. if (owner[21] == 3)
  907.    {
  908.    reviewowner.FrontPen=28;
  909.    reviewowner.IText=&name3[0];
  910.    }
  911. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  912.  
  913. reviewhouse.LeftEdge=133;
  914. reviewhouse.TopEdge=27;
  915. reviewmorg.TopEdge=27;
  916. reviewowner.TopEdge=27;
  917. reviewhouse.FrontPen=red;
  918. reviewmorg.FrontPen=red;
  919. if (numhouses[23] == 0)   reviewhouse.IText=(UBYTE *)"0";
  920. if (numhouses[23] == 1)   reviewhouse.IText=(UBYTE *)"1";
  921. if (numhouses[23] == 2)   reviewhouse.IText=(UBYTE *)"2";
  922. if (numhouses[23] == 3)   reviewhouse.IText=(UBYTE *)"3";
  923. if (numhouses[23] == 4)   reviewhouse.IText=(UBYTE *)"4";
  924. if (numhouses[23] == 5)
  925.    {
  926.    reviewhouse.IText=(UBYTE *)"HOTEL";
  927.    reviewhouse.LeftEdge=117;
  928.    }
  929. if (ismorg[23])  reviewmorg.IText=(UBYTE *)"YES";
  930. else  reviewmorg.IText=(UBYTE *)" ";
  931. if (owner[23] == 9)
  932.    {
  933.    reviewowner.FrontPen=white;
  934.    reviewowner.IText=(UBYTE *)"BANK";
  935.    }
  936. if (owner[23] == 0)
  937.    {
  938.    reviewowner.FrontPen=25;
  939.    reviewowner.IText=&name0[0];
  940.    }
  941. if (owner[23] == 1)
  942.    {
  943.    reviewowner.FrontPen=26;
  944.    reviewowner.IText=&name1[0];
  945.    }
  946. if (owner[23] == 2)
  947.    {
  948.    reviewowner.FrontPen=27;
  949.    reviewowner.IText=&name2[0];
  950.    }
  951. if (owner[23] == 3)
  952.    {
  953.    reviewowner.FrontPen=28;
  954.    reviewowner.IText=&name3[0];
  955.    }
  956. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  957.  
  958. reviewhouse.LeftEdge=133;
  959. reviewhouse.TopEdge=39;
  960. reviewmorg.TopEdge=39;
  961. reviewowner.TopEdge=39;
  962. reviewhouse.FrontPen=red;
  963. reviewmorg.FrontPen=red;
  964. if (numhouses[24] == 0)   reviewhouse.IText=(UBYTE *)"0";
  965. if (numhouses[24] == 1)   reviewhouse.IText=(UBYTE *)"1";
  966. if (numhouses[24] == 2)   reviewhouse.IText=(UBYTE *)"2";
  967. if (numhouses[24] == 3)   reviewhouse.IText=(UBYTE *)"3";
  968. if (numhouses[24] == 4)   reviewhouse.IText=(UBYTE *)"4";
  969. if (numhouses[24] == 5)
  970.    {
  971.    reviewhouse.IText=(UBYTE *)"HOTEL";
  972.    reviewhouse.LeftEdge=117;
  973.    }
  974. if (ismorg[24])  reviewmorg.IText=(UBYTE *)"YES";
  975. else  reviewmorg.IText=(UBYTE *)" ";
  976. if (owner[24] == 9)
  977.    {
  978.    reviewowner.FrontPen=white;
  979.    reviewowner.IText=(UBYTE *)"BANK";
  980.    }
  981. if (owner[24] == 0)
  982.    {
  983.    reviewowner.FrontPen=25;
  984.    reviewowner.IText=&name0[0];
  985.    }
  986. if (owner[24] == 1)
  987.    {
  988.    reviewowner.FrontPen=26;
  989.    reviewowner.IText=&name1[0];
  990.    }
  991. if (owner[24] == 2)
  992.    {
  993.    reviewowner.FrontPen=27;
  994.    reviewowner.IText=&name2[0];
  995.    }
  996. if (owner[24] == 3)
  997.    {
  998.    reviewowner.FrontPen=28;
  999.    reviewowner.IText=&name3[0];
  1000.    }
  1001. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1002.  
  1003. reviewhouse.LeftEdge=133;
  1004. reviewhouse.TopEdge=51;
  1005. reviewmorg.TopEdge=51;
  1006. reviewowner.TopEdge=51;
  1007. reviewhouse.FrontPen=lt_gray;
  1008. reviewmorg.FrontPen=lt_gray;
  1009. reviewhouse.IText=(UBYTE *)"n/a";
  1010. reviewhouse.LeftEdge=125;
  1011. if (ismorg[25])  reviewmorg.IText=(UBYTE *)"YES";
  1012. else  reviewmorg.IText=(UBYTE *)" ";
  1013. if (owner[25] == 9)
  1014.    {
  1015.    reviewowner.FrontPen=white;
  1016.    reviewowner.IText=(UBYTE *)"BANK";
  1017.    }
  1018. if (owner[25] == 0)
  1019.    {
  1020.    reviewowner.FrontPen=25;
  1021.    reviewowner.IText=&name0[0];
  1022.    }
  1023. if (owner[25] == 1)
  1024.    {
  1025.    reviewowner.FrontPen=26;
  1026.    reviewowner.IText=&name1[0];
  1027.    }
  1028. if (owner[25] == 2)
  1029.    {
  1030.    reviewowner.FrontPen=27;
  1031.    reviewowner.IText=&name2[0];
  1032.    }
  1033. if (owner[25] == 3)
  1034.    {
  1035.    reviewowner.FrontPen=28;
  1036.    reviewowner.IText=&name3[0];
  1037.    }
  1038. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1039.  
  1040. reviewhouse.LeftEdge=133;
  1041. reviewhouse.TopEdge=63;
  1042. reviewmorg.TopEdge=63;
  1043. reviewowner.TopEdge=63;
  1044. reviewhouse.FrontPen=yellow;
  1045. reviewmorg.FrontPen=yellow;
  1046. if (numhouses[26] == 0)   reviewhouse.IText=(UBYTE *)"0";
  1047. if (numhouses[26] == 1)   reviewhouse.IText=(UBYTE *)"1";
  1048. if (numhouses[26] == 2)   reviewhouse.IText=(UBYTE *)"2";
  1049. if (numhouses[26] == 3)   reviewhouse.IText=(UBYTE *)"3";
  1050. if (numhouses[26] == 4)   reviewhouse.IText=(UBYTE *)"4";
  1051. if (numhouses[26] == 5)
  1052.    {
  1053.    reviewhouse.IText=(UBYTE *)"HOTEL";
  1054.    reviewhouse.LeftEdge=117;
  1055.    }
  1056. if (ismorg[26])  reviewmorg.IText=(UBYTE *)"YES";
  1057. else  reviewmorg.IText=(UBYTE *)" ";
  1058. if (owner[26] == 9)
  1059.    {
  1060.    reviewowner.FrontPen=white;
  1061.    reviewowner.IText=(UBYTE *)"BANK";
  1062.    }
  1063. if (owner[26] == 0)
  1064.    {
  1065.    reviewowner.FrontPen=25;
  1066.    reviewowner.IText=&name0[0];
  1067.    }
  1068. if (owner[26] == 1)
  1069.    {
  1070.    reviewowner.FrontPen=26;
  1071.    reviewowner.IText=&name1[0];
  1072.    }
  1073. if (owner[26] == 2)
  1074.    {
  1075.    reviewowner.FrontPen=27;
  1076.    reviewowner.IText=&name2[0];
  1077.    }
  1078. if (owner[26] == 3)
  1079.    {
  1080.    reviewowner.FrontPen=28;
  1081.    reviewowner.IText=&name3[0];
  1082.    }
  1083. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1084.  
  1085. reviewhouse.LeftEdge=133;
  1086. reviewhouse.TopEdge=75;
  1087. reviewmorg.TopEdge=75;
  1088. reviewowner.TopEdge=75;
  1089. reviewhouse.FrontPen=yellow;
  1090. reviewmorg.FrontPen=yellow;
  1091. if (numhouses[27] == 0)   reviewhouse.IText=(UBYTE *)"0";
  1092. if (numhouses[27] == 1)   reviewhouse.IText=(UBYTE *)"1";
  1093. if (numhouses[27] == 2)   reviewhouse.IText=(UBYTE *)"2";
  1094. if (numhouses[27] == 3)   reviewhouse.IText=(UBYTE *)"3";
  1095. if (numhouses[27] == 4)   reviewhouse.IText=(UBYTE *)"4";
  1096. if (numhouses[27] == 5)
  1097.    {
  1098.    reviewhouse.IText=(UBYTE *)"HOTEL";
  1099.    reviewhouse.LeftEdge=117;
  1100.    }
  1101. if (ismorg[27])  reviewmorg.IText=(UBYTE *)"YES";
  1102. else  reviewmorg.IText=(UBYTE *)" ";
  1103. if (owner[27] == 9)
  1104.    {
  1105.    reviewowner.FrontPen=white;
  1106.    reviewowner.IText=(UBYTE *)"BANK";
  1107.    }
  1108. if (owner[27] == 0)
  1109.    {
  1110.    reviewowner.FrontPen=25;
  1111.    reviewowner.IText=&name0[0];
  1112.    }
  1113. if (owner[27] == 1)
  1114.    {
  1115.    reviewowner.FrontPen=26;
  1116.    reviewowner.IText=&name1[0];
  1117.    }
  1118. if (owner[27] == 2)
  1119.    {
  1120.    reviewowner.FrontPen=27;
  1121.    reviewowner.IText=&name2[0];
  1122.    }
  1123. if (owner[27] == 3)
  1124.    {
  1125.    reviewowner.FrontPen=28;
  1126.    reviewowner.IText=&name3[0];
  1127.    }
  1128. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1129.  
  1130. reviewhouse.LeftEdge=133;
  1131. reviewhouse.TopEdge=87;
  1132. reviewmorg.TopEdge=87;
  1133. reviewowner.TopEdge=87;
  1134. reviewhouse.FrontPen=royal_blue;
  1135. reviewmorg.FrontPen=royal_blue;
  1136. reviewhouse.IText=(UBYTE *)"n/a";
  1137. reviewhouse.LeftEdge=125;
  1138. if (ismorg[28])  reviewmorg.IText=(UBYTE *)"YES";
  1139. else  reviewmorg.IText=(UBYTE *)" ";
  1140. if (owner[28] == 9)
  1141.    {
  1142.    reviewowner.FrontPen=white;
  1143.    reviewowner.IText=(UBYTE *)"BANK";
  1144.    }
  1145. if (owner[28] == 0)
  1146.    {
  1147.    reviewowner.FrontPen=25;
  1148.    reviewowner.IText=&name0[0];
  1149.    }
  1150. if (owner[28] == 1)
  1151.    {
  1152.    reviewowner.FrontPen=26;
  1153.    reviewowner.IText=&name1[0];
  1154.    }
  1155. if (owner[28] == 2)
  1156.    {
  1157.    reviewowner.FrontPen=27;
  1158.    reviewowner.IText=&name2[0];
  1159.    }
  1160. if (owner[28] == 3)
  1161.    {
  1162.    reviewowner.FrontPen=28;
  1163.    reviewowner.IText=&name3[0];
  1164.    }
  1165. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1166.  
  1167. reviewhouse.LeftEdge=133;
  1168. reviewhouse.TopEdge=99;
  1169. reviewmorg.TopEdge=99;
  1170. reviewowner.TopEdge=99;
  1171. reviewhouse.FrontPen=yellow;
  1172. reviewmorg.FrontPen=yellow;
  1173. if (numhouses[29] == 0)   reviewhouse.IText=(UBYTE *)"0";
  1174. if (numhouses[29] == 1)   reviewhouse.IText=(UBYTE *)"1";
  1175. if (numhouses[29] == 2)   reviewhouse.IText=(UBYTE *)"2";
  1176. if (numhouses[29] == 3)   reviewhouse.IText=(UBYTE *)"3";
  1177. if (numhouses[29] == 4)   reviewhouse.IText=(UBYTE *)"4";
  1178. if (numhouses[29] == 5)
  1179.    {
  1180.    reviewhouse.IText=(UBYTE *)"HOTEL";
  1181.    reviewhouse.LeftEdge=117;
  1182.    }
  1183. if (ismorg[29])  reviewmorg.IText=(UBYTE *)"YES";
  1184. else  reviewmorg.IText=(UBYTE *)" ";
  1185. if (owner[29] == 9)
  1186.    {
  1187.    reviewowner.FrontPen=white;
  1188.    reviewowner.IText=(UBYTE *)"BANK";
  1189.    }
  1190. if (owner[29] == 0)
  1191.    {
  1192.    reviewowner.FrontPen=25;
  1193.    reviewowner.IText=&name0[0];
  1194.    }
  1195. if (owner[29] == 1)
  1196.    {
  1197.    reviewowner.FrontPen=26;
  1198.    reviewowner.IText=&name1[0];
  1199.    }
  1200. if (owner[29] == 2)
  1201.    {
  1202.    reviewowner.FrontPen=27;
  1203.    reviewowner.IText=&name2[0];
  1204.    }
  1205. if (owner[29] == 3)
  1206.    {
  1207.    reviewowner.FrontPen=28;
  1208.    reviewowner.IText=&name3[0];
  1209.    }
  1210. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1211.  
  1212. reviewhouse.LeftEdge=133;
  1213. reviewhouse.TopEdge=111;
  1214. reviewmorg.TopEdge=111;
  1215. reviewowner.TopEdge=111;
  1216. reviewhouse.FrontPen=green;
  1217. reviewmorg.FrontPen=green;
  1218. if (numhouses[31] == 0)   reviewhouse.IText=(UBYTE *)"0";
  1219. if (numhouses[31] == 1)   reviewhouse.IText=(UBYTE *)"1";
  1220. if (numhouses[31] == 2)   reviewhouse.IText=(UBYTE *)"2";
  1221. if (numhouses[31] == 3)   reviewhouse.IText=(UBYTE *)"3";
  1222. if (numhouses[31] == 4)   reviewhouse.IText=(UBYTE *)"4";
  1223. if (numhouses[31] == 5)
  1224.    {
  1225.    reviewhouse.IText=(UBYTE *)"HOTEL";
  1226.    reviewhouse.LeftEdge=117;
  1227.    }
  1228. if (ismorg[31])  reviewmorg.IText=(UBYTE *)"YES";
  1229. else  reviewmorg.IText=(UBYTE *)" ";
  1230. if (owner[31] == 9)
  1231.    {
  1232.    reviewowner.FrontPen=white;
  1233.    reviewowner.IText=(UBYTE *)"BANK";
  1234.    }
  1235. if (owner[31] == 0)
  1236.    {
  1237.    reviewowner.FrontPen=25;
  1238.    reviewowner.IText=&name0[0];
  1239.    }
  1240. if (owner[31] == 1)
  1241.    {
  1242.    reviewowner.FrontPen=26;
  1243.    reviewowner.IText=&name1[0];
  1244.    }
  1245. if (owner[31] == 2)
  1246.    {
  1247.    reviewowner.FrontPen=27;
  1248.    reviewowner.IText=&name2[0];
  1249.    }
  1250. if (owner[31] == 3)
  1251.    {
  1252.    reviewowner.FrontPen=28;
  1253.    reviewowner.IText=&name3[0];
  1254.    }
  1255. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1256.  
  1257. reviewhouse.LeftEdge=133;
  1258. reviewhouse.TopEdge=123;
  1259. reviewmorg.TopEdge=123;
  1260. reviewowner.TopEdge=123;
  1261. reviewhouse.FrontPen=green;
  1262. reviewmorg.FrontPen=green;
  1263. if (numhouses[32] == 0)   reviewhouse.IText=(UBYTE *)"0";
  1264. if (numhouses[32] == 1)   reviewhouse.IText=(UBYTE *)"1";
  1265. if (numhouses[32] == 2)   reviewhouse.IText=(UBYTE *)"2";
  1266. if (numhouses[32] == 3)   reviewhouse.IText=(UBYTE *)"3";
  1267. if (numhouses[32] == 4)   reviewhouse.IText=(UBYTE *)"4";
  1268. if (numhouses[32] == 5)
  1269.    {
  1270.    reviewhouse.IText=(UBYTE *)"HOTEL";
  1271.    reviewhouse.LeftEdge=117;
  1272.    }
  1273. if (ismorg[32])  reviewmorg.IText=(UBYTE *)"YES";
  1274. else  reviewmorg.IText=(UBYTE *)" ";
  1275. if (owner[32] == 9)
  1276.    {
  1277.    reviewowner.FrontPen=white;
  1278.    reviewowner.IText=(UBYTE *)"BANK";
  1279.    }
  1280. if (owner[32] == 0)
  1281.    {
  1282.    reviewowner.FrontPen=25;
  1283.    reviewowner.IText=&name0[0];
  1284.    }
  1285. if (owner[32] == 1)
  1286.    {
  1287.    reviewowner.FrontPen=26;
  1288.    reviewowner.IText=&name1[0];
  1289.    }
  1290. if (owner[32] == 2)
  1291.    {
  1292.    reviewowner.FrontPen=27;
  1293.    reviewowner.IText=&name2[0];
  1294.    }
  1295. if (owner[32] == 3)
  1296.    {
  1297.    reviewowner.FrontPen=28;
  1298.    reviewowner.IText=&name3[0];
  1299.    }
  1300. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1301.  
  1302. reviewhouse.LeftEdge=133;
  1303. reviewhouse.TopEdge=135;
  1304. reviewmorg.TopEdge=135;
  1305. reviewowner.TopEdge=135;
  1306. reviewhouse.FrontPen=green;
  1307. reviewmorg.FrontPen=green;
  1308. if (numhouses[34] == 0)   reviewhouse.IText=(UBYTE *)"0";
  1309. if (numhouses[34] == 1)   reviewhouse.IText=(UBYTE *)"1";
  1310. if (numhouses[34] == 2)   reviewhouse.IText=(UBYTE *)"2";
  1311. if (numhouses[34] == 3)   reviewhouse.IText=(UBYTE *)"3";
  1312. if (numhouses[34] == 4)   reviewhouse.IText=(UBYTE *)"4";
  1313. if (numhouses[34] == 5)
  1314.    {
  1315.    reviewhouse.IText=(UBYTE *)"HOTEL";
  1316.    reviewhouse.LeftEdge=117;
  1317.    }
  1318. if (ismorg[34])  reviewmorg.IText=(UBYTE *)"YES";
  1319. else  reviewmorg.IText=(UBYTE *)" ";
  1320. if (owner[34] == 9)
  1321.    {
  1322.    reviewowner.FrontPen=white;
  1323.    reviewowner.IText=(UBYTE *)"BANK";
  1324.    }
  1325. if (owner[34] == 0)
  1326.    {
  1327.    reviewowner.FrontPen=25;
  1328.    reviewowner.IText=&name0[0];
  1329.    }
  1330. if (owner[34] == 1)
  1331.    {
  1332.    reviewowner.FrontPen=26;
  1333.    reviewowner.IText=&name1[0];
  1334.    }
  1335. if (owner[34] == 2)
  1336.    {
  1337.    reviewowner.FrontPen=27;
  1338.    reviewowner.IText=&name2[0];
  1339.    }
  1340. if (owner[34] == 3)
  1341.    {
  1342.    reviewowner.FrontPen=28;
  1343.    reviewowner.IText=&name3[0];
  1344.    }
  1345. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1346.  
  1347. reviewhouse.LeftEdge=133;
  1348. reviewhouse.TopEdge=147;
  1349. reviewmorg.TopEdge=147;
  1350. reviewowner.TopEdge=147;
  1351. reviewhouse.FrontPen=lt_gray;
  1352. reviewmorg.FrontPen=lt_gray;
  1353. reviewhouse.IText=(UBYTE *)"n/a";
  1354. reviewhouse.LeftEdge=125;
  1355. if (ismorg[35])  reviewmorg.IText=(UBYTE *)"YES";
  1356. else  reviewmorg.IText=(UBYTE *)" ";
  1357. if (owner[35] == 9)
  1358.    {
  1359.    reviewowner.FrontPen=white;
  1360.    reviewowner.IText=(UBYTE *)"BANK";
  1361.    }
  1362. if (owner[35] == 0)
  1363.    {
  1364.    reviewowner.FrontPen=25;
  1365.    reviewowner.IText=&name0[0];
  1366.    }
  1367. if (owner[35] == 1)
  1368.    {
  1369.    reviewowner.FrontPen=26;
  1370.    reviewowner.IText=&name1[0];
  1371.    }
  1372. if (owner[35] == 2)
  1373.    {
  1374.    reviewowner.FrontPen=27;
  1375.    reviewowner.IText=&name2[0];
  1376.    }
  1377. if (owner[35] == 3)
  1378.    {
  1379.    reviewowner.FrontPen=28;
  1380.    reviewowner.IText=&name3[0];
  1381.    }
  1382. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1383.  
  1384. reviewhouse.LeftEdge=133;
  1385. reviewhouse.TopEdge=159;
  1386. reviewmorg.TopEdge=159;
  1387. reviewowner.TopEdge=159;
  1388. reviewhouse.FrontPen=dk_blue;
  1389. reviewmorg.FrontPen=dk_blue;
  1390. if (numhouses[37] == 0)   reviewhouse.IText=(UBYTE *)"0";
  1391. if (numhouses[37] == 1)   reviewhouse.IText=(UBYTE *)"1";
  1392. if (numhouses[37] == 2)   reviewhouse.IText=(UBYTE *)"2";
  1393. if (numhouses[37] == 3)   reviewhouse.IText=(UBYTE *)"3";
  1394. if (numhouses[37] == 4)   reviewhouse.IText=(UBYTE *)"4";
  1395. if (numhouses[37] == 5)
  1396.    {
  1397.    reviewhouse.IText=(UBYTE *)"HOTEL";
  1398.    reviewhouse.LeftEdge=117;
  1399.    }
  1400. if (ismorg[37])  reviewmorg.IText=(UBYTE *)"YES";
  1401. else  reviewmorg.IText=(UBYTE *)" ";
  1402. if (owner[37] == 9)
  1403.    {
  1404.    reviewowner.FrontPen=white;
  1405.    reviewowner.IText=(UBYTE *)"BANK";
  1406.    }
  1407. if (owner[37] == 0)
  1408.    {
  1409.    reviewowner.FrontPen=25;
  1410.    reviewowner.IText=&name0[0];
  1411.    }
  1412. if (owner[37] == 1)
  1413.    {
  1414.    reviewowner.FrontPen=26;
  1415.    reviewowner.IText=&name1[0];
  1416.    }
  1417. if (owner[37] == 2)
  1418.    {
  1419.    reviewowner.FrontPen=27;
  1420.    reviewowner.IText=&name2[0];
  1421.    }
  1422. if (owner[37] == 3)
  1423.    {
  1424.    reviewowner.FrontPen=28;
  1425.    reviewowner.IText=&name3[0];
  1426.    }
  1427. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1428.  
  1429. reviewhouse.LeftEdge=133;
  1430. reviewhouse.TopEdge=171;
  1431. reviewmorg.TopEdge=171;
  1432. reviewowner.TopEdge=171;
  1433. reviewhouse.FrontPen=dk_blue;
  1434. reviewmorg.FrontPen=dk_blue;
  1435. if (numhouses[39] == 0)   reviewhouse.IText=(UBYTE *)"0";
  1436. if (numhouses[39] == 1)   reviewhouse.IText=(UBYTE *)"1";
  1437. if (numhouses[39] == 2)   reviewhouse.IText=(UBYTE *)"2";
  1438. if (numhouses[39] == 3)   reviewhouse.IText=(UBYTE *)"3";
  1439. if (numhouses[39] == 4)   reviewhouse.IText=(UBYTE *)"4";
  1440. if (numhouses[39] == 5)
  1441.    {
  1442.    reviewhouse.IText=(UBYTE *)"HOTEL";
  1443.    reviewhouse.LeftEdge=117;
  1444.    }
  1445. if (ismorg[39])  reviewmorg.IText=(UBYTE *)"YES";
  1446. else  reviewmorg.IText=(UBYTE *)" ";
  1447. if (owner[39] == 9)
  1448.    {
  1449.    reviewowner.FrontPen=white;
  1450.    reviewowner.IText=(UBYTE *)"BANK";
  1451.    }
  1452. if (owner[39] == 0)
  1453.    {
  1454.    reviewowner.FrontPen=25;
  1455.    reviewowner.IText=&name0[0];
  1456.    }
  1457. if (owner[39] == 1)
  1458.    {
  1459.    reviewowner.FrontPen=26;
  1460.    reviewowner.IText=&name1[0];
  1461.    }
  1462. if (owner[39] == 2)
  1463.    {
  1464.    reviewowner.FrontPen=27;
  1465.    reviewowner.IText=&name2[0];
  1466.    }
  1467. if (owner[39] == 3)
  1468.    {
  1469.    reviewowner.FrontPen=28;
  1470.    reviewowner.IText=&name3[0];
  1471.    }
  1472. PrintIText(rportreviewprop, &reviewhouse, 0, 0);
  1473.  
  1474. DrawBorder(rportreviewprop, &line0border, 0, 0);
  1475.  
  1476.  
  1477. ckpg2:
  1478. Wait(1<<reviewpropwindow->UserPort->mp_SigBit);
  1479. while((reviewpropmsg=(struct IntuiMessage *)
  1480.                          GetMsg(reviewpropwindow->UserPort))!=NULL)
  1481.    {
  1482.    rpclass=reviewpropmsg->Class;
  1483.    rpcode=reviewpropmsg->Code;
  1484.    ReplyMsg(reviewpropmsg);
  1485.    }
  1486. if (rpclass == CLOSEWINDOW)
  1487.    {
  1488.    CloseWindow(reviewpropwindow);
  1489.    goto exrp;
  1490.    }
  1491. if (rpclass == GADGETUP)
  1492.    {   
  1493.    CloseWindow(reviewpropwindow);
  1494.    goto pageone;
  1495.    }
  1496. if ( (rpclass == RAWKEY) && (rpcode == HELP) )
  1497.    {
  1498.    instruction();
  1499.    goto ckpg2;
  1500.    }
  1501. exrp:
  1502. }
  1503.  
  1504. VOID writeyourturn()
  1505. {
  1506. SetAPen(rportboard, black);
  1507. RectFill(rportboard, 65, 109, 254, 120);
  1508. PrintIText(rportboard, &cname, 61, 103);
  1509. }
  1510.  
  1511. VOID transfertitle(buyer, seller, deed, price)
  1512. USHORT buyer, seller, deed, price;
  1513. {
  1514. if ((LONG)price > bankroll[buyer])
  1515.    {
  1516.    odqpflag=TRUE;
  1517.    overdrawn(buyer, (LONG)price);
  1518.    odqpflag=FALSE;
  1519.    }
  1520. if ((LONG)price > bankroll[buyer])
  1521.    {
  1522.    if (seller == BANK)  didntbuyfrombank=TRUE;
  1523.    else  didntbuyfrombank=FALSE;
  1524.    goto extrans;
  1525.    }
  1526. bankroll[buyer]=bankroll[buyer]-(LONG)price;
  1527. bankroll[seller]=bankroll[seller]+(LONG)price;
  1528. if (buyer == SLUSH)  buyer=BANK;
  1529. owner[deed]=buyer;
  1530. if (ismorg[deed])
  1531.    {
  1532.    if (buyer != BANK)   tenpercent(buyer, deed);
  1533.    if (buyer == BANK)
  1534.       {
  1535.       ismorg[deed]=FALSE;
  1536.       em(deed, FALSE);
  1537.       }
  1538.    }
  1539. if (buyer != BANK)
  1540.    {
  1541.    if ( (deed == 12) || (deed == 28) )  numutil[buyer]++;
  1542.    if ( (deed == 5) || (deed == 15) || (deed == 25) || (deed == 35) )
  1543.       numrr[buyer]++;
  1544.    }
  1545. if ( (owner[1] != BANK) && (owner[1] == owner[3]) )
  1546.    {
  1547.    ismono[1]=TRUE;
  1548.    ismono[3]=TRUE;
  1549.    }
  1550. else
  1551.    {
  1552.    ismono[1]=FALSE;
  1553.    ismono[3]=FALSE;
  1554.    }
  1555. if ( (owner[6] != BANK) && (owner[6] == owner[8]) && (owner[8] == owner[9]) )
  1556.    {
  1557.    ismono[6]=TRUE;
  1558.    ismono[8]=TRUE;
  1559.    ismono[9]=TRUE;
  1560.    }
  1561. else
  1562.    {
  1563.    ismono[6]=FALSE;
  1564.    ismono[8]=FALSE;
  1565.    ismono[9]=FALSE;
  1566.    }
  1567. if ( (owner[11] != BANK) && (owner[11] == owner[13]) 
  1568.      && (owner[13] == owner[14]) )
  1569.    {
  1570.    ismono[11]=TRUE;
  1571.    ismono[13]=TRUE;
  1572.    ismono[14]=TRUE;
  1573.    }
  1574. else
  1575.    {
  1576.    ismono[11]=FALSE;
  1577.    ismono[13]=FALSE;
  1578.    ismono[14]=FALSE;
  1579.    }
  1580. if ( (owner[16] != BANK) && (owner[16] == owner[18]) 
  1581.      && (owner[18] == owner[19]) )
  1582.    {
  1583.    ismono[16]=TRUE;
  1584.    ismono[18]=TRUE;
  1585.    ismono[19]=TRUE;
  1586.    }
  1587. else
  1588.    {
  1589.    ismono[16]=FALSE;
  1590.    ismono[18]=FALSE;
  1591.    ismono[19]=FALSE;
  1592.    }
  1593. if ( (owner[21] != BANK) && (owner[21] == owner[23]) 
  1594.      && (owner[23] == owner[24]) )
  1595.    {
  1596.    ismono[21]=TRUE;
  1597.    ismono[23]=TRUE;
  1598.    ismono[24]=TRUE;
  1599.    }
  1600. else
  1601.    {
  1602.    ismono[21]=FALSE;
  1603.    ismono[23]=FALSE;
  1604.    ismono[24]=FALSE;
  1605.    }
  1606. if ( (owner[26] != BANK) && (owner[26] == owner[27]) 
  1607.      && (owner[27] == owner[29]) )
  1608.    {
  1609.    ismono[26]=TRUE;
  1610.    ismono[27]=TRUE;
  1611.    ismono[29]=TRUE;
  1612.    }
  1613. else
  1614.    {
  1615.    ismono[26]=FALSE;
  1616.    ismono[27]=FALSE;
  1617.    ismono[29]=FALSE;
  1618.    }
  1619. if ( (owner[31] != BANK) && (owner[31] == owner[32]) 
  1620.      && (owner[32] == owner[34]) )
  1621.    {
  1622.    ismono[31]=TRUE;
  1623.    ismono[32]=TRUE;
  1624.    ismono[34]=TRUE;
  1625.    }
  1626. else
  1627.    {
  1628.    ismono[31]=FALSE;
  1629.    ismono[32]=FALSE;
  1630.    ismono[34]=FALSE;
  1631.    }
  1632. if ( (owner[37] != BANK) && (owner[37] == owner[39]) )
  1633.    {
  1634.    ismono[37]=TRUE;
  1635.    ismono[39]=TRUE;
  1636.    }
  1637. else
  1638.    {
  1639.    ismono[37]=FALSE;
  1640.    ismono[39]=FALSE;
  1641.    }
  1642. fixmenu();
  1643. extrans:
  1644. }
  1645.  
  1646. VOID eft(from, to, amount)
  1647. USHORT from, to, amount;
  1648. {
  1649. if (bankroll[BANK] < 5000)  bankroll[BANK]=99999;
  1650. if (amount > bankroll[from])  overdrawn(from, amount);
  1651. if (amount > bankroll[from])
  1652.    {
  1653.    if (building || mortgaging)
  1654.       {
  1655.       building=FALSE;
  1656.       mortgaging=FALSE;
  1657.       goto  exeft;
  1658.       }
  1659.    outofgame(from, to);
  1660.    }
  1661. if (amount <= bankroll[from])
  1662.    {
  1663.    bankroll[to]=bankroll[to]+(LONG)amount;
  1664.    bankroll[from]=bankroll[from]-(LONG)amount;
  1665.    }
  1666. exeft:
  1667. fixmenu();
  1668. }
  1669.  
  1670. USHORT ran16()
  1671. {
  1672. LONG r, portion;
  1673. portion=134217728;
  1674. r=rand();
  1675. if   (r <= portion)                             return(0);
  1676. if ( (r <= portion*2)   && (r > portion) )      return(1);
  1677. if ( (r <= portion*3)   && (r > portion*2) )    return(2);
  1678. if ( (r <= portion*4)   && (r > portion*3) )    return(3);
  1679. if ( (r <= portion*5)   && (r > portion*4) )    return(4);
  1680. if ( (r <= portion*6)   && (r > portion*5) )    return(5);
  1681. if ( (r <= portion*7)   && (r > portion*6) )    return(6);
  1682. if ( (r <= portion*8)   && (r > portion*7) )    return(7);
  1683. if ( (r <= portion*9)   && (r > portion*8) )    return(8);
  1684. if ( (r <= portion*10)  && (r > portion*9) )    return(9);
  1685. if ( (r <= portion*11)  && (r > portion*10) )   return(10);
  1686. if ( (r <= portion*12)  && (r > portion*11) )   return(11);
  1687. if ( (r <= portion*13)  && (r > portion*12) )   return(12);
  1688. if ( (r <= portion*14)  && (r > portion*13) )   return(13);
  1689. if ( (r <= portion*15)  && (r > portion*14) )   return(14);
  1690. if ( (r <= 2147483647)  && (r > portion*15) )   return(15);
  1691.  
  1692. return(99);
  1693. }
  1694.  
  1695. VOID shuffle(deck)
  1696. USHORT deck;
  1697. {
  1698. USHORT iter;
  1699. USHORT verify[16];
  1700. USHORT card, k;
  1701. BOOL tryagain;
  1702.  
  1703. for  (iter=1; iter<16; iter++)  verify[iter]=99;
  1704.  
  1705. k=0;
  1706. verify[0]=ran16();
  1707.  
  1708. doitagainshuff:
  1709. tryagain=FALSE;
  1710. card=ran16();
  1711. for  (iter=0; iter<16; iter++)
  1712.    {
  1713.    if (card == verify[iter])
  1714.       {
  1715.       tryagain=TRUE;
  1716.       iter=17;
  1717.       }
  1718.    }
  1719. if (tryagain)  goto doitagainshuff;
  1720. verify[k++]=card;
  1721. tryagain=FALSE;
  1722. if (k < 16) goto doitagainshuff;
  1723.  
  1724. for  (iter=0; iter<15; iter++)  cards[deck][iter]=verify[iter];
  1725. }
  1726.  
  1727. USHORT getchancecard()
  1728. {
  1729. USHORT cardout;
  1730. USHORT iter;
  1731.  
  1732. pickcard:
  1733. for (iter=0; iter<16; iter++)
  1734.    {
  1735.    if (cards[0][iter] != 99)
  1736.       {
  1737.       cardout=cards[0][iter];
  1738.       cards[0][iter]=99;
  1739.       iter=17;
  1740.       return(cardout);
  1741.       }
  1742.    } 
  1743. shuffle(0);
  1744. goto pickcard;
  1745. return(0);
  1746. }
  1747.  
  1748. USHORT getchestcard()
  1749. {
  1750. USHORT cardout;
  1751. USHORT iter;
  1752.  
  1753. pickcard:
  1754. for (iter=0; iter<16; iter++)
  1755.    {
  1756.    if (cards[1][iter] != 99)
  1757.       {
  1758.       cardout=cards[1][iter];
  1759.       cards[1][iter]=99;
  1760.       iter=17;
  1761.       return(cardout);
  1762.       }
  1763.    } 
  1764. shuffle(1);
  1765. goto pickcard;
  1766. return(0);
  1767. }
  1768.  
  1769. USHORT counthouses()
  1770. {
  1771. USHORT iter;
  1772. USHORT total=0;
  1773.  
  1774. for  (iter=0; iter<40; iter++)
  1775.    {
  1776.    if (owner[iter] == nowrolling)
  1777.       {
  1778.       if (numhouses[iter] < 5)  total=total+numhouses[iter];
  1779.       }
  1780.    }
  1781. return(total);
  1782. }
  1783.  
  1784. USHORT counthotels()
  1785. {
  1786. USHORT total=0;
  1787. USHORT iter;
  1788.  
  1789. for  (iter=0; iter<40; iter++)
  1790.    {
  1791.    if (owner[iter] == nowrolling)
  1792.       {
  1793.       if (numhouses[iter] == 5)  total=total++;
  1794.       }
  1795.    }
  1796. return(total);
  1797. }
  1798.  
  1799. USHORT rolldie()
  1800. {
  1801. LONG r;
  1802.  
  1803. r=rand();
  1804. if   (r <= 357913941)                          return(1);
  1805. if ( (r <= 715827882)   && (r > 357913941) )   return(2);
  1806. if ( (r <= 1073741823)  && (r > 715827882) )   return(3);
  1807. if ( (r <= 1431655765)  && (r > 1073741823) )  return(4);
  1808. if ( (r <= 1789569706)  && (r > 1431655765) )  return(5);
  1809. if ( (r <= 2147483647)  && (r > 1789569706) )  return(6);
  1810. return(0);
  1811. }
  1812.  
  1813. VOID rolldice()
  1814. {
  1815. dice0=rolldie();
  1816. dice1=rolldie();
  1817. drawdice();
  1818. }
  1819.  
  1820. VOID roll()
  1821. {
  1822. if (trieddoubles)
  1823.    {
  1824.    trieddoubles=FALSE;
  1825.    goto updateturn;
  1826.    }
  1827. if  (isinjail[nowrolling])
  1828.    {
  1829.    DisplayBeep(screen1);
  1830.    goto exroll;
  1831.    }
  1832. if (jaildoubled)
  1833.    {
  1834.    doublesrolled=FALSE;
  1835.    goto moveit;
  1836.    }
  1837. if (trydoublethrice)
  1838.    {
  1839.    trydoublethrice=FALSE;
  1840.    goto moveit;
  1841.    }
  1842.  
  1843. rolldice();
  1844. dicecup(TRUE);  /*  show dice  */
  1845. if (dice0 == dice1)
  1846.    {
  1847.    doublesrolled=TRUE;
  1848.    numdoubles++;
  1849.    if (numdoubles == 3)
  1850.       {
  1851.       sendtojail();
  1852.       goto updateturn;
  1853.       }
  1854.    }
  1855. moveit:
  1856. jaildoubled=FALSE;
  1857.  
  1858. movetoken();
  1859. if ( (doublesrolled) && (!isinjail[nowrolling]) )
  1860.    {
  1861.    doublesrolled=FALSE;
  1862.    if (!notplaying[nowrolling])  goto exroll;
  1863.    }
  1864.  
  1865. updateturn:
  1866. /*  following advances player turn counter  */
  1867. numdoubles=0;
  1868. doublesrolled=FALSE;
  1869. jaildoubled=FALSE;
  1870. trieddoubles=FALSE;
  1871. trydoublethrice=FALSE;
  1872. if (ntp > 1)
  1873.    {
  1874.    switch (nowrolling)
  1875.       {
  1876.       case 0:
  1877.              nowrolling=1;
  1878.          break;
  1879.       case 1:
  1880.              nowrolling=2;
  1881.          break;
  1882.       case 2:
  1883.              nowrolling=3;
  1884.          break;
  1885.       case 3:
  1886.              nowrolling=0;
  1887.       }         
  1888.    } 
  1889. if (notplaying[nowrolling])
  1890.    {
  1891.    if (ntp == 1)  goto exroll;
  1892.    if (ntp != 1)  goto updateturn;
  1893.    }
  1894. if  (nowrolling == 0)
  1895.    {
  1896.    cname.FrontPen=25;
  1897.    cname.IText=&name0[0];
  1898.    }
  1899. if  (nowrolling == 1)
  1900.    {
  1901.    cname.FrontPen=26;
  1902.    cname.IText=&name1[0];
  1903.    }
  1904. if  (nowrolling == 2)
  1905.    {   
  1906.    cname.FrontPen=27;
  1907.    cname.IText=&name2[0];
  1908.    }
  1909. if  (nowrolling == 3)
  1910.    {
  1911.    cname.FrontPen=28;
  1912.    cname.IText=&name3[0];
  1913.    }
  1914. writeyourturn();
  1915. exroll:
  1916. fixmenu();
  1917. dicecup(FALSE);
  1918. }
  1919.  
  1920.