home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1998 Special
/
special1988a.d64
/
euchre
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
13KB
|
441 lines
10 gosub1100:gosub1000:gosub2700:gosub1300:gosub10000
25 gosub2000
30 iftp<>4then70
35 pokex,12:pokey,30:sysplt:print"[144]no bids";
40 pokex,13:pokey,28:sysplt:print"hand dumped";
50 gosub1400:fori=0to4:pokex,19:pokey,i*5+2:sysplt:printec$;:next
51 dl=fnnp(dl):pokex,7:pokey,12:sysplt:printec$;
55 gosub1900:goto25
70 pokex,12:pokey,30:sysplt:print"[144]trump: "co$(tp)s$(tp);
75 pokex,13:pokey,29:sysplt:print"[144]bidder:";:ifbd=0thenprint"you";:goto90
80 print" p"right$(str$(bd),1);
90 print"";:ifku=0then135
100 ifdl>0then125
115 pokex,15:pokey,28:sysplt:print"[144]pick discard";
121 gosub2200:pokex,15:pokey,28:sysplt:print" ";:goto130
125 gosub2300
130 c(dl,f)=kc:s(dl,f)=ks:gosub1220
135 pokex,7:pokey,12:sysplt:printec$;
140 gosub2500:gosub3000:if(pw(0)>9)or(pw(1)>9)then300
150 pokex,21:pokey,31:sysplt:n=0:gosub1465
151 pokex,21:pokey,35:sysplt:n=0:gosub1465
200 pokex,7:pokey,31:sysplt:n=pw(0):gosub1465
205 pokex,7:pokey,35:sysplt:n=pw(1):gosub1465
210 dl=fnnp(dl):gosub1355:goto25
300 wt=0:ifpw(1)>=10thenwt=1
305 pokex,7:pokey,29+wt*6:sysplt:n=1:gosub1465
310 pokex,7:pokey,31+wt*6:sysplt:n=pw(wt)-10:gosub1465
315 forde=1to2000:next
320 gosub1450:pokex,13:pokey,30:sysplt:print"you";
321 ifwt=0thenprint" win!";
322 ifwt=1thenprint" lose";
325 pokex,15:pokey,11:sysplt:print"play again?[146]";
330 lo=11:hi=12:xp=15:yp=23:gosub1910
340 ifan=11thenrun
350 print"[147]";
999 end
1000 poke53281,15:poke53280,6:rem setscr
1005 print"[147]";
1010 fori=1to24:print" [146] ";:next
1015 print" [146]";
1020 printspc(28)"[176][195][195][195][195][195][195][195][195][195][195][174]";
1025 printspc(28)"[194] euchre [194]";
1030 printspc(28)"[173][195][195][195][195][195][195][195][195][195][195][189]";
1031 printspc(28)" ";
1032 printspc(28)" points [146]";
1035 printspc(28)" you [167][165]comp ";
1040 printspc(28)"[183][183][183][183][183][208][207][183][183][183][183][183]";
1045 fori=1to4:printspc(28)" [167][165] ";:next
1050 printspc(28)"[183][183][183][183][183][183][183][183][183][183][183][183]";
1051 printspc(28)"[164][164][164][164][164][164][164][164][164][164][164][164]";
1055 printspc(28)" tricks [146]";
1060 printspc(28)" you [167][165]comp ";
1065 printspc(28)"[183][183][183][183][183][208][207][183][183][183][183][183]";
1070 fori=1to3:printspc(28)" [167][165] ";:next
1075 printspc(28)" [167][165] ";
1080 poke2023,32:poke56295,6
1081 pokex,7:pokey,31:sysplt:gosub1465:pokex,7:pokey,35:sysplt:gosub1465
1082 pokex,21:pokey,31:sysplt:gosub1465:pokex,21:pokey,35:sysplt:gosub1465
1090 return
1100 dim c1$(7),c2$(7),s$(3),dc(23),ds(23),c(3,4),s(3,4),co$(3),cx(3),cy(3)
1101 dim ob(6),ou(6),pu(6),ms(6,3),ga(6),me$(15),px(3),py(3),nm$(9,2),nf(6)
1102 dim cl(7,3)
1108 x=rnd(-ti)
1109 fori=0to3:reads$(i),co$(i):next
1110 data"[218]","","[216]","[144]","[211]","","[193]","[144]"
1111 fori=0to6:readnf(i):next:data4,0,1,2,3,4,0
1115 fori=0to7:readc1$(i),c2$(i):next
1120 data"9 "," 9","1o","1o","j "," j","q "," q","k "," k","a "," a"
1125 data"j "," j","j "," j"
1130 fori=251to254:readq:pokei,q:next
1135 data24,76,240,255
1140 plt=251:x=781:y=782:sx=53248:bl$=" "
1145 ec$=" [157][157][157][157]":ec$=""+ec$+ec$+ec$+ec$+ec$+"[146]"
1150 forj=0to3:fori=0to5
1155 dc(j*6+i)=i:ds(j*6+i)=j
1160 nexti:nextj
1161 fori=0to3:readpx(i),py(i):next:data13,12,7,7,1,12,7,17
1165 fori=0to3:readcx(i),cy(i):next
1170 data17,11,10,4,3,11,10,21
1171 fori=0to2:forj=0to9:readnm$(j,i):next:next
1172 data" [187]","[161][146][161]","[162] ","[162] ","[161][161]"," [162]"," [162]","[162] "," [187]","[172] "
1173 data" [161]","[161][146][161]"," [162]","[162] ","[188][188]","[162] "," [187]","[146] "," [187]","[188] "
1174 data" [190]","[161][146][161]"," [146][162]","[146][162] ","[146] [161]","[146][162] "," [190]","[146] "," [190]","[146][162] "
1175 def fnnp(x)=((x+1)/4-int((x+1)/4))*4
1176 fori=0to5:readcp(i):next:data1,1,8,1,2,-1
1177 fori=0to13:readme$(i):next
1178 data"pass ","order up","pass ","pick up"," pass "
1179 data"[218] diamonds","[216] clubs ","[211] hearts ","[193] spades ","normal "
1180 data"aggressive","yes","no ","yes"
1185 fori=1to3:readmx(i),my(i):next:data7,2,1,10,7,19
1186 fori=0to6:readob(i),ou(i),pu(i),ms(i,0),ms(i,1),ms(i,2),ms(i,3),ga(i):next
1187 data99,99,99,99,99,99,99,99
1188 data99,99,99,99,99,99,99,99
1189 data99,99,14,14,14,13,13,99
1190 data20,12,08,08,08,08,07,19
1191 data14,00,00,00,00,00,00,16
1192 data00,00,00,00,00,00,00,14
1193 data00,00,00,00,00,00,00,00
1199 return
1200 if(s=tp)and(c=6)thens=s+2:s=(s/4-int(s/4))*4
1205 printco$(s)c1$(c)" [157][157][157][157]"s$(s)" [157][157][157][157] [157][157][157][157] "s$(s)"[157][157][157][157] "c2$(c);
1207 print"";
1210 return
1220 foru=0to4:pokex,19:pokey,u*5+2:sysplt
1225 c=c(0,u):s=s(0,u):gosub1200:nextu
1230 return
1250 fori=0to23:j=int(rnd(1)*24)
1255 t=dc(i):dc(i)=dc(j):dc(j)=t
1260 t=ds(i):ds(i)=ds(j):ds(j)=t
1265 next
1270 forj=0to3:fori=0to4
1275 c(j,i)=dc(j*5+i):s(j,i)=ds(j*5+i):next:next:kc=dc(20):ks=ds(20)
1280 return
1300 gosub1450:pokex,12:pokey,28:sysplt
1305 print"[144]first black";
1310 pokex,13:pokey,29:sysplt
1315 print"jack deals";
1320 gosub1250:dl=0:cc=0
1325 pokex,cx(dl):pokey,cy(dl):sysplt
1330 c=dc(cc):s=ds(cc):gosub1200
1331 forde=1to500:next
1335 if(dc(cc)=2)and((ds(cc)and253)=1)thengoto1355
1336 pokex,cx(dl):pokey,cy(dl):sysplt
1337 forde=1to100:next
1340 printec$;:cc=cc+1:dl=fnnp(dl):goto1325
1355 gosub1450:print"[144]";:pokex,12:pokey,29:sysplt
1356 ifdl=0then1370
1360 print" player"dl;
1362 pokex,13:pokey,31:sysplt
1365 print"deals";:goto1375
1370 print"your deal";
1375 gosub1400
1376 pokex,cx(dl):pokey,cy(dl):sysplt:printec$;
1380 return
1400 pokex,15:pokey,28:sysplt
1405 gosub6000:print"[144] hit button [146]";:poke198,0
1410 getwt$:if(wt$<>chr$(13))and(peek(56320)<>111)then1410
1415 print"";:gosub1450
1430 return
1450 forr=12to16:pokex,r:pokey,28:sysplt
1455 print" ";:next
1460 return
1465 print"";:fori=0to2:printnm$(n,i)"[157][157]";:next:print"[146]";
1470 return
1500 fori=0to3:sp(p,i)=fc(pand253):ns(p,i)=0:next
1505 fori=0to4:s=s(p,i):c=c(p,i):sp(p,s)=sp(p,s)+cp(c):ns(p,s)=ns(p,s)+1
1510 ifc=2thens=s+2:s=(s/4-int(s/4))*4:sp(p,s)=sp(p,s)+6:ns(p,s)=ns(p,s)+1
1515 ifc=5thenforj=0to3:sp(p,j)=sp(p,j)+4:nextj
1520 nexti
1525 ss=0:fori=0to4:ifns(p,i)=0thensp(p,i)=0:ss=ss+1
1530 next:fori=0to3:sp(p,i)=sp(p,i)+ss:next
1535 ifp<>dlthen1550
1540 ifkc=5thensp(p,ks)=sp(p,ks)+4
1545 sp(p,ks)=sp(p,ks)+cp(kc):ns(p,ks)=ns(p,ks)+1
1550 return
1600 lo=0:hi=1:xp=13:yp=10:gosub1910
1605 if an=1thentp=ks
1610 return
1615 pokex,13:pokey,10:sysplt:print"lonehand?[146]";
1616 lo=12:hi=13:xp=13:yp=20:gosub1910:lh=0
1618 ifan=13thenlh=1:pokex,mx(bd)+2:pokey,my(bd):sysplt:print"lonehand[146]";
1619 pokex,13:pokey,10:sysplt:print" [146]";
1620 return
1625 lh=0:ifsp(p,tp)>ga(ns(p,tp))thenlh=1
1630 return
1650 iffnnp(fnnp(p))=dlthengosub1625:f=lh:goto1685
1654 f=0:ifkc=2thengoto1660
1655 ifsp(p,ks)>ou(ns(p,ks))thenf=1
1660 ifsp(p,ks)>ob(ns(p,ks))thenf=1
1665 if(f=0)or(p<>fnnp(dl))then1685
1670 sb=cp(kc):ifkc=5thensb=3
1675 fori=0to3:ifi<>ksthenifsp(p,i)>=(sp(p,ks)-sb)thenf=0
1680 next
1685 iff=1thentp=ks
1699 return
1700 lo=2:hi=3:xp=13:yp=11:gosub1910
1705 if an=3thentp=ks
1710 return
1750 ifsp(p,ks)>pu(ns(p,ks))thentp=ks
1755 return
1800 lo=4:hi=8:xp=13:yp=9:gosub1910
1801 ifan-5=ksthen1800
1805 ifan>4thentp=an-5
1810 return
1850 df=0:fori=0to3:ifi=ksthen1865
1855 ifsp(p,i)-ms(ns(p,i),ps)<dfthen1865
1860 df=sp(p,i)-ms(ns(p,i),ps):tp=i
1865 next
1870 return
1900 fori=1to3:forj=0to2:pokex,mx(i)+j:pokey,my(i):sysplt:print" ";
1905 next:next:print"[146]";
1907 return
1910 poke198,0:an=lo
1915 x1=xp:y1=yp:fori=lotohi:print"";
1920 ifi<>anthen1925
1921 if(an=lo)or(hi-lo=1)thenprint"";:goto1925
1922 printco$(i-lo-1);
1925 pokex,x1:pokey,y1:sysplt:printme$(i);:x1=x1+1:next
1930 getr$:dr=peek(56320):ifnot((r$="[145]")or(dr=126))thengoto1940
1935 an=an-1:ifan<lothenan=hi
1940 ifnot((r$="")or(dr=125))thengoto1950
1945 an=an+1:ifan>hithenan=lo
1950 ifnot((r$=chr$(13))or(dr=111))thengoto1915
1955 x1=xp:y1=yp:print"";:fori=lotohi
1960 pokex,x1:pokey,y1:sysplt:printleft$(bl$,len(me$(lo)));:x1=x1+1:next
1965 print"[146]";:return
2000 gosub1250:gosub1220:p=fnnp(dl):tp=4:bd=0:ku=0
2005 pokex,7:pokey,12:sysplt:c=kc:s=ks:gosub1200
2007 ifdl<>0thenpokex,mx(dl):pokey,my(dl)+1:sysplt:print"dealer"
2010 gosub1500
2015 ifp=0thengosub1600:goto2040
2016 ifabs(p-dl)<>2then2020
2017 gosub1625:iflh=1thentp=ks:goto2025
2020 gosub1650
2025 pokex,mx(p):pokey,my(p):sysplt:print"";
2030 iftp=4thenprint" pass":goto2040
2035 bd=p:print"order up";
2040 p=fnnp(p):if(p<>dl)and(tp=4)then2010
2045 p=dl:gosub1500:iftp<>4then2105
2050 ifdl=0thengosub1700:goto2070
2055 gosub1750:pokex,mx(dl):pokey,my(dl):sysplt:print"";
2060 iftp=4thenprint" turned[157][157][157][157][157]down";:goto2070
2065 bd=p:print" picked[157][157][157][157]up";
2070 forde=1to2000:next
2071 if(bd=0)and(tp<>4)then2105
2072 pokex,7:pokey,12:sysplt:printec$;:iftp<>4then2105
2073 gosub1900:ps=0
2075 p=fnnp(p)
2080 ifp=0thengosub1800:goto2090
2085 gosub1850:pokex,mx(p):pokey,my(p):sysplt:print"";
2086 forde=1to600:next
2088 iftp=4thenprint" pass";:goto2090
2089 bd=p:printright$(me$(tp+5),8);
2090 if(p<>dl)and(tp=4)thenps=ps+1:goto2075
2100 goto2109
2105 ku=1:if(bd=0)and(dl=2)thenlh=1:goto2120
2109 iftp=4then2140
2110 if(lh=1)and(bd<>0)then2120
2111 ifbd=0thengosub1615:goto2140
2112 gosub1625
2115 iflh=0then2140
2120 pokex,mx(bd)+2:pokey,my(bd):sysplt:print"lonehand";
2140 print"[146]";:forde=1to2000:next
2145 gosub1900
2150 return
2200 poke198,0:f=-1
2205 f=f+1:ifc(0,f)=-1then2205
2210 g=f:pokesx+1,214:pokesx,(f*5+3)*8+22:poke53269,1
2215 pokesx+1,214:pokesx,(f*5+3)*8+22
2220 getr$:dr=peek(56320):if(r$="")and(dr=127)then2220
2225 g=f:ifnot((r$="[157]")or(dr=123))then2250
2230 f=nf(f):ifc(0,f)<0then2230
2245 goto2215
2250 ifnot((r$="")or(dr=119))then2275
2255 f=nf(f+2):ifc(0,f)<0then2255
2270 goto2215
2275 ifnot((r$=chr$(13))or(dr=111))then2215
2280 return
2300 fori=0to4:if(s(p,i)=tp)and(c(p,i)=2)thenc(p,i)=7:goto2310
2305 if((s(p,i)and253)=(tpand253))and(c(p,i)=2)thenc(p,i)=6:s(p,i)=tp
2310 next
2315 fori=0to4:forj=0to3:ifs(p,j)>s(p,j+1)thengoto2331
2320 ifs(p,j)=s(p,j+1)thenifc(p,j)>c(p,j+1)thengoto2331
2325 t=c(p,j):c(p,j)=c(p,j+1):c(p,j+1)=t
2330 t=s(p,j):s(p,j)=s(p,j+1):s(p,j+1)=t
2331 next
2335 fori=0to4:pt(i)=0:ifs(p,i)=tpthenpt(i)=c(p,i)+10:goto2350
2340 ifc(p,i)=5thenpt(i)=9:goto2350
2345 if(s(p,i)<>s(p,nf(i)))and(s(p,i)<>s(p,nf(i+2)))thenpt(i)=-1
2350 next
2355 l=99:fori=0to4:ifpt(i)<lthenf=i:l=pt(i)
2360 next:return
2500 fori=0to3:forj=0to3:ns(i,j)=0:next:forj=0to4:ifc(i,j)<>2then2515
2505 ifs(i,j)=tpthenc(i,j)=7:goto2515
2510 ifabs(s(i,j)-tp)=2thenc(i,j)=6:s(i,j)=tp
2515 ns(i,s(i,j))=ns(i,s(i,j))+1:next:next
2520 return
2700 print"partner?[146]";:lo=9:hi=10:xp=2:yp=12:gosub1910
2705 fc(0)=0:ifan=10thenfc(0)=2
2710 print"opponents?[146]";:lo=9:hi=10:xp=2:yp=14:gosub1910
2715 fc(1)=0:ifan=10thenfc(1)=2
2720 print" [146]";:return
3000 fori=0to7:forj=0to3:cl(i,j)=0:next:next:cl(2,tpand253)=1
3001 fori=0to3:sl(i)=0:next
3002 ld=fnnp(dl):dm=4:tr(0)=0:tr(1)=0:iflh=0then3015
3005 ifbd=2thenfori=0to4:pokex,19:pokey,i*5+2:sysplt:printec$;:next
3010 dm=fnnp(fnnp(bd))
3011 iflh=1thenifld=dmthenld=fnnp(ld)
3015 fortk=0to4:p=ld:ps=0:tl=0:ifdm=pthenp=fnnp(p)
3020 gosub3500:wp=p:iflh=1thenps=ps+1
3021 sl(s(p,pc(p)))=1
3025 ifs(p,pc(p))=tpthentl=1
3030 fori=1to3:p=fnnp(p):ifp=dmthen3060
3035 ps=ps+1:gosub3500:iftl=0then3050
3040 ifs(p,pc(p))=tpthenifc(p,pc(p))>c(wp,pc(wp))thenwp=p
3045 goto3060
3050 ifs(p,pc(p))=tpthenwp=p:tl=1:goto3060
3055 ifs(p,pc(p))=s(wp,pc(wp))thenifc(p,pc(p))>c(wp,pc(wp))thenwp=p
3060 next:forde=1to400:next
3065 pokesx+3,(px(wp)+1)*8+52:pokesx+2,(py(wp)+1)*8+19:poke53269,2
3071 forde=1to3000:next:ld=wp:wt=wpand253:tr(wt)=tr(wt)+1
3072 pokex,21:pokey,31+4*wt:sysplt:n=tr(wt):gosub1465:poke53269,0
3075 fori=0to3:pokex,px(i):pokey,py(i):sysplt:printec$;:c(i,pc(i))=-1:next:next
3078 pokex,mx(bd)+2:pokey,my(bd):sysplt:print" [146]";
3080 bt=bdand253:pokex,15:pokey,28:sysplt
3085 print"[144]";:iftr(bt)<3then3108
3086 iftr(bt)<5then3097
3087 pw(bt)=pw(bt)+2+lh*2
3090 ifbt=0thenprint" you won[157][157][157][157][157][157][157][157][157]all tricks";:goto3200
3095 ifbt=1thenprint"computer won[157][157][157][157][157][157][157][157][157][157][157]all tricks";:goto3200
3097 pw(bt)=pw(bt)+1
3100 iftr(0)>2thenprint"you won hand";:goto3200
3105 iftr(1)>2thenprint" computer[157][157][157][157][157][157][157][157]won hand";:goto3200
3108 pw(1-bt)=pw(1-bt)+2
3110 iftr(0)<3thenprint"you've been[157][157][157][157][157][157][157][157][157][157]euchred!":goto3200
3115 iftr(1)<3thenprint" computer[157][157][157][157][157][157][157][157]euchred!";:
3119 forde=1to4000:next
3200 forde=1to4000:next:print"";
3205 return
3500 ifp>0then3509
3501 pokex,15:pokey,28:sysplt
3502 print"[144] your play [146]";:gosub2200
3503 ls=s(ld,pc(ld)):if(ps=0)or(s(p,f)=ls)or(ns(p,ls)=0)then3507
3504 gosub2215:goto3503
3505 poke53269,0:pokex,19:pokey,f*5+2:sysplt:printec$;:goto3530
3507 pokex,15:pokey,28:sysplt:print" "
3508 poke53269,0:pokex,19:pokey,f*5+2:sysplt:printec$;:goto3530
3509 iftk<5then3515
3510 fork=0to4:ifc(p,j)>-1thenf=i
3512 next:goto3530
3515 on(ps+1)gosub4000,4100,4200,4200
3530 pc(p)=f:pokex,px(p):pokey,py(p):sysplt:c=c(p,f):s=s(p,f):gosub1200
3535 ns(p,s(p,f))=ns(p,s(p,f))-1:cl(c(p,f),s(p,f))=1
3540 return
4000 ifnot(ns(p,tp)=5-tk)then4015
4005 sp=tp:gosub5200:iff=1thengoto5150
4010 goto5160
4015 ifnot((lh=1)and(bd=p))thengoto4030
4020 ifns(p,tp)>0thensp=tp:goto5150
4025 goto5050
4030 gosub5000:if(f=1)and(abs(bd-p)=2)thensp=tp:goto5150
4035 gosub5250:ifnot((f=1)and(p=bd))thengoto5050
4040 gosub5200:iff=1thensp=tp:goto5150
4045 ifns(p,tp)>2thensp=tp:goto5160
4050 goto5050
4100 ifns(p,s(ld,pc(ld)))=0then4115
4105 gosub5300:sp=s(ld,pc(ld)):iff=1then5150
4110 goto5160
4115 ifns(p,tp)=5-tkthensp=tp:goto5160
4120 ifns(p,tp)=0then5100
4125 ifc(ld,pc(ld))=5thensp=tp:goto5160
4130 ifbd<>pthensp=tp:goto5160
4135 gosub5250:iff=1thensp=tp:goto5160
4140 goto5100
4200 ifns(p,s(ld,pc(ld)))=0then4235
4201 sp=s(ld,pc(ld))
4205 if(sp<>tp)and(tl=1)then5160
4210 ifabs(wp-p)<>2then4225
4215 gosub5300:iff=1thengosub5350:iff=0then5150
4220 goto5160
4225 gosub5300:iff=1then5150
4230 goto5160
4235 ifns(p,tp)<5-tkthen4270
4245 sp=tp:ifabs(wp-p)=2then5160
4250 iftl=0then5160
4255 gosub5300:iff=1thengoto5400
4260 goto5160
4270 ifns(p,tp)=0thengoto5100
4275 ifabs(wp-p)<>2then4310
4280 if(tl=1)or(ps=3)then5100
4285 ifc(wp,pc(wp))=5then5100
4290 ifc(wp,pc(wp))<4thensp=tp:goto5160
4300 gosub5250:iff=1thensp=tp:goto5160
4305 goto5100
4310 iftl=0thensp=tp:goto5160
4315 gosub5300:iff=1thensp=tp:goto5400
4320 goto5100
5000 f=0:fora=0to4:ifc(p,a)>5thenf=1
5005 next:return
5050 f=-1:fora=0to4:if(sl(s(p,a))=0)and(s(p,a)<>tp)thenifc(p,a)=5thenf=a
5055 next:iff>-1then5070
5060 lc=-1:fora=0to4:ifs(p,a)<>tpthenifc(p,a)>lcthenlc=c(p,a):f=a
5065 next
5070 return
5100 ifns(p,tp)>0then5125
5105 sp=-1:fora=0to4
5110 ifs(p,a)<>tpthenif(c(p,a)=5)and(ns(p,s(p,a))>1)thensp=s(p,a)
5115 next:ifsp>-1then5160
5120 goto5180
5125 v=4:f=-1:fora=0to4
5126 ifs(p,a)=tpthen5135
5130 if(ns(p,s(p,a))<>1)or(sl(s(p,a))=1)then5135
5131 if(c(p,a)>=0)and(c(p,a)<v)thenv=c(p,a):f=a
5135 next:iff=-1then5180
5140 return
5150 ifps=3then5400
5151 v=-1:fora=0to4:ifs(p,a)=spthenifc(p,a)>vthenv=c(p,a):f=a
5155 next:return
5160 v=10:fora=0to4
5161 ifs(p,a)=spthenif(c(p,a)>=0)and(c(p,a)<v)thenv=c(p,a):f=a
5165 next:return
5180 v=10:fora=0to4:ifs(p,a)<>tpthenifc(p,a)>-1thenifc(p,a)<vthenv=c(p,a):f=a
5185 next:return
5200 ht=8:f=0
5205 ht=ht-1:ifht>0thenifcl(ht,tp)=1then5205
5210 ifht<0then5240
5215 fora=0to4:ifs(p,a)=tpthenifc(p,a)=htthenf=1
5220 next
5240 return
5250 f=1:fora=0to4:ifc(p,a)>-1thenif(s(p,a)<>tp)and(c(p,a)<5)thenf=0
5255 next:return
5300 f=0:fora=0to4:ifs(p,a)=s(wp,pc(wp))thenifc(p,a)>c(wp,pc(wp))thenf=1
5305 next:return
5350 f=0:fora=0to4:ifs(p,a)=s(wp,pc(wp))thenifc(p,a)-c(wp,pc(wp))=1thenf=1
5355 next:return
5400 d=10:fora=0to4
5405 ifs(p,a)=s(wp,pc(wp))thene=c(p,a)-c(wp,pc(wp)):if(e<d)and(e>0)thend=e:f=a
5410 next:return
6000 forr=54272to54296:poker,0:next:poke54275,1
6010 poke54277,21:poke54278,135:poke54273,150:poke54276,17
6020 forr=15to0step-.2:poke54296,r:next
6030 poke54276,16:poke54296,0:return
10000 poke53285,13:poke53287,11:poke53288,5:poke53276,2:poke2040,13:poke2041,14
10010 sa=832:forj=0to1:sa=sa+j*64:fori=0to63:reada:pokesa+i,a:next:next:return
10050 data 0,96,0,6,108,0,6,108
10051 data 0,6,109,128,3,109,128,3
10052 data 253,128,27,255,0,13,255,0
10053 data 15,255,0,7,254,0,3,254
10054 data 0,1,252,0,0,252,0,0
10055 data 252,0,0,0,0,0,0,0
10056 data 0,0,0,0,0,0,0,0
10057 data 0,0,0,0,0,0,0,190
10060 data 10,170,168,10,149,168,10,85
10061 data 104,9,89,88,9,106,152,9
10062 data 153,88,9,153,88,9,153,88
10063 data 9,153,88,9,106,88,9,89
10064 data 152,9,89,152,9,89,152,9
10065 data 89,152,9,170,88,9,89,88
10066 data 10,85,104,10,149,168,10,170
10067 data 168,0,0,0,0,0,0,0