home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 46 / 046.d81 / mcard (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  37.4 KB  |  1,214 lines

  1. 1 poke650,64:printchr$(142):goto9630
  2. 2 sys49236:return
  3. 3 n=fnb(k):t=peek(b+10+k):m=fnv(k):q=peek(964+k):pr=peek(984+k):t2=13-peek(c+k):return
  4. 4 fort=1to99:next:return
  5. 5 fort=1to2500:next:return
  6. 7 iftb>zthenifnot((z=3orz=4)andtb<8)thenz=tb
  7. 8 goto3532
  8. 9 x=c%-(13*(d-1))+1:return
  9. 10 gosub49:kx=t+k:kc=fnb(k):kd=fnv(k):gosub18:ky=t+k:dx=peek(853+k)
  10. 12 e=peek(849+k):pr=peek(980+k):q=peek(960+k):jm=peek(839+k):return
  11. 15 t=49700+(u-1)*17:return
  12. 17 t=.-(u>.)*(6+(u-1)*8):return
  13. 18 t=abs(3-u)*2+968:return
  14. 19 ws=ps:gosub8500:r=w+s:return
  15. 20 poke53281,1:poke53280,6:return
  16. 21 sys49623:return
  17. 22 g=t%-(ws-1)*13+1:gosub23:sys50427:z=peek(896):return
  18. 23 poke899,t%:poke900,ws*13+1:return
  19. 24 u=fnq(gb):gosub63:return
  20. 26 x=fnq(z):ifzthenprint"[144]";:ifx=2orx=3thenprint"";
  21. 27 return
  22. 28 u=fnz(u):gosub30:return
  23. 30 v=b:gosub15:b=t:return
  24. 31 printtab(11):gosub33:gosub92:gosub87:return
  25. 33 print"  [144][216][218]  ";:return
  26. 34 gosub35:sys51061:y=peek(898):return
  27. 35 sys51192+(k-1)*11:poke897,x:return
  28. 36 gosub38:poke900,k*13+1:poke899,y
  29. 37 sys50435:w=peek(896):return
  30. 38 poke898,1:poke897,3:return
  31. 39 j=.:gosub2:sys49353:x=13:t=49582:e=49500+(u-1)*x:ifr(.)=1andb%<>2thenreturn
  32. 40 form=4to1step-1:gosub56:s=x*(m-1):print:printtab(o)z$(m)" [144]";
  33. 41 d=.:ifj<xthend=peek(e+j):ifd=.then45
  34. 42 ifd<=sthen46
  35. 43 pokea+4,129:ifpos(.)>o+xthenprintchr$(x);:printtab(o+3);
  36. 44 poket,d-s:syst+20:pokea+4,128
  37. 45 j=j+1:ifj<xthen41
  38. 46 next:gosub2:return
  39. 49 t=972-abs(u-3)*2:return
  40. 50 u=op:gosub148:gosub31:printtab(9)" is dealing the hand ":gosub143:return
  41. 51 gosub2:pokea+24,15:return
  42. 52 poke198,.:return
  43. 53 gosub35:sys51788:y=peek(898):return
  44. 55 gosub340:m=s
  45. 56 printchr$(144+116*(m=2orm=3));:return
  46. 57 x=u:gosub53:gosub36:return
  47. 58 ifmstheno=ms+4:gosub181
  48. 59 return
  49. 60 print"";:ifdn=.thenprint:return
  50. 61 print" "z$(5+dn):return
  51. 62 print"";:poke214,y-1:print:return
  52. 63 gosub99:printchr$(31-q);:return
  53. 65 pokex,peek(x)orfnx(k):return
  54. 66 gosub67:goto8
  55. 67 q=.:x=fnq(gb):iffnq(o)=.then71
  56. 68 q=int(o/5)*5:o=o-q:ifo>xthenz=((int(gb/5)*5)+o)+q:return
  57. 69 z=((int(gb/5)+1)*5)+o:ifqthenz=z+q
  58. 70 return
  59. 71 ifx=.thenz=gb+5+o:return
  60. 72 z=((int(gb/5)+1)*5)+o:return
  61. 73 l=gb:gosub201:pl=y:gosub209:return
  62. 74 gosub157:goto158
  63. 76 q=.:iftrtheniffnb(tr)+peek(c+tr)<13thenreturn
  64. 77 forj=1to4:iffnb(j)theniffnb(j)+peek(c+j)=13thenifj<>trthenq=1
  65. 78 next:return
  66. 79 d=.:ifmsthenifkx>21orkx=14orkx=15thenifkc>6or(ms>2andkc>5)thend=1
  67. 80 return
  68. 81 gosub52:gosub967:return
  69. 82 u=pl:gosub99:pokec+5+q,peek(c+5+q)+14-peek(c):pokec,13:fx=99:return
  70. 83 gosub955:gosub55:poke49582,c%-(m-1)*13:printz$(m);:sys49581:gosub315:return
  71. 84 t=49582:poket,y:syst+28:return
  72. 85 sl=99:gosub52:print" new contract[146]  ";:gosub226
  73. 86 gb=z:d=.:print:print" [149]declarer [146]  ";:gosub963:pl=d:dn=.:return
  74. 87 print"  [211][144][193]":return
  75. 90 printspc(2);:foru=5to6:gosub92:next:print"=> *";:return
  76. 91 poke50106,y:y=tb:gosub62:gosub63:gosub17:printtab(o):return
  77. 92 gosub63:gosub17:pokec-19,t:sysc-20:pokec-11,.:return
  78. 95 y=32:gosub91:pokec-19,t:sys50097:gosub143:pokec-11,.:return
  79. 96 x=.:forj=1to4:x=x+peek(i+j):next:sx=r(.)-fx:ifxandx>=sxthenr=.:return
  80. 97 r=sx-x:return
  81. 98 gosub8300:d=.:gosub8360:return
  82. 99 q=(uand1)and1:return
  83. 101 x=1:d=.:t=asc(a$)+128
  84. 102 forl=1to4:ift=asc(z$(l))thenx=.:d=l
  85. 103 next:return
  86. 104 gosub250:ifa$="@"thenprint"[157]"a$:gosub82:x=1
  87. 105 ifa$=chr$(43)thenx=2
  88. 106 return
  89. 107 d=14:gosub108:d=d+(d>.):return
  90. 108 t=49566:poket,d:poke896,asc(a$):syst-1:d=peek(t):return
  91. 109 l=peek(c+tr)+fnb(tr)+fnv(tr):return
  92. 110 gosub776:tb=(t*(30+10*(f=1orf=2))-10*(f=.))*2^dn:return
  93. 113 tb=.:ifpb=.orpb>35thenreturn
  94. 114 x=gb:gb=pb:gosub110:gb=x:return
  95. 115 l=49271:x=a+14:pokex+5,48:pokex+6,170:y=6-u
  96. 116 forj=ytoy-1step-1:pokex,peek(l+5+j):pokex+1,peek(l+j):pokex+4,33:gosub4:pokex+4,32:next:return
  97. 117 gosub110:f=(deand1)and1:iftb+c%(3+f)<100orc%(5+f)=.then8
  98. 118 gosub121:ifythenifgb<11oro>fnq(gb)then4396
  99. 119 goto8
  100. 120 a%=1:poke51578,0:gosub2107:gosub955:goto827
  101. 121 y=.:s=peek(b+15):f=peek(b+16):ifstheno=s:y=1:iffthenifpeek(b+s)>3ands>2thenreturn
  102. 122 ifftheno=f:y=1:ifsthenifpeek(b+f)<5or(peek(b+s)>=peek(b+f)andfnb(s)>6)theno=s
  103. 123 return
  104. 132 gosub30:gosub981:return
  105. 133 x=.:ifgc=.or(gc=2andde=.)thenifu=dboru=plthenx=1:return
  106. 134 ifgc=2thenifde=1thenifu=4thenx=1:return
  107. 135 ifgc=4thenif(de=.and(u=2oru=4oru=1))or(deand(u=1oru=3oru=4))thenx=1
  108. 136 return
  109. 137 x=.:ifgc=.orgc=4thenreturn
  110. 138 ifde=1thenifu=dboru=plthenx=1
  111. 139 return
  112. 140 gosub955:poke900,6-(uand1):sys51538:gosub827:sys51522:return
  113. 141 gosub2000:gosub83:return
  114. 142 sys51504:return
  115. 143 gosub51:gosub115:gosub2:return
  116. 146 gosub51:pokea+1,y:pokea+5,43:pokea+15,5:pokea+4,20:pokea+4,21:return
  117. 148 y=9:gosub62:return
  118. 149 ms=.-(wt=leorwt=pb):return
  119. 151 gosub155:sys49803:gosub152:return
  120. 152 c%=peek(l-2):d=peek(l+2):return
  121. 153 gosub155:poke49900,t%:sys49903:gosub152:return
  122. 155 gosub205:pokel+1,12+(u-1)*13:return
  123. 156 gosub205:pokel+1,(u-1)*13:return
  124. 157 gosub156:sys50003:gosub152:return
  125. 158 poke49500+peek(49801),.:return
  126. 162 ifzandz<36thengosub26:poke49582,int((z-1)/5):sys49581:printz$(fnq(z));:return
  127. 163 printz$(5-1*(z=36)-2*(z=37));:return
  128. 164 gosub5:gosub300:print"":gosub776:s=peek(c+5+(pland1))-6-t
  129. 168 gosub894:ifs>=.thenprint"  overtricks [146][144]"s:goto170
  130. 169 print"  down [146][144]"abs(s)
  131. 170 pokec,.:gosub52:print"[149]  deal hand again? ";:gosub90:gosub967:a%=.:yx=.:ifu=5then184
  132. 172 ifcithen908
  133. 173 ifgbthenifb%=.andgcthenon1+yxgoto439,438
  134. 174 op=fny(op):print"[147]":goto9651
  135. 175 gosub180:print"[147]":goto1005
  136. 180 print" ";:u=op:gosub92:print"[149] dealt.  who opens? [146]  ";:gosub963:op=d:return
  137. 181 ifms<>psandms<>prthenifpeek(b+ms)<5thenreturn
  138. 182 ifpeek(b+o)>4thendb=db+1+((peek(b+o)-5)*2)
  139. 183 w=v+db:return
  140. 184 print"  rebid hand? ";:gosub90:gosub81:ifa$="n"thenpokec,99:goto1005
  141. 185 ifgc=4thenpokec,98
  142. 186 ifcithengc=2:b%=.
  143. 187 goto175
  144. 188 gosub73:goto219
  145. 190 gosub370:gosub400:return
  146. 191 forj=1to4:iffnb(j)=.andj<>sxthenx=x+1
  147. 192 next:return
  148. 193 wt=u:t%=c%:gosub340:sl=s:gosub400:ws=sl:return
  149. 194 gosub212:n=.:k=tr:gosub12:t=960:ifhp<3thengosub470:poke861,.-(t2>.orq>=jm-x)
  150. 195 fork=1to4:h=peek(b+k):y=.:ifmbork=trthenh=peek(t+k):y=1
  151. 196 ifhthenifh>=fnc(k)or(peek(861)andh>=peek(839+k))thenh=fnb(k):ifythenh=peek(t-4+k)
  152. 197 poke849+k,.-(peek(t-4+k)>h)*(peek(t-4+k)-h)
  153. 198 ifk=trtheniffnb(k)theniffnv(k)thengosub631:poke864,l*fnz(u)+(1-l)*u
  154. 199 ifk<>trthenift2=.andpeek(861)=.theny=peek(843+k):ifh>ythenn=n+h-y:h=y
  155. 200 pokei+k,h:next:poke870,n:return
  156. 201 d=2:x=fny(op):ifde=oporde=fnz(op)thend=1:x=op
  157. 203 forj=dtoestep2:z=peek(i+j):ifzandz<36theniffnq(l)=fnq(z)theny=x:j=e
  158. 204 x=fnz(x):next:return
  159. 205 l=49800:pokel,k:return
  160. 206 dx=.:ifsx=.orsx=5thenreturn
  161. 207 l=sx:gosub201:ifu=ythengosub58:dx=w:return
  162. 208 ws=sx:gosub8500:dx=w+s:return
  163. 209 le=fny(pl):db=fny(le):pb=fny(db):tr=fnq(gb):return
  164. 210 x=.-(peek(998)=kandu=peek(997)):return
  165. 212 poke860,.:poke864,.:gosub18:n=t:pokev,.:pokeb,.:gosub49
  166. 213 forj=1to4:pokev+j,peek(n+j):pokev,peek(v)+peek(n+j):pokeb+j,peek(t+j):pokeb,peek(b)+peek(t+j):next
  167. 214 d=4:poke899,u:poke900,fnz(u):sys52127:gosub28:gosub374:mb=g:poke859,q
  168. 215 gosub28:v(.)=.:gosub374:yx=g:poke865,q:sys52545:pokev+9,peek(898):pokeb+9,peek(899):return
  169. 219 ifcithengosub896
  170. 221 gosub1700:forj=.to4:v(j)=.:next:g=.:poke51578,32:gosub775
  171. 222 ifpeek(c)<>99andgc=4thenifpl=2orpl=3thenu=pl:print"[147]":gosub1070:o=5:gosub30:gosub1080
  172. 223 sysc+20:sl=.:gosub891:gosub510:goto9000
  173. 225 gosub52:gosub901:print"  ";
  174. 226 gosub250:ifsl>98then235
  175. 227 ifa$="@"thenprint"[157][157]";:goto3534
  176. 228 ifa$=chr$(43)thengosub63:print"[157]->[146] ";:gosub259:gosub5:goto245
  177. 230 ifa$="p"ora$="d"ora$="r"thengosub257:goto243
  178. 235 d=7:gosub108:ifd=.then226
  179. 239 h=val(a$):print"[157][144]"a$;" ";
  180. 240 gosub250:ifa$=chr$(20)thenprint"[157][157]  [157]";:goto226
  181. 241 d=.:gosub254:ifd=.then240
  182. 242 print"[157]";:z=(h-1)*5+d:gosub26:printz$(fnq(d));
  183. 243 ifsl<98then3590
  184. 244 return
  185. 245 gosub901:print"       ";:z=yx:goto225
  186. 250 geta$:ifa$=""thenprint"[157][144][191]";:gosub4:print"[157][146][191]";:gosub4:goto250
  187. 251 return
  188. 254 gosub101:ifx=.thenreturn
  189. 255 ifa$="n"thend=5
  190. 256 return
  191. 257 z=.-36*(a$="d")-37*(a$="r")
  192. 259 print"[157][144]";:gosub162:return
  193. 266 x=.:iftrthenif(fnx(k)andv(pl))orfnb(k)+fnv(k)=13-peek(c+k)thengosub109:ifl<13thenx=1
  194. 267 return
  195. 268 x=1:gosub34:if(yand1)=.or((uand1)>.andpeek(kx)>.)thenreturn
  196. 269 poke998,sl:y=u:ifuand1theny=fny(fnz(u))
  197. 270 x=879-(y=pb):k=sl:gosub65:return
  198. 271 x=peek(879-(fny(u)=pb))andfnx(k):return
  199. 272 x=peek(879-(fny(u)=le))andfnx(k):return
  200. 274 gosub15:y=peek(t)+peek(t+9):return
  201. 275 foru=1to4:o=4:ifu>2theno=21:ifu=3thenprint"[145][145][145][145][145][145][145][145][145][145][145][145][145]"
  202. 276 gosub1082:next:print:return
  203. 283 gosub28:gosub153:gosub28:return
  204. 284 print"[147]   [149]e[146]nter h[146]and ";
  205. 285 print"  [ *=suit  f1=menu ]":return
  206. 290 print""tab(14):gosub907:ifb%thengosub292:return
  207. 291 foru=1to4:gosub981:gosub95:gosub956:next:return
  208. 292 foru=1to4:gosub30:gosub981:gosub95:gosub39:gosub956:next:return
  209. 294 gosub146:gosub5:gosub2:return
  210. 299 h=int(h/2)+1:return
  211. 300 gosub24:print"[147]     contract[146] ";:z=gb:gosub162:gosub60:print"[149]";
  212. 301 print"     declarer[146] ";:u=pl:gosub92:gosub307:return
  213. 302 print"[144]"tab(165)peek(c+5)spc(2)peek(c+6):return
  214. 307 ifgcthengosub99:ifc%(5+q)thenprint"(v)";
  215. 308 print:return
  216. 313 gosub51:pokea+1,9:pokea+5,10:pokea+15,88:pokea+4,23:gosub4:gosub2:return
  217. 314 gosub51:m=1:d=12:gosub2102:gosub2:return
  218. 315 gosub99:onq+1gosub313,314:return
  219. 316 gosub51:pokea+5,20:pokea+6,175:pokea+4,33:pokea+1,40+rnd(1)*m:gosub4:pokea+4,32:gosub2:return
  220. 317 pz=.-2*(t=5or(t>8andt<12)or(t>16andt<24)):return
  221. 334 y=.:l=fny(u):ifv(4+l)=16andv(4+fnz(l))=16thenreturn
  222. 335 t%=1:x=fnx(s):if(v(4+l)andx)or(v(4+fnz(l))andx)theny=1
  223. 336 return
  224. 340 s=int((c%-1)/13)+1:return
  225. 341 x=.:ifz<36thenx=fnq(z):ifxthenx=fnx(x)
  226. 342 ifv(u+4)=16thenv(u+4)=x:return
  227. 343 v(u+4)=v(u+4)orx:return
  228. 349 pz=peek(kx)+1:ifpeek(kx)=kcthenpz=.:return
  229. 350 gosub361:d=k:gosub9:if(pz=.anddx=4andw=2andx>9)or(peek(863)andfnx(k))thenpz=2
  230. 351 ifpz=2thenifr>1andkc>2andkd>1thenifpeek(ky)=.andpeek(kx)=1andjm>2thengosub357
  231. 352 return
  232. 353 pz=.:ifq=peek(kx)then349
  233. 354 ifq=1thengosub540:iff=.thenreturn
  234. 355 ifpeek(kx)then349
  235. 356 pz=1:gosub361:return
  236. 357 gosub540:ifp=1thenpz=3:gosub513:y=c%:gosub36:ifw>2orc%<t%thenpz=2
  237. 358 return
  238. 361 gosub513:y=c%:gosub36:ifw>1thenpz=.
  239. 362 return
  240. 370 gosub340:iftr=.ortr=slorws=trors<>trthen372
  241. 371 t%=c%:ws=s:wt=u:return
  242. 372 ifs=wsthenifc%>t%thent%=c%:wt=u
  243. 373 return
  244. 374 g=.:q=.:d=.-4*(d=.)
  245. 375 fork=1to4:e=fnx(k):ifpeek(b+k)thenifk<>trandfnv(k)=.thenv(.)=k
  246. 377 iffnv(k)theniftrtheniffnb(tr)andfnb(k)=.thenq=q+e:g=fnx(tr)org
  247. 378 ifpeek(1000+d+k)theng=eorg
  248. 379 next:return
  249. 392 forx=yto7:gosub395:m=29-4*x:d=32-4*x:pokea+24,15:gosub2102:next:return
  250. 393 gosub51:y=2:gosub392:gosub2:gosub4:gosub20:return
  251. 394 x=3:ifpland1thenx=12+pl
  252. 395 poke53280,x:return
  253. 400 d=s:poke900+c%,.:poke976+u,d:ifhp>1andd<>slthenv(u)=fnx(sl)orv(u)
  254. 402 pokec+d,peek(c+d)+1:gosub2326:ifhp>1thenifu=leoru=pbthenifd<>slthengosub2325
  255. 405 ifuand1orb%<>2thenpokeb+d+4,peek(b+d+4)-1:gosub9:ifx>9thenpokeb+10+d,peek(b+10+d)-2^(x-10)
  256. 406 ifhp=4thengosub2312:poke997,fny(u)
  257. 407 ifhp=4andgc=2thenif1andwtthenifws=slandk=wsthengosub2085:ifwthengosub268
  258. 408 return
  259. 410 iffnb(tr)thenifpeek(864)<>uthenreturn
  260. 411 forj=1to4:x=x-(peek(964+j)>.andfnv(j)=1andj<>trand(peek(865)andfnx(j))=.):next:return
  261. 418 l=peek(843+k):z=.-((fnx(k)andv(fny(u)))>.andfnc(k)>.):h=q+35+13*(l-1)+t2*7
  262. 425 ifrorpeek(881)thenh=h-2*h*(peek(858)>.andpeek(864)=fnz(u))-300*(z>.orr(tr)=2)
  263. 426 ifqthenifrthenx=.:gosub410:h=h+5*q+x*3000
  264. 428 ifr=.andt2=.thenifpeek(v+9)andl=.thengosub470:ifz=.andx=.thengosub299
  265. 429 iflthenifprandq=.thenh=h+30*(pr-1):gosub210:ifxthenh=h*2
  266. 430 ift2=.andpeek(864)=.andfnv(tr)=1thengosub561:ifl=.orq=.thenh=14+q
  267. 433 return
  268. 436 x=.:ifpeek(864)=fnz(u)thenifpeek(b+tr)>=fnc(tr)orpeek(v+tr)<fnv(tr)thenx=1
  269. 437 return
  270. 438 gosub73:gosub1700
  271. 439 q=peek(2)and1:c%(1+q)=c%(1+q)+pc:u=pl:gosub99:b=q:k=c%(1+b):ifyxthen452
  272. 440 gosub776:l=c%(5+b):s=peek(c+5+b)-6-t:ifs<.then460
  273. 442 ifgb>25thenx=1+int(gb/31):pc=500*x+(l*250*x):k=k+pc:a$=" slam":gosub1715
  274. 447 ifdnthenk=50+k+((((1+c%(5+b))*100)*s)*dn):goto452
  275. 449 k=k+20*s:iff=.orf>2thenk=k+10*s
  276. 452 c%(1+b)=k:gosub110:c%(3+b)=c%(3+b)+tb:ifc%(3+b)<100then480
  277. 455 c%(5+b)=c%(5+b)+1:ifc%(5+b)=2thenc%(1+b)=c%(1+b)+700-(c%(6-b)*200)
  278. 458 goto480
  279. 460 j=c%(2-b):s=abs(s):ifdnthenj=j+((100*(1+l))*dn)+(((s-1)*(2+l)*100)*dn):goto463
  280. 462 j=j+((50*(1+l))*s)
  281. 463 c%(2-b)=j:goto480
  282. 464 c%(.)=c%(.)+1:printspc(11)" rubber [146]"c%(.)" is over [146]":c%(1)=c%(1)+c%(3)
  283. 465 y=19:gosub294:gosub5:c%(2)=c%(2)+c%(4):forj=3to6:c%(j)=.:next:goto492
  284. 470 x=.:ifpeek(835+k)=.or(fnx(k)andv(fny(u)))or(fnx(k)andv(fny(fnz(u))))thenreturn
  285. 471 ifpeek(843+k)orfnc(k)=2thenx=1
  286. 472 return
  287. 474 j=.:gosub470:ifq>=jm-xthenj=1:ifk=trthenh=42:ifr=.andt2=.thenh=h*2
  288. 475 ifjandk<>trthenifethenh=h+5*x:ift2thenifrande>=rthenh=h*2
  289. 476 ifjthenift2=.andk=trandpeek(kx)=qthenif(peek(858)=.and(kd=.ormb=.))thenh=400
  290. 477 ifrthenift2ork=trthenifdx=4thenifq>=jm-1andfx>.thenife>rand(kd=.ormb=.)thenh=310
  291. 479 return
  292. 480 print"[147]"tab(168):gosub33:print"    score    [146]";:gosub87
  293. 481 print""tab(253):u=1:forn=1to4:u=fny(u):gosub92:printspc(5-(n=2)*21):next:print:gosub2120
  294. 482 print" premium"tab(14)c%(1)tab(24)c%(2):print"":gosub21:print
  295. 483 print" game"tab(14)c%(3)tab(24)c%(4):print:gosub21:print:j=1
  296. 484 print" total"tab(14)c%(3)+c%(1)tab(24)c%(4)+c%(2):print"":gosub485:onjgoto490,464
  297. 485 ifc%(5)=2orc%(6)=2thenj=2:return
  298. 486 poke897,2:poke896,127+c%(5)*19+c%(6)*38:sys49936:return
  299. 490 gosub4:gosub4:ifc%(3+b)>=100thenfort=1to2:c%(t)=c%(t)+c%(t+2):c%(t+2)=.:next
  300. 492 gosub496:goto174
  301. 496 gosub517:sys52624:gosub20:return
  302. 500 gosub1150:on1+peek(i)goto74,718
  303. 507 poke900,k*13+1:poke899,c%:sys50427:x=peek(896):return
  304. 508 gosub157:gosub507:return
  305. 509 v=peek(b):db=peek(b+9):w=v+db:le=peek(b+10):return
  306. 510 pokec,peek(c)+1:r(.)=14-peek(c):return
  307. 513 gosub156:s=.
  308. 514 sys50003:s=s+1:ifs=pzthengosub152:s=.-(c%>t%):return
  309. 515 pokel+1,peek(l+1)+1:goto514
  310. 517 gosub52:gosub51:y=5:gosub392:gosub2:x=1:gosub395:return
  311. 518 t2=.-2*(tr=.orfnc(tr)=.):poke895,abs(fx):return
  312. 525 forj=1to4:ifj=psorj=prorj=mstheny=y-j:x=x+1
  313. 526 next:return
  314. 530 ifroryx=.thenifk<>trtheniffnx(k)andpeek(859)thengosub536
  315. 533 ifrort2or((mbandfnx(k))=.and(peek(859)andfnx(k))=.)thenreturn
  316. 534 iffnb(tr)=.thenifyxor(peek(861)andfnv(tr)-peek(v+tr)+peek(v)>=r(.)-fx)thenx=1
  317. 535 return
  318. 536 ifqthengosub410:gosub561:x=.-((peek(843+k)=.andx=.andt2=.andl=.)orpeek(864)=fnz(u))
  319. 538 ifq=.andpr<2thengosub210:x=1-x:ifx=.thenifpr=.thenx=1
  320. 539 return
  321. 540 f=.:p=.:poke893,.:x=3:ifq>1orq>=jmthenreturn
  322. 542 gosub1450:iffnv(k)>1thenifp>1orpeek(893)thenf=peek(893)+2*p-1
  323. 543 return
  324. 550 gosub564:ifsthenh=h*3:ifk=trthenpoke860,1:h=h*2
  325. 551 ifkc>2andpr=.thenifjm>2andr>1thenifdx=4ork=trthengosub556
  326. 552 return
  327. 556 x=3:gosub34:ify<>fnz(u)thenreturn
  328. 557 x=4:gosub34:if(yand1)=.thenx=5:gosub34:ify=fnz(u)thenh=225:x=863:gosub65
  329. 558 return
  330. 559 s=fnx(k):poke999,.-fnz(u)*(peek(871)>.and(peek(862)ands)=.and(peek(kx)<kcormb=s)):goto582
  331. 561 l=.-(fnc(tr)=peek(964+tr)):return
  332. 564 s=.:ifr=.orfx<1ordx<>4orjm<3orkd<2orkc<2ore=1orpeek(kx)<>1thenreturn
  333. 565 gosub540:ifpeek(893)thenifmb+(peek(858)>.)*fnx(tr)=.orp=1thens=1
  334. 566 return
  335. 570 k=sl:ifhp=4orpeek(999)=uthenifpeek(b+k)=kcthenifkdthenife=.thenifkc<=kdthen74
  336. 572 gosub153:ifdthen158
  337. 580 k=sl
  338. 582 gosub151:ifdthen158
  339. 586 gosub1350:ifk<>trorr(k)=1then582
  340. 590 gosub10:gosub675:ifx=3then603
  341. 596 ifv(fnz(fny(u)))andfnx(sl)theniffnc(sl)then601
  342. 599 ifpeek(881)andhp<4thenifpeek(b+k)thengosub1510:ifpeek(881)then74
  343. 600 ifhp<4theniffnb(k)>1thengosub610:ifx=2then605
  344. 601 gosub675:onxgoto582,158
  345. 603 r(k)=1:gosub1331:goto582
  346. 605 pz=2:ifpeek(kx)thenifpeek(kx)+peek(ky)>fnc(tr)or(fx=.andq>jm)then74
  347. 606 ifpeek(kx)thengosub349:ifpz=.thenpz=2
  348. 607 ifws=trthengosub513:ift%>c%then74
  349. 608 goto613
  350. 610 x=.:l=v(fny(u)):if(fnx(sl)andl)orfnc(sl)=.thenx=1:ift2=.and(landfnx(tr))=.thenx=2
  351. 611 return
  352. 613 gosub513:gosub158:return
  353. 615 z=.:d=.:m=b:n=v:iffnv(k)>fnb(k)thenm=v:n=b
  354. 617 fork=1to4:ifk=trthen619
  355. 618 gosub10:s=peek(m+k+4)-peek(n+k+4):gosub624:ifs>.thenifethenifjm>qthengosub621
  356. 619 next:k=tr:gosub10:ifdthenpoke858,d:ifd<peek(n+k+4)thenpoke858,.
  357. 620 poke867,.-(z>.)*z:return
  358. 621 ifq=1ande>1thengosub540:iffthenifp>1thene=e-p+1:ife<1orp>fnc(k)thene=1
  359. 622 ifq=.ande>1thenifpr>1thene=e-pr+1:ife<1orpr>fnc(k)thene=1
  360. 623 d=d+s+(s>e)*(s-e):return
  361. 624 z=z-(s>.ande>.)*s+(e=.)*abs(s):return
  362. 625 x=.-(t2or((peek(864)orfnb(tr)=.)andpeek(861)andfnv(tr)-peek(v+tr)+peek(v)<r(.)-fx)):return
  363. 626 x=.:y=peek(b+tr)+peek(v+tr)-peek(960+tr):n=peek(867):ify=.thenreturn
  364. 627 if(n>=yandy>=r(.)-fx-peek(960+tr))or(r>.andy>=randn>=r)thenx=1
  365. 628 return
  366. 631 l=.:f=fnb(k):iffnv(k)=<fthenf=fnv(k):l=1
  367. 632 return
  368. 638 x=db:gosub1480:j=y:x=u:gosub53:x=.-(j>y):return
  369. 642 gosub785:gosub507:gosub1490:ifc%<t%thenonms+1goto717,718
  370. 644 gosub784:ifdthenx=u:gosub53:on2+(y=c%)goto655,158
  371. 645 gosub638:ifxthen718
  372. 646 s=.:pz=p+1:gosub783:gosub514:e=c%:gosub787:gosub1460
  373. 647 ifdthenifms=.ore>t%thenifpz=2andy<>c%andc%>t%then158
  374. 648 ifms=.andw<=2thenon1+(hp=2)*(n>=mork=tr)goto717,718
  375. 652 if(hp=3andms=.)or(hp=2and(v(fnz(u))andfnx(k))>.)then717
  376. 653 goto718
  377. 655 iffxandq=1thengosub1150:ifpeek(i)then718
  378. 656 goto158
  379. 660 gosub266:iftr=.or(x=.and(m>.orfnv(tr)=.))thenmb=mb-(tr>.)-q*(tr=.)
  380. 661 ifmb>fxthenh=200:return
  381. 665 gosub1150:ifpeek(i)or(q=1andpeek(c+k)<2)thenh=12-m
  382. 666 return
  383. 667 gosub631:l=.-l*(peek(ky)>.andq>f):ifhp=2andl=.thenifpeek(ky)thengosub803:iffthenn=1
  384. 668 return
  385. 670 ifmthengosub689:x=c%:gosub283:ifabs(x-c%)=1orfthen580
  386. 671 goto613
  387. 675 x=1:ifws<>trthenreturn
  388. 676 gosub153:x=3-d:return
  389. 683 gosub688:gosub631:ift2=.orrthenreturn
  390. 684 h=h-(90-(s=.)*20)*((q>fandpeek(ky)>.)or(peek(i+k)>kcandpeek(1000+k)=.)):return
  391. 688 x=fnz(u):gosub1480:gosub36:s=w:gosub57:l=.-(s=w):return
  392. 689 y=c%:gosub36:s=w:x=fnz(u):gosub53:gosub36:f=.-(s=w):return
  393. 690 if(r=.andpeek(861))or(k=trandps=fxand(ps>=peek(956+k)orr-peek(870)>e))thenreturn
  394. 692 ifpr<2orps>=peek(956+k)or(yx=.andkd<2)then872
  395. 693 h=31+pr-9*(peek(ky+20)>.):ifdx<4andk<>trthenreturn
  396. 694 h=h*2:gosub210:y=.-(pr-1)*(pr<=e)-(e-1)*(pr>e)
  397. 695 ifrthenifxory>=ror(y+1>=jmande>=pr)thenift2orpeek(843+k)>1ork=trthenh=188
  398. 696 h=h-(k=tr):return
  399. 700 dx=.-(fny(u)=db):poke893,u:sys51309:ifsl=.then1250
  400. 701 gosub7220:ifxthen718
  401. 702 k=sl:gosub22:gosub3:gosub149:ifn=.then725
  402. 703 gosub153:ifd=.then718
  403. 704 ifhp<4thenif(fnx(k)andv(fny(u)))or(dxandm=.)thengosub266:goto765
  404. 705 onhpgoto1,706,740,760
  405. 706 ifdxthen642
  406. 708 gosub157:gosub1465:e=w:gosub786:ifpz>1thenife<2orpz>ethengosub513:on1+sgoto717,158
  407. 709 ifq=1then500
  408. 710 ifk<>trandhp=2thenif(fnx(k)andv(fnz(u)))>.orn=t2then74
  409. 711 ife=.orpr>1or(g=11andt=5)or(g=12andt>9)then74
  410. 712 ifhp=2anddx=.andk<>trthenifg>9andpeek(v+k+10)=.thenifm+2>=nthen717
  411. 713 ifhp=2andq=.thenifpr=.or(pr=1and(n>=mork=tr))then718
  412. 715 ifg<10thenift<4ort=6ort=7or(hp=3andpeek(c)=1)then74
  413. 716 gosub317:ifpzthengosub513:ifsthen158
  414. 717 gosub153:ifdthen158
  415. 718 k=sl:gosub508:gosub1495:ifp=fnb(k)then74
  416. 720 gosub151:ifdthen158
  417. 725 gosub1300:ifk<>trorr(k)=1then720
  418. 726 gosub675:on2+(hp=4orx=3)goto732,729
  419. 727 if(zandhp=2)or(msandhp=3)then735
  420. 728 gosub3:on2+(t=.orpr>1or(t<16andn<3))goto74,732
  421. 729 ifdxtheniffnv(tr)andfnv(sl)=.thengosub784:ifx=1or(x=2andc%>t%)thenond+1goto727,158
  422. 730 ifdx=.thenk=sl:gosub266:k=tr:ifxthen736
  423. 731 ifdx=.thenifws<>trthenk=sl:gosub266:k=tr:gosub3:ifxthenift=.orn<3then74
  424. 732 gosub675:onxgoto582,158
  425. 735 r(k)=1:gosub1331:goto720
  426. 736 ifhp<3andfnv(sl)<13-peek(c+sl)thengosub1460:ifwthen735
  427. 737 gosub3:gosub508:ifq=.thenifx=nandn>1then735
  428. 738 goto731
  429. 740 ifpeek(c)=1andtr=.thenifu=pbandn=2theniffnv(k)<3then74
  430. 741 ifdxorms=.then706
  431. 743 gosub1460:e=w:gosub1465:h=e-w:ife=.thengosub76:onq+1goto718,74
  432. 752 ife=1andq=1andfx>.thenif(mandn>=m)or((tr=.orm>.)andg>10andpeek(c+k)<4)then718
  433. 754 gosub786:ifpz>1andx<3thenifx=1or(e>1andx=2)thengosub513:ifsthen158
  434. 755 ifq=1then500
  435. 756 ifpr=1thenifn>mandk=trthen718
  436. 757 gosub157:gosub1465:ifw=.orh>2or(g<9and(h>.ore>1))then74
  437. 758 goto718
  438. 760 ifmsthengosub76:onq+1goto720,717
  439. 761 iffxanddx=.thenifq=1andn<mthengosub1460:ifw=.thenx=2:gosub1490:ifp>1then718
  440. 762 goto717
  441. 765 ifhp=2thenif(fnx(k)andv(fnz(u)))ortr=.or(dxandfnv(tr)=.)or(x=.anddx=.)then717
  442. 766 ifhp=3andms=.then717
  443. 767 ifhp=2theny=fny(fnz(u)):if(y=peek(997)andpeek(976+y)=k)or(m=.anddx=.)orz=1then717
  444. 768 ms=1:onhp-1goto718,760
  445. 775 gosub776:fx=7-t:return
  446. 776 t=int(gb/5)+1:f=fnq(gb):t=t+(f=.):return
  447. 780 x=.-(sx>.andsx<5andps<>sx):return
  448. 783 gosub205:pokel+1,(db-1)*13:return
  449. 784 gosub785:gosub787:return
  450. 785 gosub783:sys50003:gosub152:return
  451. 786 gosub508:poke896,u:p=db:gosub1455:pz=peek(893):return
  452. 787 poke49900,c%:gosub155:sys49903:gosub152:return
  453. 790 h=99:ifms=.or(zandhp<4anddx=.)thenreturn
  454. 791 ifhp=4ordx=.then795
  455. 792 iffnv(ws)thenk=ws:gosub785:k=tr:ifc%<t%then798
  456. 793 iffnv(ws)=.thengosub638:ifxorfnv(tr)=.thenh=1:ifx=.then798
  457. 794 return
  458. 795 ifhp<4thenifz=.thenh=1:return
  459. 798 gosub76:ifq=.thenh=1
  460. 799 return
  461. 800 gosub28:ps=.:ifkdthenifpeek(kx)andpeek(984+k)=1thengosub540:ps=f
  462. 801 ifpsthenx=871:gosub65:ifmbandk=trthenifp+1>=jmthenh=11
  463. 802 gosub28:return
  464. 803 ifror(k=trandt2=.)thengosub540:iffthengosub1110
  465. 804 ifrtheniff=.andq=2andjm>2thenx=4:gosub542:f=.-f*(peek(kx)=.orpeek(893)>.):iffthengosub1110
  466. 805 iffthenx=862:gosub65:ifk=trthenpoke860,1:h=h*2
  467. 806 return
  468. 808 iftrthenifrandk<>trthenifkdandkc<>kdthengosub920
  469. 809 return
  470. 810 gosub610:ifx<2theniffnv(ws)thens=k:k=ws:gosub283:k=s:ifdthenifpeek(v+ws)orx=1thenh=1
  471. 811 ifrandpeek(864)=uandh=1thengosub28:gosub436:gosub28:ifxthenifpeek(849+ws)thenh=40
  472. 812 iffnv(tr)andfnv(ws)=.thengosub436:ifxthenh=1
  473. 813 return
  474. 815 ifmsorpeek(999)=uthenreturn
  475. 816 gosub2085:ifhp=4or(t2andw=.)thenh=1:return
  476. 818 gosub610:gosub561:ifx=1or(w=.and(x=.or(x=2and(q<jm+1orl>.))))thenh=1:return
  477. 820 ifrandw=1thenifpeek(881)=.thenif(fnx(ws)andv(4+fny(u)))=.thengosub853
  478. 821 return
  479. 827 gosub52:x=.:print"  [157]";:ifb%<>2thenifsltheniffnb(sl)thend=sl:goto830
  480. 828 gosub104:onxgoto106,120:ifa$=chr$(133)thensys53125:print"[157]";:goto827
  481. 829 x=.:gosub101:ifxor(b%<>2andfnb(d)=.)thenprint"[157]";:goto827
  482. 830 m=d:gosub56:print"[157]"z$(d)" ";:e=d:ifb%<>2thenif(gc<4oru=db)andfnb(d)=1then840
  483. 831 d=.:gosub104:onxgoto106,120
  484. 832 ifa$=chr$(20)thenprint"[157][157]";:goto827
  485. 833 gosub107:ifd=.then831
  486. 834 gosub839:ifx=.then837
  487. 835 gosub158:gosub55:y=d:gosub84:return
  488. 837 ifb%=2thenu=fnz(u):gosub839:u=fnz(u):ifxthen835
  489. 838 goto831
  490. 839 k=e:c%=13*(k-1)+d:gosub155:poke49900,c%:sys50083:x=peek(49802):return
  491. 840 k=e:gosub151:gosub158:y=c%-(k-1)*13:gosub84:return
  492. 841 poke848,sl:d=sl:gosub9:poke849,.-(x>10):return
  493. 847 ifpeek(858)thenifrthenifqandpeek(860)=.thengosub299:ifmbthengosub299
  494. 848 ifpeek(858)=.thenifpeek(1000+k)orpeek(861)thenh=h*4:ife>=randpeek(881)=.thenreturn
  495. 849 ifpeek(859)orpeek(858)thenif(yx=fnx(k)andpeek(865))ormb=fnx(k)thengosub859
  496. 851 return
  497. 853 if(v(fnz(fny(u)))andfnx(ws))theniffx=.ordx<4orpeek(864)=uorfnv(ws)=.thenreturn
  498. 854 iffnc(ws)=1thenifpeek(998)<>wsorpeek(997)<>fnz(u)thenreturn
  499. 855 ifpeek(980+ws)andpeek(960+ws)=.thenh=1:return
  500. 858 h=25+7*(dx=4)-30*(kc<=kd):return
  501. 859 x=peek(881):ifpeek(860)orpeek(864)=.thenreturn
  502. 860 ifx=.thenifpeek(861)thenifpeek(858)=.or(r=.and(peek(v+9)orpeek(v)=.))thenreturn
  503. 863 h=3:ifxthenifpeek(859)thenifpeek(865)orfnz(u)=peek(864)thenh=2:ift2=.thenpoke999,peek(859)
  504. 864 return
  505. 870 x=1+((fnb(tr)>.andl=.)or(l=1andfnv(tr)>.)):return
  506. 871 x=peek(864):x=.-((x=uandl=.)or(l=1andx=fnz(u))):return
  507. 872 ifprthenifkd>1andk=trthenifpeek(858)=.andpeek(kx+20)=.thenh=315:return
  508. 873 ifprthenifpeek(kx+20)thenifmbork=trthenreturn
  509. 874 iftrthengosub631:gosub870:ifx=.thenh=26-f:ifdx=4andfx>=fthenifpeek(858)thengosub871:ifxthenh=h*2
  510. 876 ifpeek(ky+20)andkd>1thenh=25+e:x=4:gosub1450:h=h+p*5:ifdx=4thenh=h+30
  511. 877 iffx>=2andps=2thenife>3thenx=3:gosub1450:h=h-16*(p>2)-30*(p>=jm)
  512. 879 return
  513. 888 gc=2:print"  play north also? ";:gosub90:gosub81:ifa$="y"thenb%=2:x=.
  514. 889 return
  515. 891 gosub394:gosub300:gosub24:print"      tricks ";tab(28)"[145]trick board"
  516. 892 print"     n/s[149][168][168]e/w[144]":gosub302:return
  517. 894 ifcithenprinttab(10)"[151] deal number->[146]"ci;
  518. 895 print:return
  519. 896 gc=2:b%=.:gosub300:gosub148:ifpl=2orpl=4thenx=1:goto898
  520. 897 print"  play declarer? ";:gosub90:gosub81:gc=.:x=1:ifa$="n"thengosub888
  521. 898 ifxthenprint" [149] show all hands? ";:gosub90:gosub81:ifa$="y"thenb%=1
  522. 899 return
  523. 901 y=tr:gosub62:poke211,(u-int(u/4)*4)*10:return
  524. 902 h=1-2*(peek(1000+k)>.and((peek(v)-peek(v+k)>.)or(kc>1andpeek(865)>.))):return
  525. 903 ifgb>10orps=.orpr=.orps=prorms=.orv>18then4555
  526. 904 y=10:x=.:gosub525:ifx=3theniffnb(y)>3andpeek(b+y)>3theno=y:goto66
  527. 905 goto4555
  528. 906 gosub33:gosub907:gosub87:return
  529. 907 print" bridgebrain [146]";:return
  530. 908 clr:goto9630
  531. 909 sys52091:goto175
  532. 910 x=.:gosub121:ifythenz=o:x=1
  533. 911 return
  534. 914 gosub149:ifmsthenfx=fx-1:iffx+1=.thenx=2:y=9:gosub919:y=21:gosub294:gosub142
  535. 915 ifms=.theniffx=13-peek(c)thenx=5:y=18:gosub919:gosub2120:gosub5:gosub142
  536. 916 return
  537. 919 j=50471:pokej+15,x:poke900,y:sysj:return
  538. 920 pokei,.:ps=peek(843+k):gosub631:ifpeek(956+k)=peek(960+k)orq+1<fthen927
  539. 921 ift2=.and(q>=ps-(hp>1))andf>qthenifpeek(881)=.then927
  540. 922 ifq=f-1thenifdx<4orf>=psorfx=.thenreturn
  541. 923 gosub870:ifxor(hp=3andq=fandl>.)orq<fthenreturn
  542. 924 pokei,1:h=h+9*ps:ifq=fandf=psthenifpeek(881)thengosub871:ifx=.thenh=90
  543. 925 iff<ps-(peek(881)>.)thengosub871:ifxthenh=h*2:x=869:gosub65
  544. 926 return
  545. 927 ifq>1andq>=pstheniffandf<psthenh=h*2
  546. 928 return
  547. 930 g=.:yx=1:gosub52:sys52298:poke52326,.:poke897,gb
  548. 931 gosub939:ifj=.then931
  549. 932 print:onjgoto908,933,934,909,9400,938,185,188,172
  550. 933 gosub275:goto930
  551. 934 gosub4:gosub73:gosub300:g=99:gosub292:print"":sys52469:poke52326,5:gosub52
  552. 935 gosub939:ifj<6then935
  553. 936 ifj>7thenonj-7goto188,172
  554. 937 gosub300:print"":ifj=7then185
  555. 938 gosub85:gosub209:goto219
  556. 939 gosub250:poke898,asc(a$):sys52325:j=peek(899):return
  557. 950 print"":forj=1to4:printtab(29);:gosub92:print"    ":print:u=fny(u):next:return
  558. 955 y=hp*2:gosub62:poke211,35:return
  559. 956 y=96:gosub91:pokec-19,t+1:sys50105:return
  560. 960 d=.:gosub250:foru=xtoy:gosub17:d=d-u*(asc(a$)=peek(49401+t)):next:ifd=.then960
  561. 961 u=d:print"[157]";:gosub92:gosub4:return
  562. 963 x=1:y=4:goto960
  563. 967 x=5:y=6:gosub960:print:return
  564. 970 print:forj=.to4:printtab(o)"              ":next:return
  565. 980 y=tb:gosub62:gosub970:gosub956:gosub39:return
  566. 981 ifu=dboru=plthenv=49700+(fnz(u)-1)*17:goto983
  567. 982 s=u:u=db:gosub15:v=t:u=s
  568. 983 t=49649:ifb%org=99thent=49657
  569. 984 if(u=le)thengosub988:return
  570. 985 ifu=dbthent=t+2:gosub988:return
  571. 986 ifu=pbthent=t+4:gosub988:return
  572. 987 t=t+6:ifb%=.andg<99thenifgc=4or(gc=2and(pland1)and(uand1))thentb=21:o=14:return
  573. 988 tb=peek(t):o=peek(t+1):return
  574. 997 sx=.-sx*(sx<5):return
  575. 998 x=.-((kd=2andky>3)orkd>2):return
  576. 999 x=.-((kd>2andky>1)orkd>3):return
  577. 1000 pokec,.:t=767:d=714
  578. 1002 forl=1to52:s=int((52-l)*rnd(x))+1:poket,peek(d+s):poked+s,peek(t-l):poket-l,peek(t):next
  579. 1005 sys50151:u=4:ifgc=.orpeek(c)>97then1092
  580. 1008 o=6:print"[147]":ifgc=2thengosub1090:print:goto1053
  581. 1033 gosub1070:gosub1080:u=1:gosub1070
  582. 1053 gosub1080:goto1092
  583. 1070 gosub148:print"   display [146]";:gosub31:printtab(16)" hand? ":gosub496:print"[147]":return
  584. 1080 gosub1082:ifgc=4thengosub496:print"[147]"
  585. 1081 return
  586. 1082 gosub39:print:gosub274:pokec-11,146:gosub63:printtab(o)" ";:gosub92:print"   ->[144]";y:return
  587. 1090 print"[147]";:ifci>.orgc=.thenprinttab(6):gosub906:return
  588. 1091 gosub485:print:return
  589. 1092 ifgc<>2andpeek(c)<>99thengosub1090:print""
  590. 1095 ifpeek(c)=99thengosub209:goto219
  591. 1099 goto2990
  592. 1100 x=fnz(u):gosub53:gosub38:gosub23:poke899,y:gosub37:return
  593. 1101 gosub920:ifpeek(881)=.thenif(fnx(k)andpeek(869))=.theniffnx(k)andpeek(862)thenpokei,.
  594. 1102 return
  595. 1110 iffnx(k)andv(fny(u))then1120
  596. 1115 gosub272:h=h+f*20-200*(x>.or(fnx(k)andv(fny(fnz(u))))>.):ifpeek(893)andmb=.thenh=h*2
  597. 1117 return
  598. 1120 f=.:ifp>1thenx=879-(u=db):gosub65
  599. 1121 return
  600. 1123 ifmthenifhp=2thenn=.:gosub667:iflornorpeek(ky)thenpokei,2
  601. 1124 on1-(peek(i)=2)goto74,2017
  602. 1150 pokei,.:x=2:gosub1490:iffx=.ork=trthenreturn
  603. 1151 j=t2-m-n:ifp>1thenifint(j/2)andp>=n+(hp>1)thenpokei,1:return
  604. 1155 ifp=.andhp=2thenx=3:gosub1490:ifpandm>pthenifint(j/2)>1or(m>nandp>=n-1+dx)thenpokei,1
  605. 1160 return
  606. 1248 h=9-5*(t2>9)+3*(pr=1)-5*(kx>1)+(kx=1)-(p=1andy=db)*20*dx:return
  607. 1250 mb=.:jm=976:kd=v(fnz(u))
  608. 1252 fork=1to4:gosub1254:ifhandk=trthenif(fnx(k)andkd)=.thenifn+m<>t2thengosub299
  609. 1253 r(k)=h:next:gosub1331:goto1280
  610. 1254 h=.:gosub3:ifn=.thenreturn
  611. 1255 ifk<>trthenif(fnx(k)andkd)orn+m=t2thenh=8-30*(pr>1)-90*(n=t2):gosub7280:return
  612. 1256 iftrandk<>trthengosub266:ifxthenh=3+(1-dx)*2:gosub1287:return
  613. 1257 iftrtheniffnv(tr)andm=.thengosub7289:h=1+2*q-50*(x>.andn=t2+1andpeek(v+10+tr)<4):return
  614. 1261 iftrandk<>trthenifn+m+1=t2thenifq=.orn=1thengosub7283:ifh=89thenh=79:return
  615. 1263 j=fnx(k):ifqor((jandv(pl))and(jandv(db)))thenh=78+2*q:gosub660:return
  616. 1265 gosub508:gosub1495:kx=p:x=1:gosub1490:ifpr>1thenh=40+n-20*(pr>2):return
  617. 1269 ifpthenx=3:gosub34:gosub1248:goto1278
  618. 1272 gosub1314:ifk<>trthenx=2:gosub1490:h=h-8*(t2>11)+(p=1)*(10-20*dx)-3*p
  619. 1276 ifk<>trandk=peek(u+jm)thenifu=peek(997)orfnz(u)=peek(997)thenh=h+20
  620. 1277 ifk<>trthenh=h-8*(k=peek(fnz(u)+jm))-25*((fnx(k)andv(4+fnz(u)))>.)
  621. 1278 ifu=pbandk=peek(848)thenif(fnx(k)andv(le))=.thenifpeek(849)ortr=.orpeek(c)=2thenh=h+30
  622. 1279 return
  623. 1280 gosub638:ifxthen582
  624. 1282 gosub3:if(q>.and((fx<3-(tr>.))orr(k)>49))orpr>1orq>1ort=6ort=7ort=3then1997
  625. 1283 gosub317:on1-(k<>trandpz=2)goto582,613
  626. 1287 x=1:gosub34:ifmorfnv(tr)=.thenify<>dbthenh=4-(q=.)*13
  627. 1288 return
  628. 1300 fork=1to4:gosub1303:r(k)=h:next:gosub1331:return
  629. 1303 h=.:gosub3:ifn=.thenreturn
  630. 1306 ifk=trthengosub790:return
  631. 1308 iftrthengosub266:ifxthengosub508:ifx<>norn>mthenh=30:return
  632. 1310 iftrtheniffnv(tr)andm=.thenifq<>nandpr+1<>nthenh=25:return
  633. 1311 ifn=t2thenh=35:return
  634. 1312 ifqthenh=1+n+9*(n-q):return
  635. 1314 ifprandt2-n>1thenh=3+n:return
  636. 1324 gosub508:h=n+20+(x=n)*15-9*(t2-n<3*x)+5*(x=n+1):return
  637. 1331 gosub142:k=1
  638. 1333 forj=2to4:ifr(j)>r(k)thenk=j
  639. 1334 next:return
  640. 1350 fork=1to4:gosub1353:r(k)=h:next:gosub1331:return
  641. 1353 h=.:iffnb(k)=.thenreturn
  642. 1354 gosub10:ifk<>trthen1357
  643. 1355 if(ms=.andws=trandtr<>sl)or(hp=2andfnv(tr)=r(.))thenh=1:return
  644. 1356 h=99:on1-(hp>2)gosub810,815:return
  645. 1357 ift2andfnc(k)=.thenh=4-(yx>.)-kc*(kd=.):return
  646. 1358 ifpeek(kx)=kcthenh=5+kc+(kd>.)*3-80*(peek(ky)>=jmandkd>kcandmb=.):return
  647. 1359 y=.-(kc<e-(q=.)):ifytheniftrtheniffnb(tr)thenifkc<=kdorkd=.thenh=51-kc:goto1375
  648. 1362 ifq=.thenx=peek(kx+20):ifxthenifrandkc>1andkc<=x+1thenh=4+x:return
  649. 1373 h=12+e+y*9:ifpeek(kx)thenh=14+2*e+(r=.ande=.)*9
  650. 1375 ifpeek(864)=fnz(u)thenifpeek(859)andfnx(k)thengosub299
  651. 1380 return
  652. 1450 poke896,fnz(u):p=u:gosub1455:p=p+(p>e)*(p-e):return
  653. 1455 gosub34:poke895,p:sys52573:p=peek(894):return
  654. 1460 poke898,u:poke897,db:gosub23:gosub37:return
  655. 1465 poke898,u:poke897,db:gosub23:poke899,c%:gosub37:return
  656. 1480 poke899,13*(k-1)+1:poke900,13*k+1:poke897,x:sys51760:y=peek(898):return
  657. 1490 poke896,.:p=db:gosub1455:return
  658. 1495 poke896,.:p=u:gosub1455:return
  659. 1500 v(.)=.:ifpeek(c)<13thenx=5-((r>.andpeek(881)=.)orfx<.):y=.:gosub919:gosub194:gosub96
  660. 1502 k=.:iftrthenk=tr-1
  661. 1504 gosub1525:ifhthengosub800:ifk=trthengosub847
  662. 1505 r(k)=h:sl=sl+1:on1-(sl>3)goto1504,1974
  663. 1510 poke881,.-(peek(kx)>.andpeek(ky)>.)*peek(881):return
  664. 1525 k=fny(k):gosub10:h=.:ifkc=.thenreturn
  665. 1526 ifk=trthengosub1510:ifkdthengosub615:ifpeek(881)=.thengosub626:poke881,x
  666. 1528 ift2thenifk<>trtheniffnc(k)=.andkd=.thenh=500:return
  667. 1530 iffnx(k)andpeek(859)thengosub418:return
  668. 1535 ifk=trthenift2thengosub902:return
  669. 1550 ifq=.thenh=3+e+2*pr:ps=peek(964+k):gosub690:goto1565
  670. 1560 h=16+q-(k=tr):gosub683:gosub474:gosub808:iffx>.andpeek(ky)=.thengosub550
  671. 1565 ift2=.thenifk<>trandpeek(843+k)=.thengosub561:ifl=.thengosub299:return
  672. 1570 f=peek(1000+k):iffthenh=h+5+f+9*(kd=1andyx=fnx(k)):ifpeek(kx)<kcthenf=.:gosub803
  673. 1590 return
  674. 1700 u=1:pc=.:poke2,.:a$=" honors"
  675. 1702 gosub15:x=peek(t+10+tr):if(trandx=31)or(tr=.andx=4)thenpc=150:poke2,u:goto1715
  676. 1705 iftrthenifx=15orx=23orx=27orx>28thenpc=100:poke2,u:goto1715
  677. 1710 u=u+1:ifu>4thenreturn
  678. 1712 goto1702
  679. 1715 print"[147]":gosub148:printtab(12)a$" points [146][144]"pc:print:gosub31:gosub2100:gosub5:return
  680. 1800 z=.:fork=1to4:gosub1806:r(k)=h:next:gosub1331:l=.:goto1820
  681. 1806 h=.:gosub3:ifn=.thenreturn
  682. 1807 ifgb>20thenift>15andk<>trthenift>23ort<20thenz=k
  683. 1809 iftrandk=trthenh=2:return
  684. 1810 ift>23or(t>11andt<16)ort=3ort=6ort=7thenh=6+int(t/10):return
  685. 1813 ifn=1andt<8thenh=9:return
  686. 1814 ift>7andn<3thenh=1:return
  687. 1815 ift>3andn<4thenh=4:return
  688. 1817 h=5+2*(t>15):return
  689. 1820 ifzthenk=z:goto74
  690. 1824 forn=1to4:ifv(4+fnz(u))andfnx(n)theniffnb(n)thenk=n:l=1
  691. 1825 next:iflortrthen1828
  692. 1826 k=1:forj=2to4:iffnb(j)>fnb(k)or(fnb(j)=fnb(k)andpeek(b+j+10)>peek(b+k+10))thenk=j
  693. 1827 next
  694. 1828 gosub3:ifr(k)>5orn=2or(l=1andt>7)thenpz=1:goto613
  695. 1860 iftr=.andn>4thengosub317:ifpz=2then613
  696. 1870 iftr=.andn>3thenpz=4:goto613
  697. 1875 goto582
  698. 1973 k=v(.):gosub142:goto1997
  699. 1974 gosub1331:gosub10:gosub688:sl=s:t%=w:x=.-(r=.andv(.)>.):ifkd=.thensl=99
  700. 1975 ifxthenifyx=fnx(k)andkc=1thenift2or(k=trandpeek(1000+tr))then1973
  701. 1976 ifxthenifyx=.thenifk<>trorkc=1thengosub625:ifxthen1973
  702. 1980 x=peek(999)andfnx(k):poke999,.-(x>.)*fnz(u):x=.:iftrthengosub530
  703. 1981 ifxorkc=1or(peek(863)andfnx(k))or(peek(v+k+10)andpeek(964+k)>1)then582
  704. 1982 j=peek(1000+k):ifpeek(999)=fnz(u)thenifjor(fnx(k)andpeek(859))then582
  705. 1986 gosub564:ifsthen582
  706. 1990 gosub470:ifpeek(ky+20)andq=.thengosub631:on1-(pr>=fandpr>=jmandl=.)goto582,1997
  707. 1991 ifjthenifq>peek(ky)andkd<=j+1andkc>kdthenifjm-x<=qandkd>1thenpoke999,fnz(u):goto582
  708. 1992 ifpeek(kx)andsl>1theniffnx(k)andpeek(862)thenpz=2:gosub513:y=c%:gosub36:ifw=1then1999
  709. 1993 ifjthengosub540:ift%=1andp=1andpeek(893)=.then582
  710. 1994 ifjthenif(t%=.andyxandr>.)or(t2andk=tr)then559
  711. 1995 ift%>1or(t%andpeek(ky)=kdandkd>.)or(q=.andpeek(kx+20)=1)then582
  712. 1996 gosub667:if(l=1andsl=.andpeek(kx)<fnc(k))or(t%andt%=slandkc>kd)or(q=.andsl=1)then582
  713. 1997 gosub157:goto158
  714. 1999 pz=2+(kc=2):goto613
  715. 2000 sys51342:gosub518:poke897,tr:sys51387:ifsl=.then1500
  716. 2001 gosub7220:ifxthenforx=1to1-12*(u=pl):gosub4:next:goto580
  717. 2002 gosub194:ifhp=2thengosub96
  718. 2003 k=sl:gosub10:gosub22:gosub149:ifkc=.then586
  719. 2005 gosub153:ifd=.then580
  720. 2006 ifhp<4theniffnx(k)andv(fny(u))orfnc(k)=.thenonms+1goto2090,2080
  721. 2007 ifhp>2then2045
  722. 2008 m=.:ifkdthengosub283:m=d:ifmthengosub688:if(landr>.)ors=.or(s=1andq=.)then580
  723. 2009 ifmthenn=.:gosub667:iflornthenon1-(peek(kx)=.andpeek(893)<pandn>.)goto580,74
  724. 2010 ifmthenifrandpeek(kx)=1thengosub1100:ifw=1theniftr=.orkd>1then580
  725. 2012 ifrthenifpeek(kx)andhp=3thengosub271:ifxthengosub349:ifpzthengosub513:ifsthen158
  726. 2013 x=peek(b+k+10):if(peek(kx)>.and(r=.ore=.))or(hp=2andkc=2andx>.andx<8)then74
  727. 2015 pokei,.:ifrtheniftrandk<>trthenifpeek(kx)thengosub1101:ifpeek(i)then1123
  728. 2017 ifrthenifqandq<jmandhp=2thengosub353:ifpzthengosub513:ifsthen670
  729. 2018 ifpeek(i)then580
  730. 2019 ifhp=2thenx=peek(kx):y=peek(kx+20):if(x=.and((yandy=pr)ory>1))or(xandx=q)then74
  731. 2026 ifrthenifpeek(kx)orpeek(863)thenifq<jmandhp=3thengosub349:ifpzthengosub513:ifsthen158
  732. 2027 ifhp=3thengosub2085:ifw>1thens=w:gosub57:ifw<2ors-w>.then74
  733. 2029 x=.-((ms>.andhp=3)or(hp=2andm=.)):ifxthenifpeek(kx)andq>=jmthen74
  734. 2030 onx+1goto580,570
  735. 2045 ifmsthenonhp-2goto2012,570
  736. 2047 j=.:gosub2095:ifxthenonhp-2goto74,570
  737. 2050 gosub2085:gosub271:ifhp=4orw=.or(r>.andw=1andx>.)then580
  738. 2051 ifrthenifxthenifpeek(kx)=1andq=<jmthenpz=2:gosub513:ifsthen613
  739. 2053 gosub272:ifxor(r=.and(t2ork<>tr))orq>=jmore=.or(fx=.andw>1)then74
  740. 2062 ifw=1or(w=2andg>9)thenifkdor(q=.andw=1)ork=trortr=.then580
  741. 2066 goto2015
  742. 2080 ifhp=3or(hp=2andkd=.)then570
  743. 2081 gosub283:ond+1goto570,580
  744. 2085 gosub38:gosub23:gosub37:return
  745. 2090 j=1:gosub2095:onx+1goto580,570
  746. 2095 t=.-(mb>.orpeek(b)>=r(.)-fx):x=.:if(r=.andyx=.andv(.)>.)orpeek(999)=uthenx=1
  747. 2096 ifr=.andkd=.andk=trtheniftthenifq>fnc(k)thenx=1
  748. 2097 ift2andyx=.andpeek(kx)>=fnc(k)+jthenx=1
  749. 2098 return
  750. 2100 gosub51:m=1:d=24:gosub2102:gosub2:return
  751. 2102 l=49247:sys50521
  752. 2103 forj=mtodstep4:pokea+1,peek(l+j):pokea,peek(l+j+1):pokea+8,peek(l+j+2):pokea+7,peek(l+j+3)
  753. 2104 gosub4:ifpeek(l+j)=50thengosub4:gosub4
  754. 2105 next:return
  755. 2107 print"":form=4to1step-1:gosub56:printz$(m);"[144]";peek(c+m);chr$(13):next:return
  756. 2120 gosub51:m=17:d=24:gosub2102:gosub2:return
  757. 2150 ifdnthen8
  758. 2151 ifgb>20thengosub3400:ifq>2or(gb>25andq>1.5)thenz=36
  759. 2152 ifgb>15thenx=fnq(gb):ifxthenif(a%<>1orpc=2)orgb>25theniffnb(x)>4thenz=36
  760. 2153 on1-(mb=37)goto8,118
  761. 2300 t=abs(4-u)*2+827:return
  762. 2310 forj=1to4:t=peek(49721+j)+peek(49755+j):d=t-int(t/2)+(t>.):x=t+(t>.)-d*2
  763. 2311 t=827+j:poket,d:poket+4,d:poket+8,x:next:poke879,.:poke880,.:poke881,.
  764. 2312 sys52613:poke998,.:poke999,.:return
  765. 2325 gosub2300:poket+sl,.:t=831-abs(u-4)*2:poket+sl,fnc(sl):return
  766. 2326 ifu=dboru=plthenreturn
  767. 2327 gosub2300:ifpeek(t+d)thenpoket+d,peek(t+d)-1
  768. 2328 return
  769. 2800 ifpb=15then2847
  770. 2803 ifpb=10then2846
  771. 2805 ifpb=6then2852
  772. 2806 ifpb<mb+5andw>17thenifkd>2andky>2thenz=pb+5:goto8
  773. 2820 ifpb<mb+5orgthen8
  774. 2821 ifky>2thenif(ps>2andkd>2)orkd>3thenz=pb+5:goto8
  775. 2823 z=15:goto8
  776. 2846 ifv>17thenz=15
  777. 2847 ifv>26thensx=.:goto5080
  778. 2850 goto8
  779. 2852 a%=2:o=.:gosub4377:z=7:ifothenz=o+5
  780. 2855 goto8
  781. 2900 ifpsthenifps<prandpb=gbtheniffnb(ps)+1<fnb(pr)theno=pr:goto66
  782. 2902 goto8
  783. 2990 y=10:gosub62:printspc(12)"[151] the auction [146]":poke900,6:gosub21:sys50017
  784. 3000 pc=-1:fx=.:sysc+20:forj=1to4:pokec+j,5:v(j)=.:v(j+4)=16:next:a%=.:print"";
  785. 3001 gosub2100:gosub21:e=.:gb=.:u=op:dn=.:tr=14:gosub901
  786. 3002 z=.:e=e+1:v(u)=v(u)+1:gosub20:ifu=4ande>1thentr=tr+1
  787. 3003 t%=.:sx=peek(c+u):gosub30:gosub509:ms=.:mb=.:ps=.:pb=.:gosub3050:ife>2thenifpbthen3007
  788. 3006 goto8000
  789. 3007 j=2:ws=.:sl=1:ifmbandmb<36thenifpthenifmb>p+5thensl=.
  790. 3008 j=j+2:ife>jthenifpeek(i+e-j)thenws=ws+1:goto3008
  791. 3009 t=.-(pb=20)-2*(mb=20)-3*(pb=25ormb=25):ontgoto5100,4350,4325
  792. 3010 ifpb=37ormb=37thenon1-(de=uorde=fnz(u))goto2153,8
  793. 3011 ifpb=36then4390
  794. 3012 ifmb=36then4380
  795. 3013 ifpb>20anda%=1then8
  796. 3014 ifws=.then3600
  797. 3015 gosub3061:onwsgoto3990,4500,6000
  798. 3016 x=ws-2*(int(ws/2)):onx+1goto7000,7100
  799. 3050 ife-2>.thenpb=peek(i+e-2):ifpb<36thenps=fnq(pb):ky=peek(b+ps+10):kd=fnb(ps)
  800. 3051 ife-4>.thenmb=peek(i+e-4):ifmb<36thenms=fnq(mb):kx=peek(b+ms+10):kc=fnb(ms)
  801. 3053 pr=.:p=.:ife-6>.thenp=peek(i+e-6):ifp<36thenpr=fnq(p)
  802. 3054 t2=.:ife-8>.thenx=peek(i+e-8):ifx<36thent2=fnq(x)
  803. 3055 gosub334:gosub113:g=.-(tb>=100):return
  804. 3061 ifgc=.orpb<>gborg=1thenreturn
  805. 3062 gosub99:if(psandkd>1)or(sx<5andps=sx)theniftb+c%(3+q)>=100theng=1:gosub517
  806. 3064 return
  807. 3080 l=fnz(u):if(sxandsx<5)orv(4+u)=16orv(4+l)=16thenreturn
  808. 3082 forj=1to4:x=fnx(j):if(v(4+u)andx)and(v(4+l)andx)thensx=j
  809. 3083 next:return
  810. 3400 q=.:forj=1to4:t=peek(b+j+10):q=q-(t<12andfnb(j)>1andt>7)*.5
  811. 3402 q=q-(t>11)-(t>19)*.5-(t>23)*.5:next:return
  812. 3460 o=.:ifpsthenif(ky>2andkd>2)or(ps>2andkd>3)then3474
  813. 3462 ifdb<3andv>20thengosub98:ifd=.then3495
  814. 3467 gosub7290:ifothen4168
  815. 3468 ifpb=5andv<14then8
  816. 3473 ifps=.orkd<3then3495
  817. 3474 gosub19:ifkd>3andr>23thensx=ps:goto5080
  818. 3476 ifps>2andr>19thenz=ps+15:goto8
  819. 3477 ifr>16thenz=ps+10:goto8
  820. 3478 ifr>12+(ps>2)*2andkd>2thenz=ps+5:goto8
  821. 3495 o=.:ifv>18theno=5
  822. 3496 ifv>20thenz=15:goto8
  823. 3497 goto66
  824. 3498 o=ms:ifw<19then66
  825. 3499 o=ms+5:ifpb=5orpb<>gbthengosub79:ifdorgb>pb+5thenx=ms:goto5095
  826. 3502 ifdb<3thengosub98:ifd=.then3496
  827. 3503 goto66
  828. 3520 ife<3orz>gbthen8
  829. 3522 ifle>.thens=1:gosub8137
  830. 3523 ifpc=2andz=.thenifgbthen117
  831. 3532 gosub7050:ifz<=gbthenz=.
  832. 3533 ifb%<3thenif(gcandu=4)or(gc=4andu=1)thenyx=z:poke900,6-(uand1):sys51632:goto225
  833. 3534 ifz<=gborz>37thenz=.
  834. 3535 gosub901:gosub63:print" ";:gosub26:gosub162:m=z*2+(4-x)*35:gosub316:sys51522
  835. 3536 pokec+u,sx:sx=5:print"[144]";:ifz>35thendn=z-35
  836. 3537 ifzthengosub341:ifv(u)=1thenpokec+6+u,1
  837. 3538 ifz>gbandz<36thengb=z:dn=.:de=u
  838. 3542 u=fny(u):pokei+e,z:ifzthenpc=.:goto3002
  839. 3546 pc=pc+1:ifpc=3thena%=.:print:print" [149] all pass [146]";:gosub894:goto930
  840. 3550 goto3002
  841. 3590 ifzthenifz<=gborz>37or(z>35andgb=.)or(z=37and(dn<>1orpb=36))or(z=36anddn)then245
  842. 3592 ifgbandgb=pbthenif(z=37anddn<>1)orz=36then245
  843. 3593 ifz<>yxthensx=peek(c+u)
  844. 3594 goto3535
  845. 3600 ife-6>.thenifp=.orp>35then8
  846. 3602 ifpb=15then8480
  847. 3606 ifpb>10or(pb<>gbandgb>10andw<11)orgthen8
  848. 3607 ifpb=5then3700
  849. 3609 ifpb<5then3800
  850. 3610 ife-8>.thenifpeek(i+e-8)=.then8
  851. 3611 ife-6>.thenifpb=p+5andmb=.then8
  852. 3612 ifpb=10then3616
  853. 3615 goto3900
  854. 3616 sx=.:o=.:x=peek(b+15):ifx>2thenifpeek(b+x)>1theno=x
  855. 3617 ifo=.andv<4then8
  856. 3640 ifw>9thengosub4375:ifothen66
  857. 3642 ifv>8theno=5
  858. 3644 goto66
  859. 3700 o=.:gosub121:ifo>2thenifw>6andv<15thenz=o+15:goto8
  860. 3701 ifothenifw<8thenon2+(o=1)goto8,66
  861. 3705 ifdbthenifo=.orw<12thengosub4377:ifw>7ando>2thenz=6:goto8
  862. 3706 o=.:gosub121:ifoandw>9theno=o+5:goto66
  863. 3720 y=.:forj=1to4:y=y+peek(b+j):next:ify<8then8
  864. 3721 z=10:ify>9thenz=15
  865. 3722 ify>15thenz=20:sx=.
  866. 3723 goto8
  867. 3800 tb=.:ifkd<3then3850
  868. 3811 ifps=1thenifkd<4or(peek(b+1)<4andkd=4)then3850
  869. 3817 gosub19:ifr<7then3850
  870. 3820 ifky>1orkd>3or(ps>2andky>.)thentb=ps+5
  871. 3821 ife<5then3823
  872. 3822 ifmb=.then3827
  873. 3823 ifr>12thenif(kd>3andps>1)orkd>4thentb=ps+10:ifr>18thensx=ps:goto5080
  874. 3825 goto3844
  875. 3827 ifps>2andr>10andkd>3thentb=ps+10-5*(r>13)
  876. 3844 iftb>=pb+10then7
  877. 3850 if(peek(i+e-1)andw<9)orw<6then7
  878. 3860 gosub121:ifythenz=o:ifz>gbordb>3then3871
  879. 3870 o=.:gosub7290:z=o:ifz=.then3886
  880. 3871 ifz>gbthen3892
  881. 3872 ifz=psthen7
  882. 3873 ifz=gbanddn=.thenz=36:goto8
  883. 3875 ifzthenifw<16-fnb(z)then3885
  884. 3880 z=z+5:goto3892
  885. 3885 ifpeek(b+15)>2andpeek(b+peek(b+15)+4)>6thenifv>6then3880
  886. 3886 z=5:gosub98:ifdthen7
  887. 3887 ifv>12thenz=10:ifdb<2andv>15thenz=15:ifv>18thenz=20:sx=.
  888. 3889 ifz=5orz=.then7
  889. 3890 goto8
  890. 3892 ms=fnq(z):ifw>11thenkc=fnb(ms):kx=peek(b+ms+10):gosub79:ifdthensx=ms
  891. 3893 ifw>18thenz=z+5
  892. 3894 goto8
  893. 3900 s=.:ifpsthenifkd>2or(kd=2andky>2)thensx=ps:gosub19
  894. 3902 r=w+s:gosub3400:ifq=.orr<7or(q<1andr<8)thenz=10:sx=5:goto8
  895. 3905 ifpsthenifkd>2andr>9then5090
  896. 3906 ifpsthenifkd>2or(kd>1andky>2)then5092
  897. 3907 ifdb<2andr<10thenz=15:goto8
  898. 3912 forj=1to4:ifj<>pstheniffnb(j)>3andpeek(b+j)>2thenz=j+5:ifj<psthenz=j+10
  899. 3913 next:ifz>gbthen3918
  900. 3916 z=10:goto8
  901. 3918 ifr>9thenz=z+5
  902. 3919 goto8
  903. 3990 hp=1:if(mb=1andpeek(b+5)<4and(pb=5orpb=6))or(pb<>gbandgb>9andw<16)then8
  904. 3994 ifmb=5then2800
  905. 3999 ifmb>5andpb<mb+5thenon2+(pb=10)goto4600,4604
  906. 4000 ifmb>5thenifgthenifps=msor(mb>9andpb>25)then8
  907. 4002 ifpb=mb+10then7500
  908. 4004 ifpb>mb+5then5000
  909. 4005 ifgthen8
  910. 4010 gosub79:ifdthen3498
  911. 4012 gosub7204:ifdthen3498
  912. 4026 ifpb<6then3460
  913. 4100 tb=.:h=.-(ps>2):ifkd<3or(kd=3andky<2)then4120
  914. 4117 gosub19:ifr>14-hthentb=ps+10:ifhthenifr>18thenz=ps+15:goto8
  915. 4120 o=.:ifhandw<16then7
  916. 4167 gosub7290:ifo=.then4170
  917. 4168 gosub67:ifz>gbthen3893
  918. 4169 ifzandw>16thenz=z+5:goto3893
  919. 4170 z=.
  920. 4180 ifz<gbthenz=10:ifv>17thenz=15
  921. 4190 goto7
  922. 4196 o=ms:ifv>15anddb<1theno=.:ifv>18theno=5
  923. 4198 ifms>2thenifkc>5andw>21thensx=ms:goto5080
  924. 4199 goto66
  925. 4320 forj=1to4:t=peek(b+j+10):ift>23or(t<16andt>7)thenk=k+1
  926. 4324 next:return
  927. 4325 k=.:gosub4320:ifpb=25thenz=26-(k<4)*k:goto8
  928. 4326 if(k=.andpb=26)or(k+pb-26=4)thenz=30+sx-(sx=.)*5:goto8
  929. 4328 goto4363
  930. 4350 if(le=.andpb=21)or(pb-21+le=4)thenk=.:gosub4320:z=25-sx*(sx=1orsx=2ork=.):goto8
  931. 4361 ifsx=5orsx=.thenz=30:goto8
  932. 4363 gosub997:ifsxandmb=20thenx=.:gosub191:ifx+pb-21+le>3then5083
  933. 4364 ifsx=psthen8
  934. 4365 o=sx:goto66
  935. 4375 o=.:gosub121:ifythenreturn
  936. 4377 fort=3to4:ifpeek(b+4+t)>3andpeek(b+t)>2theno=t
  937. 4379 next:return
  938. 4380 gosub121:ifythenifo=<psandpb=gbthenifkd>2or(kd=1andky>3)or(pb>10andw<18)then8
  939. 4381 ifythens=o:gosub334:ony+1goto4396,8
  940. 4382 ifps=.andv>17theno=.:goto4396
  941. 4383 ifpsandv>17thengosub999:ifxthens=ps:gosub334:ify=.theno=ps:goto4396
  942. 4384 gosub98:ifdorpb=gbor(pb<>gbandfnq(gb)=.)then8
  943. 4385 o=.:ifv>17andgb<10theno=5
  944. 4386 ifv>20then5080
  945. 4387 goto66
  946. 4390 ifpeek(i+e-1)>.andv<6then8
  947. 4391 ifv(fnz(u))>1orw<5orgb>15or(gb>9andw<10)then8
  948. 4395 gosub4375:s=o:gosub334:if(o=.andw<9)or(yandw<13)then8
  949. 4396 ifpb<>gbthenif(fnq(gb)=o)or(gb>10andw<18)or(gb>15andw<23)then8
  950. 4397 goto66
  951. 4500 hp=2:gosub3080:ifsxandsx<5thenifpb<mb+6then6030
  952. 4501 ifpb<>gbthenifgb>10andw<11then8
  953. 4502 ifsx=.andpb<=mb+5then4550
  954. 4503 ifp=5andmb=6thenifpb<10then4800
  955. 4504 ifpb<=mb+5then4520
  956. 4505 ifpb=p+10orpb=mb+10then7500
  957. 4512 ift%andp=36thenifw<11then8
  958. 4514 goto5000
  959. 4520 gosub79:ifdthen4567
  960. 4521 ifps=.andpb=15thenifv<17then8
  961. 4522 ifpsthenon1-(ps=pr)gosub999,998:ifxthengosub19:ifr>10then4543
  962. 4524 if(gandw<19andps>.andkd>1)orw<9then2900
  963. 4525 gosub98:ifd=.then903
  964. 4537 ifps=.then4547
  965. 4538 ifpr>2thenx=fnb(pr):ifx>3or(peek(b+pr)>.and((ps=prandx>1)orx>2))thenws=pr:goto4593
  966. 4541 o=.:gosub7290:ifo>fnq(gb)andgb<15then66
  967. 4542 goto4547
  968. 4543 sx=ps:z=pb+5:ifr>18then5080
  969. 4544 on1-(r>13)goto8,5092
  970. 4547 ifpr>2thenif(fnb(pr)>2andpeek(b+pr)>1)or(pr>2andfnb(pr)>3)thenws=pr:goto4592
  971. 4548 ifmsthens=ms:gosub334:ify=.thenifkc>4andpeek(b+ms)>3then4568
  972. 4549 o=.:gosub7290:ifothenifw>13then66
  973. 4550 gosub780:ifxthen4365
  974. 4551 ifv>10thenif(pb=10andmb=5)or(hp=2andgb<5)then4555
  975. 4552 if(gb<5andw>9)orw>12thengosub98:ifdthenifv<13ord>1or(d=1andgb>10)then8
  976. 4553 ifw<13then8
  977. 4555 o=.:ifv>18then5080
  978. 4556 ife-6>.thenifmb=p+10andpb=mb+5thenifw<19theno=ps
  979. 4557 goto66
  980. 4567 gosub58:ifw>18andpeek(b+ms)>4then4570
  981. 4568 ifms>2thenifw>14andkc>6thenz=15+ms:goto8
  982. 4569 ifw<10then8
  983. 4570 ifw>18thensx=ms:goto5080
  984. 4577 o=ms:goto66
  985. 4592 ife-6>.thenifmb=p+10andpb=mb+5thenifw<19theno=ps:goto66
  986. 4593 gosub8500:r=w+s:ifr<10then4550
  987. 4594 o=pr:ifpr<>psthenifr>13theno=o+5:ifpr>2andpb>10theno=pr
  988. 4595 ifr>18thensx=pr:goto5080
  989. 4596 goto66
  990. 4600 gosub7204:x=.-((peek(b+15)ord)>.)*ms:goto5095
  991. 4604 gosub79:ifd=.thenifms<3andps>2andkd>3andky>3thensx=ps:on1-(v>21)goto5092,5080
  992. 4605 goto4600
  993. 4800 o=.:ifpb=8andpeek(b+7)<3thenifpeek(b+8)>3thenifpeek(b+4)theno=4
  994. 4802 ifpb>7thenifkd>3theno=ps+5
  995. 4803 ifo=.thengosub121:ifo=.thenifv<10andkd>2then8
  996. 4812 goto66
  997. 5000 ifps=.thenon1-(pb=20)-2*(pb=10)-3*(pb=15)goto8,5100,5203,5211
  998. 5002 ifps=pror(pandpr=.)thenifgandv<18then8
  999. 5003 ifps=prorps=msthen7500
  1000. 5005 gosub7204:ifdthen5030
  1001. 5008 on1-(hp=3)goto5016,5050
  1002. 5013 ifsx=5thensx=ps
  1003. 5014 ifv>15then5080
  1004. 5015 o=ps:goto66
  1005. 5016 o=.:gosub999:ifxthen5013
  1006. 5022 gosub7290:ifv>15theno=o+5
  1007. 5023 ifo=.thengosub121:ifo<fnq(pb)theno=.
  1008. 5026 goto66
  1009. 5030 gosub58:ifw>20thensx=ms:goto5080
  1010. 5032 o=ms:goto66
  1011. 5050 ifpsthenx=i+e-8:ifx>.thenifps=fnq(peek(x))then5060
  1012. 5051 ifgandw<20then8
  1013. 5052 ifkd>3andky>3then5013
  1014. 5053 ifw>18then5080
  1015. 5054 ifmsthenifkc>5then5030
  1016. 5056 o=.:goto66
  1017. 5060 ifw>18thensx=ps:goto5080
  1018. 5061 ifgandw<20then8
  1019. 5068 goto5014
  1020. 5080 gosub3080:gosub997:ifgb<20then5085
  1021. 5083 z=sx+25-(sx=.)*5:goto8
  1022. 5085 l=fnz(u):d=.:ift%then5091
  1023. 5086 forj=1to4:q=peek(b+j+10):ifq>15or((fnx(j)andv(4+l))>.)then5088
  1024. 5087 iffnb(j)>1thenif(fnb(j)=2andq<12)orq<8thend=d+1
  1025. 5088 next:ifd>1or(d=1and(sx<3orfnb(sx)<3))then5091
  1026. 5090 z=20:goto8
  1027. 5091 ifgtheniffnq(gb)=sxthen8
  1028. 5092 x=sx
  1029. 5095 z=15-(x>.)*(x-(x<3)*5):goto8
  1030. 5100 a%=1:z=21-(le<4)*le:goto8
  1031. 5203 ifw<19theno=.:on2+(v<6)goto8,66
  1032. 5205 z=30-(v>17)*5:goto8
  1033. 5208 ifv>12thenz=20:sx=.:ifv>18thenz=35
  1034. 5209 goto8
  1035. 5211 ifhp=2then5208
  1036. 5214 ifmsthengosub58:ifw>20thensx=ms:goto5080
  1037. 5216 goto8
  1038. 6000 hp=3:h=.:gosub3080:ifpsthenifps<>prandsx=5thenh=1
  1039. 6001 ifgandh=.thenifv<20or(pb=15andsl=.and(sx<3orsx=5))then8
  1040. 6002 ifsxandsx<5thenifpb<mb+6then6030
  1041. 6003 ifsx=.then6080
  1042. 6006 ifpb>mb+5then5000
  1043. 6012 ifpsandps=prthengosub998:ifxthengosub19:ifr>wor(ps>2andr>w-3)orr>15then6070
  1044. 6021 gosub79:ifdthengosub58:goto6050
  1045. 6022 gosub98:ifd=.thenifgb<15orv>18then7580
  1046. 6023 ift2>2andt2<>mstheniffnb(t2)>4andpeek(b+t2)>3thenifw>16thenms=t2:goto6050
  1047. 6024 ifpsthenon1-(ps=pr)gosub999,998:ifxthen6070
  1048. 6026 ifpranda%<2theniffnb(pr)>2andpeek(b+pr)>.thenps=pr:goto6070
  1049. 6028 ifh=.thenifpsandv<14then8
  1050. 6029 goto7580
  1051. 6030 gosub206:if(v>20andt%=.)or(sx>.andsx<5anddx>19-2*(peek(c+6+fnz(u))=.))thenifslthen5080
  1052. 6031 ifps<>sxthenifpb=gbthen6034
  1053. 6032 if(hp=2anddx<11)or(hp<>2anddx<15)orgthen8
  1054. 6034 o=sx:if(sx>2and(hp<>2ordx>10))orsx=peek(b+15)then5092
  1055. 6035 goto66
  1056. 6050 o=ms:gosub79:ifdorw>20thensx=ms:goto5092
  1057. 6052 goto66
  1058. 6070 gosub19:o=.:ifr>13theno=ps:ifr>20thenifslthensx=ps:goto5080
  1059. 6073 ifr>16thenifps>2andpb<13theno=ps+5
  1060. 6075 ifo=.or(w<16andgb>10andps<2andsx=5)then6028
  1061. 6076 goto66
  1062. 6080 ifw<16orgthen8
  1063. 6083 o=.:goto66
  1064. 7000 hp=2:ifgthenifpb>mb+5orps=prthen8
  1065. 7001 gosub3080:ifsxandsx<5thenifpb<mb+6then6030
  1066. 7002 ifpb=5orpb=10or(ps>2andps=prandps<>msandps<>t2)then7020
  1067. 7003 gosub780:ifxthen4365
  1068. 7004 ife-10>.andps=prthenifpr=fnq(peek(i+e-10))and(ky>3orkd>2)theno=ps:goto66
  1069. 7005 ifsx<5thenifg=.andw>11then4365
  1070. 7006 ifw<14orgthen8
  1071. 7007 ifms>2andkc>5theno=ms:goto66
  1072. 7020 wt=.:ife-10>.thenwt=fnq(peek(i+e-10)):ifprthenifpr=wtthenx=pr:goto7022
  1073. 7021 goto7025
  1074. 7022 f=fnb(x):iff>2or(x>2andf>1andpeek(b+x)>1)thenws=x:gosub8500:ifw+s>10theno=pr:goto66
  1075. 7025 gosub98:ifdthen8
  1076. 7026 goto4555
  1077. 7050 if(dnandz=36)or(dn=.andz=37)thenz=.:return
  1078. 7054 ife-2>.thenifpb=gbandpeek(i+e-1)=.thenifz>35thenz=.
  1079. 7055 ifdn=1ande>4thenifgbandgb=mbthenifz=gb+5thenz=37
  1080. 7056 return
  1081. 7100 hp=3:gosub3080:ifgthenifps=sxandw<24then8
  1082. 7108 ifw>21thenifsxandsx<5then5083
  1083. 7109 ifgb=pbandpb<>15thengosub780:ifxthen4365
  1084. 7111 ifgthen8
  1085. 7113 gosub997:ifgb>14thenif(sx=.andv<18)or(sxandw<18)then8
  1086. 7115 goto4365
  1087. 7204 d=.:ifmsandkc>4thenifkx>21or((ms>2orms=peek(b+15))andkx>9)or(kx<16andkx>11)thend=1
  1088. 7206 return
  1089. 7220 y=fnb(sl):x=.-((yandws=trandtr<>sl)ory=1):return
  1090. 7280 ifqthengosub660:ifq=1andn>qthenpz=2:gosub513:gosub507:ifx>nandt2-n>1thengosub299
  1091. 7283 iftrthenif(fnx(tr)andkd)=.thengosub109:ifl<13thengosub7289:h=89-70*x
  1092. 7285 return
  1093. 7289 x=.-(peek(c+tr)>8+(fnb(tr)>.)):return
  1094. 7290 forj=1to4:if(fnx(j)andv(u+4))or(fnx(j)andv(fnz(u)+4))then7294
  1095. 7292 if(fnb(j)>3andpeek(b+j)>3)orj=peek(b+15)orj=peek(b+16)theno=j
  1096. 7294 next:return
  1097. 7500 gosub3080:gosub7700:ifps=msandms<>prthen7538
  1098. 7510 gosub7204:if(dandkd<3andms>ps)orkd=.or(kd=1andky<4)or(kd=2andky<2andle=.)then7550
  1099. 7515 gosub19:ifgthenifw<pzor(ms=prandmb=p+10)then8
  1100. 7520 sx=ps:ifr>=pzthenifslthen5080
  1101. 7525 ifg=.thenifr>=pz-4or(ps>2andr>6)then5092
  1102. 7535 goto8
  1103. 7538 gosub58:x=.:gosub191:ifw>=pzor(w+2>=pzandx+le>2)thenifslthen5080
  1104. 7539 ifgthen8
  1105. 7540 goto5092
  1106. 7550 if(gandw<pz)orw<10then8
  1107. 7551 ifw>=pzthenifslthenifsx<>5then5080
  1108. 7553 gosub121:ifythenifo>psorw>12thenx=ms:gosub79:on1+dgoto66,5095
  1109. 7555 gosub98:ifdorpb<>gbandgb>14then8
  1110. 7580 o=.:ifslthenif(sxandsx<5andw>18)or((sx=5orsx=.)andv>18andt%=.)then5080
  1111. 7581 ifhp=3andsx=.thenifpsthenifpb=gbandgb<10theno=5
  1112. 7582 z=.:on2+(gb>15)goto8,66
  1113. 7700 pz=17+4*(hp=2andps=prandkd>1):ifhp=3or(hp=1andp=.andv(fnz(u))=2andps=ms)thenpz=23
  1114. 7707 return
  1115. 8000 wt=.:ifgbthenifde=uorde=fnz(u)thenwt=1
  1116. 8001 ifgb=.thengosub8125:goto3520
  1117. 8003 ifwtthenifdn=1andw>17thengosub79:ifdorgb<15thenz=37
  1118. 8005 ifwtthen8
  1119. 8006 ifv(u)>2or(v(u)=2andgb>15)then2150
  1120. 8007 gosub8125:ifz=.orz>gbthen3520
  1121. 8008 if(z<gbandv(u)=1andgb<8)orz=gbthenz=36:goto8
  1122. 8009 ifw>17thengosub121:ifythen4396
  1123. 8010 goto2150
  1124. 8125 ifdbthen8130
  1125. 8129 ifv>15then8310
  1126. 8130 gosub3400:ifw>13or(w=13andq>1.9)then8141
  1127. 8132 s=.:ife<3or(v>10andv(u)=1)orle=.thenreturn
  1128. 8137 forj=5to8:ifpeek(b+j)>7-sthenz=j+6:ifj>6thengosub99:ifc%(3+q)=.thenifs=.orle>1thenz=z+5
  1129. 8139 next:ifzthens=fnq(z):gosub334:ifythenz=.
  1130. 8140 return
  1131. 8141 gosub910:y=.:ifxthenx=.:iffnb(z)>5orpeek(b+z)>3then8210
  1132. 8160 forj=1to4:if(fnb(j)>3andpeek(b+j)>3)orfnb(j)>4thenz=j:x=x+1:y=y+(2^j)
  1133. 8170 next:ifgb=.andx>1thenz=1-3*(y=24ory=28)-2*(y=12ory=14)-1*(y=6ory=20ory=22)
  1134. 8205 if(z=.andv>15anddb=1)or(v>21anddb<2)then8310
  1135. 8206 z=z-(z=.)
  1136. 8210 o=z+4:gosub182:ifw>24thenz=z+5
  1137. 8220 return
  1138. 8300 forj=1to4:t=fnb(j):x=peek(b+j+10):r(j)=.-((t<2andx<16)or(t=2andx<8)or(t>=3andx<6))
  1139. 8309 next:return
  1140. 8310 gosub8300:x=.:forj=1to4:x=x+r(j):next:ifx>1then8206
  1141. 8312 z=5:ifv>21thenz=10:sx=.:ifv>24andx=.thenz=15
  1142. 8316 return
  1143. 8360 forj=1to4:ifr(j)thenif(fnx(j)and(v(4+fnz(u))orv(4+u)))=.thend=d+1
  1144. 8365 next:ifd=.andsx=5thenifv(u)>1thensx=.
  1145. 8366 return
  1146. 8480 o=.:gosub121:ifothenifpeek(b+o)>2thenz=25+o
  1147. 8482 ifo=.thenifv>9thenz=30
  1148. 8483 goto8
  1149. 8500 s=.:x=peek(b+ws):ifxandx<4thens=s+1
  1150. 8501 forj=1to4:d=fnb(j):ifj<>wsthenifd<2thens=s+1:ifd=.thens=s+2
  1151. 8502 next:iffnb(ws)<4thens=s-1
  1152. 8503 ifpeek(b+9)=.andfnb(ws)<4thens=s-1
  1153. 8504 return
  1154. 9000 gosub2:sys51013:gosub2310:hp=1:de=.+(pland1):gosub290:ifb%then9005
  1155. 9001 ifgc=.or(gc=2andde=.)thenu=pl:gosub132:gosub980:goto9005
  1156. 9002 ifgc=2thenu=4:gosub132:gosub980
  1157. 9005 u=le:gosub132:gosub950:gosub95:if(gcandle=4)or(gc=4andle=1)orb%=2then9008
  1158. 9006 gosub1800:gosub83:goto9010
  1159. 9008 gosub140:iffx=99then9066
  1160. 9010 gosub956:gosub193:gosub841:ifb%or(gc=2andle=4)thengosub980
  1161. 9020 hp=2:u=db:gosub132:gosub95:ifb%=.thengosub39
  1162. 9024 ifgc=2andde=1thengosub141:goto9027
  1163. 9025 gosub140:iffx=99then9066
  1164. 9027 gosub956:gosub190:gosub980:hp=3:u=pb:gosub132:gosub95:gosub955
  1165. 9030 ifb%<3thenif(gcandpb=4)or(gc=4andpb=1)orb%=2thengosub140:on1-(fx=99)goto9036,9066
  1166. 9032 gosub700:gosub83
  1167. 9036 gosub956:gosub190:ifb%or(gc=2andpb=4)thengosub980
  1168. 9043 hp=4:u=pl:gosub132:gosub95:ifgc=2thenifde=1thengosub141:goto9046
  1169. 9044 gosub140:iffx=99then9066
  1170. 9046 gosub956:gosub190:ifb%orgc=.or(gc=2andde=.)thengosub980
  1171. 9050 u=wt:gosub99:pokec+5+q,peek(c+5+q)+1:sl=.
  1172. 9066 poke49665,207+peek(c):sys51111:gosub302:gosub914:ifa%thengosub2107
  1173. 9073 gosub510:ifpeek(c)>13thengosub393:goto164
  1174. 9100 sys52867:hp=1:u=wt:wt=.:gosub950:gosub955
  1175. 9102 gosub132:gosub95:ifb%<3thengosub133:ifxor(b%=2andu=2)then9120
  1176. 9104 gosub137:onx+1gosub700,2000
  1177. 9106 gosub83:gosub9130:ifb%oru=dbthengosub980
  1178. 9110 gosub956:u=fny(u):hp=hp+1:ifhp>4then9050
  1179. 9115 goto9102
  1180. 9120 gosub140:iffx=99then9066
  1181. 9125 gosub9140:ifxthengosub980
  1182. 9127 gosub9130:goto9110
  1183. 9130 on1-(hp=1)gosub190,193:return
  1184. 9140 x=.:ifb%oru=dbor(gc=.andu=pl)or(gc=2andde=1andu=4)thenx=1
  1185. 9141 ifgc=2andde=.andu=plthenx=1
  1186. 9142 return
  1187. 9200 u=1:op=.:sys51705
  1188. 9201 sys51733:poke900,u:gosub284:gosub31:l=1:k=5:sl=1:gosub9410:ifl<14then9201
  1189. 9220 o=5:gosub39:print"y[146]es/no  ";:h=u:gosub81:u=h:ifa$="n"then9201
  1190. 9221 u=u+1:t=51744:poket,.:syst-11:poket,5:ifu<4then9201
  1191. 9230 sys51716:print"[147]":gosub148:gosub180:goto1005
  1192. 9300 print"[147]"tab(6);:gosub906:printtab(126)"deal number";:inputa$:ci=val(a$):ifci<=.then9300
  1193. 9302 y=rnd(-ci):x=1:goto1000
  1194. 9400 sl=.:k=5:gosub285:c%=.:gosub9410:ifc%=.then930
  1195. 9401 poke898,c%:print" with  ";:k=5:c%=.:gosub9410:ifc%=.then930
  1196. 9402 poke899,c%:print:sys52509:goto175
  1197. 9410 k=k-1:ifk<1thenk=4:ifslthenreturn
  1198. 9412 m=k:gosub56:printtab(4)z$(k)"[144] ";
  1199. 9414 gosub250:ifa$=chr$(133)thenprint"[157]m[146]enu":on2+(sl=.)goto9432,908
  1200. 9416 ifa$="*"thenprint"[157][157]";:goto9410
  1201. 9418 d=.:gosub107:ifd=.then9414
  1202. 9420 c%=13*(k-1)+d:y=d:gosub84:ifsl=.thenreturn
  1203. 9425 ifpeek(900+c%)<>5thenprint"[129] error[146]";:gosub5:print"[157][157][157][157][157][157][157][157][157]         [145]":gosub52:goto9412
  1204. 9430 print:poke900+c%,u:y=((u-1)*13)+l-1:poke715+y,c%:pokey+49500,c%:l=l+1:ifl<14then9412
  1205. 9432 return
  1206. 9630 a=54272:i=679:gosub9700:print"[147]";chr$(8):gosub20:db=.:gosub52
  1207. 9635 deffnc(j)=peek(952+j):deffny(t)=t+1-int(t/4)*4:deffnq(t)=t-(int(t/5)*5)
  1208. 9639 deffnz(t)=t+2-int(t/3)*4:deffnb(x)=peek(b+x+4):poke896,255:sys51810
  1209. 9643 sys52955:deffnx(j)=2^(j-1):deffnv(j)=peek(v+j+4):op=4:gosub52:sys52826:t=peek(898)
  1210. 9645 print"[147]":gc=.-2*(t>1)-2*(t=4):ift=3ort=5thenci=1:on2+(t=5)goto9300,9200
  1211. 9651 gosub50:x=.:goto1000
  1212. 9700 dimv(8),r(4),z$(7),c%(6):c=49320:pokec,.
  1213. 9713 ford=.to7:readz$(d):next:data"nt","[216]","[218]","[211]","[193]","pass","dble","redb":return
  1214.