home *** CD-ROM | disk | FTP | other *** search
- 100 def fnjs(x)=peek(56464)andx:def fnfr(x)=a$=chr$(13) or a$=" " or fnjs(16)=0
- 110 def fnud(x)=(a$="" or fnjs(2)=0)-(a$="[145]" or a$="^" or fnjs(1)=0)
- 120 def fnlr(x)=-(a$="[157]" or a$="_" or fnjs(4)=0)+(a$="" or fnjs(8)=0)
- 140 for x=1 to 30:rt$=rt$+"":dn$=dn$+"":sq$=sq$+" ":next:so$=" "
- 150 sp$=rt$+so$:kl$=rt$+" kills: 0 ":an$=rt$+" angle: 45":wn$=rt$+" wind "
- 160 poke 53280,0:poke 53281,14:print "[147][144]";rt$;" player 1 ";sp$;kl$;sp$;an$;
- 170 print sp$;sp$;sp$;wn$;sp$;rt$;" warship ";sq$;"[144] cf kaylor";so$;sq$;
- 180 print rt$;" player 2 ";sp$;kl$;sp$;an$;sp$;sp$;sp$;wn$;sp$;sp$;
- 190 print "";sq$;"[144] [157][148] [155]";:for x=0 to 9:read c$(x),wn$(x):next
- 200 data "[146] [157] ","<<<<","[146] [157][175]"," <<<","[146] [157][185]"," <<","[146] [157][184]"," <","[146] [157][183]"
- 210 data " ","[146] [157] ","> ","[146][175][157] ",">> ","[146][185][157] ",">>> ","[184][157] ",">>>>"
- 218 data "[183][157] ","[157] [157]":s=54272:for x=s to s+24:read a:poke x,a:next
- 220 print left$(dn$,9);spc(15);c$(4);"[157] [157]";left$(dn$,11);c$(4);"[157] [157]"
- 240 data 0,2,0,0,32,0,199,0,3,0,0,128,0,252,0,3,0,0,128,0,252,0,0,0,15
- 250 if peek(12351)<>199 then for x=12288 to 12543:read a:poke x,a:next
- 260 data ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,5,,,7,128,,7,128,,7,192,
- 270 data 255,255,255,127,255,254,127,255,254,199,,,,,,,,,,,,,,,,,,,,,,,,,,,,
- 280 data ,,,,,,,,,,,,128,,2,128,,2,128,,7,192,,7,193,,7,227,224,31,255,192,15
- 290 data 255,192,199,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
- 300 data 64,,,64,,1,196,,1,239,,7,254,,3,254,,199,,,,,,,,,,,,,,,,,,,,,,,,,,,
- 310 data ,,,,,,,,,,,,,,,,,,,,,,,,1,192,,1,196,,7,255,192,15,255,224,199
- 320 data ,,,,,1,192,,1,196,,7,255,192,15,255,224,199
- 340 an(0)=45:an(1)=45:v=53248:q=rnd(-ti):for j=0 to 1:rem position ships___
- 350 for k=0 to 3:sh(j,k)=256*rnd(1):x=j*8+k*2:sd(j,k)=int(900*rnd(1))+100
- 360 sh=j*4+k:poke v+x,sh(j,k):poke v+x+1,117+104*j:poke v+39+sh,0
- 370 poke 2040+sh,192+k:next k,j:poke v+29,255:poke v+27,255:poke v+21,255
- 420 for pl=0 to 1:sh=8*pl:pr=pl*13:rem play game___
- 430 wn=4-int(9*rnd(1)):print "[144]";left$(dn$,8+pr);spc(36);wn$(wn+4)
- 440 get a$:poke s+4,32+sgn(fnud(.)^2+fnlr(.)^2):br(pl)=br(pl)+fnlr(.)and255
- 460 poke v+sh,sh(pl,0)+br(pl)and255:poke v+sh+2,sh(pl,1)+br(pl)and255
- 470 poke v+sh+4,sh(pl,2)+br(pl)and255:poke v+sh+6,sh(pl,3)+br(pl)and255
- 480 an(pl)=an(pl)+fnud(.):an(pl)=an(pl)-(an(pl)=-1)+(an(pl)=46)
- 490 print "[155]";left$(dn$,9+pr);spc(15);c$(an(pl)/10);
- 500 print "[144]";left$(dn$,4+pr);spc(37-(an(pl)<10));an(pl)
- 510 on 1-fnfr(0) goto440:poke s+4,32
- 520 poke s+7,0:poke s+8,3:poke s+12,0:poke s+13,250:poke s+11,129:poke s+11,128
- 540 ag=an(pl)/13:for y=8 to ag step -1:print "[144]";left$(dn$,y+pr);spc(15);"[209]";
- 550 for pa=1 to 50:next:print "[157] ":next:for pa=1 to 1000:next :for y=ag to 8
- 570 print "[144]";left$(dn$,y+pr);spc(15+wn);".";:for pa=1 to 50:next:print "[157] "
- 590 next:sd=1000:sg=-1:for sh=0 to 3:si=sh(pl,sh)+br(pl)and255:se=sd(pl,sh)
- 600 if si>115+wn*8 and si<135+wn*8 and se<sd then sg=sh:sd=se
- 610 next sh:if sg>-1 then640
- 620 poke s+7,0:poke s+8,8:poke s+12,63:poke s+13,251:poke s+11,129:pokes+11,128
- 630 print "[144]";left$(dn$,6+pr);spc(31);"miss ":goto720
- 640 sf=(45-abs(an(pl)-45))*20+100:ds=sd-sf:if abs(ds)>100 then690
- 650 poke s+7,92:poke s+8,1:poke 12,0:poke s+13,252:poke s+11,129:poke s+11,128
- 660 poke v+21,peek(v+21)and255-2^(sg+4*pl):sd(pl,sg)=1000
- 670 k(pl)=k(pl)+1:print "[144]";left$(dn$,2+pr);spc(37);k(pl)
- 680 print "[144]";left$(dn$,6+pr);spc(31);"hit ":goto720
- 690 poke s+7,0:poke s+8,8:poke 12,63:poke s+13,251:poke s+11,129:poke s+11,128
- 700 if ds>0 then print "[144]";left$(dn$,6+pr);spc(31);"shrt [157][157][157][157]";ds
- 710 if ds<0 then print "[144]";left$(dn$,6+pr);spc(31);"long [157][157][157][157]";-ds
- 720 if k(0)<4 and k(1)<4 then for pa=1 to 1000:next pa,pl:goto420
- 730 if k(0)=4 then print "[144]";left$(dn$,6);spc(31);"winner "
- 740 if k(1)=4 then print "[144]";left$(dn$,19);spc(31);"winner "
- 750 get a$:if fnfr(.) then750
- 760 get a$:on 1+fnfr(.) goto760:run
-