Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape13b_acorn_eu_1990_july.wav » gunboat

gunboat

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape13b_acorn_eu_1990_july.wav
Filename: gunboat
Read OK:
File size: 244E bytes
Load address: 2000
Exec address: 1900
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
   10REM *****************************
   20REM *                           *
   30REM *          GUNBOAT          *
   40REM *     BY DARREN BRADLEY     *
   50REM *     (c) Electron User     *
   60REM *                           *
   70REM *****************************
   80:
   90MODE4:ONERROR PROCerr
  100PROCst:PROCenter:REPEAT:PROCbattle:UNTILM%=17 ORN%=17:PROCwin:VDU4:OSCLI"FX15":RUN
  110:
  120DEFPROCerr:VDU22,6:SOUND1,-15,200,1:PRINT:IFERR=17 REPORT:PRINT" at line ";ERL:END
  130PRINT'"Hang on a minute ...":REPORT:PRINT" at line ";ERL:PRINT'"And here's the offending line ...":OSCLI"FX15":OSCLI"KEY0LIST"+STR$ERL+"|M":OSCLI"FX138,0,128":END
  140:
  150DEFPROCst:o=&FFEE:p=&CF8:q=&70:r=&71:s=&FFF1:DIMQ%400,n$(4,1),p$(4),x(16,2),y(16,2):FORn%=0TO2STEP2:P%=Q%:[OPTn%:.S:LDA#5:JSRo:LDA#0:STAq:.T:LDXq:LDA&110,X:CMP#13:BEQU:STAr:INX:STXq:LDX#r:LDY#0:LDA#&A:JSRs:LDX#1:LDY#0:LDAr,X:STAp,Y
  160INX:INY:LDAr,X:STAp,Y:INX:INX:INY:LDAr,X:STAp,Y:INX:INY:LDAr,X:STAp,Y:INX:INX:INY:LDAr,X:STAp,Y:INY:LDA#0:STAp,Y:INY:LDA#0:STAp,Y:LDA#&FF:JSRo:JMPT:.U:LDA#4:JSRo:RTS:.I:LDA#0:STAq:.J:LDXq:LDA&110,X:CMP#13:BEQK:STAr:INX:STXq:LDX#r
  170LDY#0:LDA#&A:JSRs:LDX#1:LDY#0:LDAr,X:LSRA:STAp,Y:INX:INY:LDAr,X:LSRA:STAp,Y:INX:INY:LDAr,X:STAp,Y:INX:INY:LDAr,X:STAp,Y:INX:INY:LDAr,X:STAp,Y:INX:INY:LDAr,X:ASLA:STAp,Y:INX:INY:LDAr,X:ASLA:STAp,Y:INX:INY:LDAr,X:ASLA:STAp,Y:LDA#&FF
  180JSRo:JMPJ:.K:RTS:]:NEXT:VDU23;8202;0;0;0;19,0,4;0;19,1,3;0;:PROCbo:PROCwi(32,912,1248,1008):PROCtx("G U N B O A T",432,992):PROCsm("BY DARREN BRADLEY",368,946):PROCtx("I N S T R U C T I O N S",272,864):VDU28,1,31,38,7
  190PRINT"Introduction:"''" Gunboat is a version of the classic"'"two player game, ";:PROCit("'BATTLESHIP'."):PRINT''" This simulation allows two players"'"to fight it out at sea, by attempting"'"to find the opponent's hidden ships,"
  200PRINT"and ultimately, to sink their fleet."''" Each fleet consists of five ships:"''"1.) The Aircraft Carrier"'"2.) The Battleship"'"3.) The Destroyer"'"4.) The Submarine"'"5.) The Tug Boat"''" The ships are of different sizes,"
  210PRINT"and thus require a varying number of"'"hits to sink.":PROCspscr:PRINT"How to play:"''" Each player must in turn, set the"'"coordinates of their fleet, on the"'"appropriate grid."''" While a player is setting up their"
  220PRINT"fleet, their opponent must leave the"'"room or close their eyes, so as"'"not to see the location of the other"'"player's ships."''" The keys with which to set up the"'"fleet are:"''"Z .. Move Cross Left"'"X .. Move Cross Right"
  230PRINT"* .. Move Cross Up"'"? .. Move Cross Down"'"<RETURN> .. Set Ship"'"<SPACE-BAR> .. Confirm Direction"'"<SHIFT> .. Unset Ship":PROCspscr:PRINT" Once a player has positioned their"'"fleet, the coordinates are stored"
  240PRINT"and the ships are erased from sight."''" The second stage of the game is"'"the battle. Each player, in turn,"'"inputs a pair of coordinates, in"'"the hope of hitting one of the"'"opponent's ships. The winner is the"
  250PRINT"player who sinks their opponent's"'"fleet first."''"The keys for battle are:"''"<A-J> .. First Coordinate"'"<0-9> .. Second Coordinate"'"<DELETE> .. Alter both coordinates"'':PROCit("GOOD LUCK !"):PROCspscr:VDU26,12:RESTORE1210
  260FORn%=0TO4:READn$(n%,0),n$(n%,1),p$(n%):NEXT:M%=0:N%=0:ENVELOPE1,4,4,8,128,4,8,128,126,0,0,-126,126,126:OSCLI"FX9,1":OSCLI"FX10,1":VDU23,224,170,85,170,85,170,85,170,85,23,225,0,0,20,42,85,170,85,170,23,226,24,24,24,255,255,24,24,24
  270VDU23,227,0,60,66,66,66,66,60,0,23,228,0,60,126,126,126,126,60,0,23,229,255,255,255,255,255,255,255,255,23,230,16,16,56,120,244,228,66,2,23,231,8,8,28,30,47,39,66,64:SP$=STRING$(11,CHR$229):CO$=">>   :   <<":FORn%=0TO4
  280PRINTSTRING$(255,CHR$224);:NEXT:VDU5:MOVE1122,30:PRINTSTRING$(6,CHR$224):PROCbo:FORn%=0TO6:READa,b,c,d:PROCwi(a,b,c,d):NEXT:x=128:FORy=40TO480STEP44:MOVE128,y:DRAW568,y:MOVEx,40:DRAWx,480:MOVE128,y+484:DRAW568,y+484:MOVEx,524
  290DRAWx,964:x=x+44:NEXT:a=65:b=48:y=956:FORx=136TO532STEP44:MOVEx,1000:VDUa:MOVE80,y:VDUb:MOVEx,516:VDUa:MOVE80,y-484:VDUb:a=a+1:b=b+1:y=y-44:NEXT:PROCtx(p$(0),800,988):PROCtx(p$(1),800,460):PROCship(750,816):PROCship(750,288):ENDPROC
  300:
  310DEFPROCbo:GCOL0,1:MOVE0,0:DRAW0,1023:DRAW1279,1023:DRAW1279,0:DRAW0,0:ENDPROC
  320:
  330DEFPROCwi(a,b,c,d):VDU18,0,129,18,0,0,24,a-16;b-16;c-16;d-16;16,26:MOVEa-16,b-16:DRAWc-16,b-16:DRAWc-16,d-16:DRAWa-16,d-16:DRAWa-16,b-16:VDU18,0,128,18,0,1,24,a;b;c;d;16,26:MOVEa,b:DRAWc,b:DRAWc,d:DRAWa,d:DRAWa,b:ENDPROC
  340:
  350DEFPROCtx(a$,x,y):VDU18,0,1,5:FORyy=y-4TOy+4STEP4:FORxx=x-4TOx+4STEP4:MOVExx,yy:PROCit(a$):NEXT,:GCOL0,0:MOVEx,y:PROCit(a$):VDU18,0,1,4:ENDPROC
  360:
  370DEFPROCsm($&110,x%,y%):MOVEx%,y%:CALLS:ENDPROC
  380:
  390DEFPROCit($&110):CALLI:ENDPROC
  400:
  410DEFPROCspscr:LOCALa$,b$,c$,a%:OSCLI"FX21":a$=STRING$(19," ")+"Press <SPACE-BAR>":REPEAT:b$=INKEY$0:c$=RIGHT$(a$,1):a$=c$+LEFT$(a$,35):PRINTTAB(1,23);a$:FORa%=0TO100:NEXT:UNTILb$=" ":SOUND1,-15,152,1:CLS:PROCbo:ENDPROC
  420:
  430DEFPROCship(x,y):RESTORE1230:MOVEx,y:FORn%=0TO41:READa,b,c:PLOTa,b,c:NEXT:GCOL0,0:FORn%=0TO3:READa,b,c:PLOTa,b,c:NEXT:VDU18,4,0,5:MOVEx-60,y-26:PRINTSTRING$(17,CHR$225):MOVEx-60,y-58:PRINTSTRING$(17,CHR$224):VDU18,0,1,4:ENDPROC
  440:
  450DEFPROCenter:LOCALz:r%=1:GCOL4,0:REPEAT:PROCsm(p$(0),804,612):PROCsm(p$(2),692,588):PROCsm(p$(1),804,84):PROCsm(p$(3),740,60):IFz=0 PROCset(1)
  460z=z+1:UNTILz=2:PROCerase(y3,r%):z=0:r%=2:REPEAT:PROCsm(p$(0),804,612):PROCsm(p$(3),740,588):PROCsm(p$(1),804,84):PROCsm(p$(2),692,60):IFz=0 PROCset(2)
  470z=z+1:UNTILz=2:PROCerase(y3,r%):ENDPROC
  480:
  490DEFPROCset(z):S%=0:VDU5:FORn=0TO4:IFz=1 y=956:y1=y:y2=560:y3=704 ELSEy=472:y1=y:y2=76:y3=176
  500d=0:x=136:MOVE963-((LENn$(n,0)*32)/2),y3:PROCit(n$(n,0)):MOVEx,y:VDU226:REPEAT:IFINKEY-98 ANDx>136 PROCpr:x=x-44:PROCpr ELSEIFINKEY-67 ANDx<532 PROCpr:x=x+44:PROCpr
  510IFINKEY-73 ANDy<y1 PROCpr:y=y+44:PROCpr ELSEIFINKEY-105 ANDy>y2 PROCpr:y=y-44:PROCpr
  520IFINKEY-74 SOUND1,-15,150,1:ox=x:oy=y:d=FNst(ox,oy,y1,y2,n,z)
  530UNTILd:MOVE963-((LENn$(n,0)*32)/2),y3:PROCit(n$(n,0)):NEXT:ENDPROC
  540:
  550DEFPROCpr:MOVEx,y:VDU226:ENDPROC
  560:
  570DEFFNst(ox,oy,y1,y2,n,z):x1=ox-((VALn$(n,1))-1)*44:x2=ox+((VALn$(n,1))-1)*44:ya=oy-((VALn$(n,1))-1)*44:yb=oy+((VALn$(n,1))-1)*44:PROCch:PROCpr2:e=0:f=0:REPEAT
  580IFINKEY-98 ANDx1>135 PROCpr2:x=x1:y=oy:PROCpr2 ELSEIFINKEY-67 ANDx2<533 PROCpr2:x=x2:y=oy:PROCpr2
  590IFINKEY-105 ANDya>y2-1 PROCpr2:y=ya:x=ox:PROCpr2 ELSEIFINKEY-73 ANDyb<y1+1 PROCpr2:y=yb:x=ox:PROCpr2
  600IFINKEY-99 SOUND1,-15,80,1:MOVEox,oy:VDU226:PROCpr2:f=FNdrsh(z):e=-1
  610IFINKEY-1 e=-1:f=0:PROCpr2:SOUND1,-15,30,1:x=ox:y=oy
  620UNTILe:=f
  630:
  640DEFPROCch:IFox-((VALn$(n,1))-1)*44>136 x=x1 ELSEx=x2
  650ENDPROC
  660:
  670DEFPROCpr2:MOVEox+16,oy-16:DRAWx+16,y-16:MOVEx,y:VDU226:ENDPROC
  680:
  690DEFFNdrsh(z):IFx<ox w=FNchl(x,ox,z) ELSEIFox<x w=FNchl(ox,x,z) ELSEIFoy<y w=FNchr(oy,y,z) ELSEIFy<oy w=FNchr(y,oy,z)
  700IFw=0 x=136:y=y1:MOVEx,y:VDU226:=0 ELSE=-1
  710:
  720DEFFNchl(d,d1,z):k=0:l=0:FORH=d TOd1 STEP44:l=FNss(H,y,z):IFl k=-1
  730NEXT:IFk PROCillegal:=0 ELSEFORH=d TOd1 STEP44:MOVEH,y:VDU227:ONz GOSUB740,750:NEXT:=-1
  740x(S%,0)=H:x(S%,1)=y:S%=S%+1:RETURN
  750y(S%,0)=H:y(S%,1)=y:S%=S%+1:RETURN
  760:
  770DEFFNchr(d,d1,z):k=0:l=0:FORH=d TOd1 STEP44:l=FNss(x,H,z):IFl k=-1
  780NEXT:IFk PROCillegal:=0 ELSEFORH=d TOd1 STEP44:MOVEx,H:VDU227:ONz GOSUB790,800:NEXT:=-1
  790x(S%,0)=x:x(S%,1)=H:S%=S%+1:RETURN
  800y(S%,0)=x:y(S%,1)=H:S%=S%+1:RETURN
  810:
  820DEFFNss(q,r,z):LOCALa%:b%=0:FORa%=0TO16:ONz GOSUB830,840:NEXT:=b%
  830IFx(a%,0)=q ANDx(a%,1)=r b%=-1:RETURN ELSERETURN
  840IFy(a%,0)=q ANDy(a%,1)=r b%=-1:RETURN ELSERETURN
  850:
  860DEFPROCillegal:MOVE963-((LENn$(n,0)*32)/2),y3:PROCit(n$(n,0)):MOVE723,y3:PROCit("ILLEGAL PLACING"):FORv=0TO14:SOUND1,-15,20,1:SOUND1,-15,8,1:NEXT:MOVE723,y3:PROCit("ILLEGAL PLACING"):MOVE963-((LENn$(n,0)*32)/2),y3:PROCit(n$(n,0))
  870ENDPROC
  880:
  890DEFPROCerase(y3,r%):LOCALt%,h%:REPEAT:PROCsm("ALL SHIPS O.K.",739,y3-92):PROCsm("PRESS <SPACE-BAR>",692,y3-116):IFt%=0 OSCLI"FX21":REPEATUNTILGET=32
  900t%=t%+1:UNTILt%=2:VDU5:FORh%=0TO16:ONr% GOSUB910,920:NEXT:SOUND1,1,28,6:SOUND1,0,0,3:SOUND1,1,28,6:ENDPROC
  910MOVEx(h%,0),x(h%,1):VDU227:RETURN
  920MOVEy(h%,0),y(h%,1):VDU227:RETURN
  930:
  940DEFPROCbattle:PROCpl1:IFM%=17 ENDPROC ELSEPROCpl2:ENDPROC
  950:
  960DEFPROCpl1:hit%=-1:GCOL4,0:PROCsm(p$(0),804,612):PROCsm(p$(2),692,588):PROCsm(p$(1),804,84):PROCsm(p$(4),724,60):VDU5
  970GCOL0,1:MOVE787,704:PRINTCO$:MOVE883,704:w=FNkey(472):IFw=0 MOVE787,704:GCOL0,0:PRINTSP$:GOTO970
  980FORn=224TO140STEP-4:SOUND1,-15,n,1:NEXT:FORj%=0TO16:IFy(j%,0)=a% ANDy(j%,1)=b% ANDy(j%,2)<>1 hit%=j%
  990NEXT:IFhit%>-1 PROChit(298):y(hit%,2)=1:M%=M%+1 ELSEMOVEa%,b%:VDU227
 1000MOVE787,704:GCOL0,0:PRINTSP$:GCOL4,0:PROCsm(p$(0),804,612):PROCsm(p$(2),692,588):PROCsm(p$(1),804,84):PROCsm(p$(4),724,60):ENDPROC
 1010:
 1020DEFFNkey(e%):OSCLI"FX21":REPEAT:a%=GET:UNTILa%>64ANDa%<75:PRINTCHR$a%;"   ";:SOUND1,1,200,2:a%=136+((a%-65)*44):REPEAT:b%=GET:UNTILb%>47ANDb%<58:VDUb%:SOUND1,1,200,2:b%=e%-((b%-48)*44):REPEATUNTILINKEY-90ORINKEY-74
 1030IFINKEY-90 THEN=0ELSE=-1
 1040:
 1050DEFPROChit(f%):VDU19,0,12;0;:SOUND0,-15,20,40:PROCboom(770,f%):FORg=0TO1200:NEXT:PROCboom(770,f%):VDU19,0,4;0;:MOVEa%,b%:VDU228:ENDPROC
 1060:
 1070DEFPROCboom(x,y):LOCALa%,b%,c%:RESTORE1250:GCOL4,0:MOVEx,y:FORa%=0TO23:READb%,c%:PLOT1,b%,c%:NEXT:ENDPROC
 1080:
 1090DEFPROCpl2:hit%=-1:PROCsm(p$(0),804,612):PROCsm(p$(4),724,588):PROCsm(p$(1),804,84):PROCsm(p$(2),692,60):VDU5
 1100GCOL0,1:MOVE787,176:PRINTCO$:MOVE883,176:w=FNkey(956):IFw=0 MOVE787,176:GCOL0,0:PRINTSP$:GOTO1100
 1110FORn=224TO140STEP-4:SOUND1,-15,n,1:NEXT:FORj%=0TO16:IFx(j%,0)=a% ANDx(j%,1)=b% ANDx(j%,2)<>1 hit%=j%
 1120NEXT:IFhit%>-1 PROChit(826):x(hit%,2)=1:N%=N%+1 ELSEMOVEa%,b%:VDU227
 1130MOVE787,176:GCOL0,0:PRINTSP$:GCOL4,0:PROCsm(p$(0),804,612):PROCsm(p$(4),724,588):PROCsm(p$(1),804,84):PROCsm(p$(2),692,60):ENDPROC
 1140:
 1150DEFPROCwin:LOCALa,b,c,d:CLS:PROCbo:PROCship(416,480):MOVE4,454:VDU5:PRINTSTRING$(11,CHR$225):MOVE900,454:PRINTSTRING$(12,CHR$225):MOVE4,422:PRINTSTRING$(11,CHR$224):MOVE900,422:PRINTSTRING$(12,CHR$224):IFM%=17 d=1 ELSEIFN%=17 d=0
 1160PROCtx("HARD LUCK "+p$(d)+" !",288,864):PROCtx(p$(ABS(d-1))+" HAS SUNK YOUR FLEET.",144,800):VDU5:a=230:b=-24:c=20:REPEAT:FORn=0TO1:GCOL4,0:MOVE594+b,575:VDUa:FORk=0TO150:NEXT,:b=0:a=a+1:c=c-1:IFa=232 a=230:b=-24
 1170UNTILc=0:VDU4,28,1,31,38,0:PROCspscr:ENDPROC
 1180:
 1190DEFPROCsa:VDU12,17,129,17,0,31,6,12,80,82,79,71,82,65,77,77,69,68,32,66,89,32,68,65,82,82,69,78,32,66,82,65,68,76,69,89,31,16,14,49,57,47,48,52,47,57,48,13,10,17,1,17,128:ENDPROC
 1200:
 1210DATA AIRCRAFT CARRIER,5,PLAYER ONE,BATTLESHIP,4,PLAYER TWO,DESTROYER,3,ENTER COORDINATES,SUBMARINE,3,LEAVE THE ROOM,TUG BOAT,2,FINGERS CROSSED
 1220DATA32,32,608,1008,672,944,1248,1008,672,656,1248,912,672,560,1248,624,672,416,1248,480,672,128,1248,384,672,32,1248,96
 1230DATA0,40,-40,81,350,0,0,30,40,81,-420,0,0,-10,0,0,0,10,81,440,0,0,0,-10,81,-440,0,0,70,10,0,60,0,81,-20,20,0,-30,0,81,-10,-20,0,10,10,0,0,10,81,-30,0,0,0,-10,81,30,0,0,70,-10,0,20,0,81,0,50,0,0,-50,0,0,10,81,230,-10,0,0,10,81,-230,0
 1240DATA0,50,0,0,-10,40,81,-40,-40,0,0,40,81,40,0,0,40,-40,0,0,30,81,20,0,0,0,-30,81,-20,0,0,40,0,0,70,0,81,-70,50,0,30,0,81,40,-50,4,x-20,y,1,460,0,0,0,10,1,-460,0
 1250DATA-10,40,30,-10,20,40,20,-40,20,50,30,-40,20,30,20,-10,30,15,20,-30,30,35,20,-20,40,25,10,-20,30,20,10,-30,30,20,-20,-30,50,20,-20,-30,40,10,-30,-30,30,10,-20,-25

#� *****************************
#� *                           *
#� *          GUNBOAT          *
(#� *     BY DARREN BRADLEY     *
2#� *     (c) Electron User     *
<#� *                           *
F#� *****************************
P:
Z�4:� �err
d8�st:�enter:�:�battle:�M%=17 �N%=17:�win:�4:�"FX15":�
n:
x7��err:�22,6:�1,-15,200,1:�:�=17 �:�" at line ";�:�
���'"Hang on a minute ...":�:�" at line ";�:�'"And here's the offending line ...":�"FX15":�"KEY0LIST"+Þ+"|M":�"FX138,0,128":�
�:
����st:o=&FFEE:p=&CF8:q=&70:r=&71:s=&FFF1:�Q%400,n$(4,1),p$(4),x(16,2),y(16,2):�n%=0�2�2:P%=Q%:[OPTn%:.S:LDA#5:JSRo:LDA#0:STAq:.T:LDXq:LDA&110,X:CMP#13:BEQU:STAr:INX:STXq:LDX#r:LDY#0:LDA#&A:JSRs:LDX#1:LDY#0:LDAr,X:STAp,Y
��INX:INY:LDAr,X:STAp,Y:INX:INX:INY:LDAr,X:STAp,Y:INX:INY:LDAr,X:STAp,Y:INX:INX:INY:LDAr,X:STAp,Y:INY:LDA#0:STAp,Y:INY:LDA#0:STAp,Y:LDA#&FF:JSRo:JMPT:.U:LDA#4:JSRo:RTS:.I:LDA#0:STAq:.J:LDXq:LDA&110,X:CMP#13:BEQK:STAr:INX:STXq:LDX#r
��LDY#0:LDA#&A:JSRs:LDX#1:LDY#0:LDAr,X:LSRA:STAp,Y:INX:INY:LDAr,X:LSRA:STAp,Y:INX:INY:LDAr,X:STAp,Y:INX:INY:LDAr,X:STAp,Y:INX:INY:LDAr,X:STAp,Y:INX:INY:LDAr,X:ASLA:STAp,Y:INX:INY:LDAr,X:ASLA:STAp,Y:INX:INY:LDAr,X:ASLA:STAp,Y:LDA#&FF
��JSRo:JMPJ:.K:RTS:]:�:�23;8202;0;0;0;19,0,4;0;19,1,3;0;:�bo:�wi(32,912,1248,1008):�tx("G U N B O A T",432,992):�sm("BY DARREN BRADLEY",368,946):�tx("I N S T R U C T I O N S",272,864):�28,1,31,38,7
���"Introduction:"''" Gunboat is a version of the classic"'"two player game, ";:�it("'BATTLESHIP'."):�''" This simulation allows two players"'"to fight it out at sea, by attempting"'"to find the opponent's hidden ships,"
���"and ultimately, to sink their fleet."''" Each fleet consists of five ships:"''"1.) The Aircraft Carrier"'"2.) The Battleship"'"3.) The Destroyer"'"4.) The Submarine"'"5.) The Tug Boat"''" The ships are of different sizes,"
���"and thus require a varying number of"'"hits to sink.":�spscr:�"How to play:"''" Each player must in turn, set the"'"coordinates of their fleet, on the"'"appropriate grid."''" While a player is setting up their"
���"fleet, their opponent must leave the"'"room or close their eyes, so as"'"not to see the location of the other"'"player's ships."''" The keys with which to set up the"'"fleet are:"''"Z .. Move Cross Left"'"X .. Move Cross Right"
���"* .. Move Cross Up"'"? .. Move Cross Down"'"<RETURN> .. Set Ship"'"<SPACE-BAR> .. Confirm Direction"'"<SHIFT> .. Unset Ship":�spscr:�" Once a player has positioned their"'"fleet, the coordinates are stored"
���"and the ships are erased from sight."''" The second stage of the game is"'"the battle. Each player, in turn,"'"inputs a pair of coordinates, in"'"the hope of hitting one of the"'"opponent's ships. The winner is the"
���"player who sinks their opponent's"'"fleet first."''"The keys for battle are:"''"<A-J> .. First Coordinate"'"<0-9> .. Second Coordinate"'"<DELETE> .. Alter both coordinates"'':�it("GOOD LUCK !"):�spscr:�26,12:��tzD
��n%=0�4:�n$(n%,0),n$(n%,1),p$(n%):�:M%=0:N%=0:�1,4,4,8,128,4,8,128,126,0,0,-126,126,126:�"FX9,1":�"FX10,1":�23,224,170,85,170,85,170,85,170,85,23,225,0,0,20,42,85,170,85,170,23,226,24,24,24,255,255,24,24,24
��23,227,0,60,66,66,66,66,60,0,23,228,0,60,126,126,126,126,60,0,23,229,255,255,255,255,255,255,255,255,23,230,16,16,56,120,244,228,66,2,23,231,8,8,28,30,47,39,66,64:SP$=�11,�229):CO$=">>   :   <<":�n%=0�4
���255,�224);:�:�5:�1122,30:��6,�224):�bo:�n%=0�6:�a,b,c,d:�wi(a,b,c,d):�:x=128:�y=40�480�44:�128,y:�568,y:�x,40:�x,480:�128,y+484:�568,y+484:�x,524
"��x,964:x=x+44:�:a=65:b=48:y=956:�x=136�532�44:�x,1000:�a:�80,y:�b:�x,516:�a:�80,y-484:�b:a=a+1:b=b+1:y=y-44:�:�tx(p$(0),800,988):�tx(p$(1),800,460):�ship(750,816):�ship(750,288):�
,:
64��bo:�0,1:�0,0:�0,1023:�1279,1023:�1279,0:�0,0:�
@:
J���wi(a,b,c,d):�18,0,129,18,0,0,24,a-16;b-16;c-16;d-16;16,26:�a-16,b-16:�c-16,b-16:�c-16,d-16:�a-16,d-16:�a-16,b-16:�18,0,128,18,0,1,24,a;b;c;d;16,26:�a,b:�c,b:�c,d:�a,d:�a,b:�
T:
^f��tx(a$,x,y):�18,0,1,5:�yy=y-4�y+4�4:�xx=x-4�x+4�4:�xx,yy:�it(a$):�,:�0,0:�x,y:�it(a$):�18,0,1,4:�
h:
r!��sm($&110,x%,y%):�x%,y%:�S:�
|:
���it($&110):�I:�
�:
����spscr:�a$,b$,c$,a%:�"FX21":a$=�19," ")+"Press <SPACE-BAR>":�:b$=�0:c$=�a$,1):a$=c$+�a$,35):�1,23);a$:�a%=0�100:�:�b$=" ":�1,-15,152,1:�:�bo:�
�:
����ship(x,y):��dND:�x,y:�n%=0�41:�a,b,c:�a,b,c:�:�0,0:�n%=0�3:�a,b,c:�a,b,c:�:�18,4,0,5:�x-60,y-26:��17,�225):�x-60,y-58:��17,�224):�18,0,1,4:�
�:
�q��enter:�z:r%=1:�4,0:�:�sm(p$(0),804,612):�sm(p$(2),692,588):�sm(p$(1),804,84):�sm(p$(3),740,60):�z=0 �set(1)
�~z=z+1:�z=2:�erase(y3,r%):z=0:r%=2:�:�sm(p$(0),804,612):�sm(p$(3),740,588):�sm(p$(1),804,84):�sm(p$(2),692,60):�z=0 �set(2)
�z=z+1:�z=2:�erase(y3,r%):�
�:
�R��set(z):S%=0:�5:�n=0�4:�z=1 y=956:y1=y:y2=560:y3=704 �y=472:y1=y:y2=76:y3=176
�yd=0:x=136:�963-((�n$(n,0)*32)/2),y3:�it(n$(n,0)):�x,y:�226:�:�-98 �x>136 �pr:x=x-44:�pr ��-67 �x<532 �pr:x=x+44:�pr
�;�-73 �y<y1 �pr:y=y+44:�pr ��-105 �y>y2 �pr:y=y-44:�pr
7�-74 �1,-15,150,1:ox=x:oy=y:d=�st(ox,oy,y1,y2,n,z)
1�d:�963-((�n$(n,0)*32)/2),y3:�it(n$(n,0)):�:�
:
&��pr:�x,y:�226:�
0:
:�ݤst(ox,oy,y1,y2,n,z):x1=ox-((�n$(n,1))-1)*44:x2=ox+((�n$(n,1))-1)*44:ya=oy-((�n$(n,1))-1)*44:yb=oy+((�n$(n,1))-1)*44:�ch:�pr2:e=0:f=0:�
DH�-98 �x1>135 �pr2:x=x1:y=oy:�pr2 ��-67 �x2<533 �pr2:x=x2:y=oy:�pr2
NK�-105 �ya>y2-1 �pr2:y=ya:x=ox:�pr2 ��-73 �yb<y1+1 �pr2:y=yb:x=ox:�pr2
X6�-99 �1,-15,80,1:�ox,oy:�226:�pr2:f=�drsh(z):e=-1
b,�-1 e=-1:f=0:�pr2:�1,-15,30,1:x=ox:y=oy
l	�e:=f
v:
�-��ch:�ox-((�n$(n,1))-1)*44>136 x=x1 �x=x2
��
�:
�-��pr2:�ox+16,oy-16:�x+16,y-16:�x,y:�226:�
�:
�dݤdrsh(z):�x<ox w=�chl(x,ox,z) ��ox<x w=�chl(ox,x,z) ��oy<y w=�chr(oy,y,z) ��y<oy w=�chr(y,oy,z)
�%�w=0 x=136:y=y1:�x,y:�226:=0 �=-1
�:
�;ݤchl(d,d1,z):k=0:l=0:�H=d �d1 �44:l=�ss(H,y,z):�l k=-1
�@�:�k �illegal:=0 ��H=d �d1 �44:�H,y:�227:�z �ddB,�dnB:�:=-1
�!x(S%,0)=H:x(S%,1)=y:S%=S%+1:�
�!y(S%,0)=H:y(S%,1)=y:S%=S%+1:�
�:
;ݤchr(d,d1,z):k=0:l=0:�H=d �d1 �44:l=�ss(x,H,z):�l k=-1
@�:�k �illegal:=0 ��H=d �d1 �44:�x,H:�227:�z �TVC,�T`C:�:=-1
!x(S%,0)=x:x(S%,1)=H:S%=S%+1:�
 !y(S%,0)=x:y(S%,1)=H:S%=S%+1:�
*:
45ݤss(q,r,z):�a%:b%=0:�a%=0�16:�z �T~C,�DHC:�:=b%
>$�x(a%,0)=q �x(a%,1)=r b%=-1:� ��
H$�y(a%,0)=q �y(a%,1)=r b%=-1:� ��
R:
\���illegal:�963-((�n$(n,0)*32)/2),y3:�it(n$(n,0)):�723,y3:�it("ILLEGAL PLACING"):�v=0�14:�1,-15,20,1:�1,-15,8,1:�:�723,y3:�it("ILLEGAL PLACING"):�963-((�n$(n,0)*32)/2),y3:�it(n$(n,0))
f�
p:
zt��erase(y3,r%):�t%,h%:�:�sm("ALL SHIPS O.K.",739,y3-92):�sm("PRESS <SPACE-BAR>",692,y3-116):�t%=0 �"FX21":���=32
�Mt%=t%+1:�t%=2:�5:�h%=0�16:�r% �tNC,�tXC:�:�1,1,28,6:�1,0,0,3:�1,1,28,6:�
��x(h%,0),x(h%,1):�227:�
��y(h%,0),y(h%,1):�227:�
�:
�"��battle:�pl1:�M%=17 � ��pl2:�
�:
�c��pl1:hit%=-1:�4,0:�sm(p$(0),804,612):�sm(p$(2),692,588):�sm(p$(1),804,84):�sm(p$(4),724,60):�5
�I�0,1:�787,704:�CO$:�883,704:w=�key(472):�w=0 �787,704:�0,0:�SP$:�dJC
�S�n=224�140�-4:�1,-15,n,1:�:�j%=0�16:�y(j%,0)=a% �y(j%,1)=b% �y(j%,2)<>1 hit%=j%
�9�:�hit%>-1 �hit(298):y(hit%,2)=1:M%=M%+1 ��a%,b%:�227
�g�787,704:�0,0:�SP$:�4,0:�sm(p$(0),804,612):�sm(p$(2),692,588):�sm(p$(1),804,84):�sm(p$(4),724,60):�
�:
��ݤkey(e%):�"FX21":�:a%=�:�a%>64�a%<75:�a%;"   ";:�1,1,200,2:a%=136+((a%-65)*44):�:b%=�:�b%>47�b%<58:�b%:�1,1,200,2:b%=e%-((b%-48)*44):���-90��-74
�-90 �=0�=-1
:
g��hit(f%):�19,0,12;0;:�0,-15,20,40:�boom(770,f%):�g=0�1200:�:�boom(770,f%):�19,0,4;0;:�a%,b%:�228:�
$:
.F��boom(x,y):�a%,b%,c%:��dbD:�4,0:�x,y:�a%=0�23:�b%,c%:�1,b%,c%:�:�
8:
B^��pl2:hit%=-1:�sm(p$(0),804,612):�sm(p$(4),724,588):�sm(p$(1),804,84):�sm(p$(2),692,60):�5
LI�0,1:�787,176:�CO$:�883,176:w=�key(956):�w=0 �787,176:�0,0:�SP$:�DLD
VS�n=224�140�-4:�1,-15,n,1:�:�j%=0�16:�x(j%,0)=a% �x(j%,1)=b% �x(j%,2)<>1 hit%=j%
`9�:�hit%>-1 �hit(826):x(hit%,2)=1:N%=N%+1 ��a%,b%:�227
jg�787,176:�0,0:�SP$:�4,0:�sm(p$(0),804,612):�sm(p$(4),724,588):�sm(p$(1),804,84):�sm(p$(2),692,60):�
t:
~���win:�a,b,c,d:�:�bo:�ship(416,480):�4,454:�5:��11,�225):�900,454:��12,�225):�4,422:��11,�224):�900,422:��12,�224):�M%=17 d=1 ��N%=17 d=0
���tx("HARD LUCK "+p$(d)+" !",288,864):�tx(p$(�(d-1))+" HAS SUNK YOUR FLEET.",144,800):�5:a=230:b=-24:c=20:�:�n=0�1:�4,0:�594+b,575:�a:�k=0�150:�,:b=0:a=a+1:c=c-1:�a=232 a=230:b=-24
�!�c=0:�4,28,1,31,38,0:�spscr:�
�:
����sa:�12,17,129,17,0,31,6,12,80,82,79,71,82,65,77,77,69,68,32,66,89,32,68,65,82,82,69,78,32,66,82,65,68,76,69,89,31,16,14,49,57,47,48,52,47,57,48,13,10,17,1,17,128:�
�:
��� AIRCRAFT CARRIER,5,PLAYER ONE,BATTLESHIP,4,PLAYER TWO,DESTROYER,3,ENTER COORDINATES,SUBMARINE,3,LEAVE THE ROOM,TUG BOAT,2,FINGERS CROSSED
�x�32,32,608,1008,672,944,1248,1008,672,656,1248,912,672,560,1248,624,672,416,1248,480,672,128,1248,384,672,32,1248,96
���0,40,-40,81,350,0,0,30,40,81,-420,0,0,-10,0,0,0,10,81,440,0,0,0,-10,81,-440,0,0,70,10,0,60,0,81,-20,20,0,-30,0,81,-10,-20,0,10,10,0,0,10,81,-30,0,0,0,-10,81,30,0,0,70,-10,0,20,0,81,0,50,0,0,-50,0,0,10,81,230,-10,0,0,10,81,-230,0
ء�0,50,0,0,-10,40,81,-40,-40,0,0,40,81,40,0,0,40,-40,0,0,30,81,20,0,0,0,-30,81,-20,0,0,40,0,0,70,0,81,-70,50,0,30,0,81,40,-50,4,x-20,y,1,460,0,0,0,10,1,-460,0
��-10,40,30,-10,20,40,20,-40,20,50,30,-40,20,30,20,-10,30,15,20,-30,30,35,20,-20,40,25,10,-20,30,20,10,-30,30,20,-20,-30,50,20,-20,-30,40,10,-30,-30,30,10,-20,-25
�
00000000  0d 00 0a 23 f4 20 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |...#. **********|
00000010  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00000020  2a 2a 2a 0d 00 14 23 f4  20 2a 20 20 20 20 20 20  |***...#. *      |
00000030  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000040  20 20 20 20 20 2a 0d 00  1e 23 f4 20 2a 20 20 20  |     *...#. *   |
00000050  20 20 20 20 20 20 20 47  55 4e 42 4f 41 54 20 20  |       GUNBOAT  |
00000060  20 20 20 20 20 20 20 20  2a 0d 00 28 23 f4 20 2a  |        *..(#. *|
00000070  20 20 20 20 20 42 59 20  44 41 52 52 45 4e 20 42  |     BY DARREN B|
00000080  52 41 44 4c 45 59 20 20  20 20 20 2a 0d 00 32 23  |RADLEY     *..2#|
00000090  f4 20 2a 20 20 20 20 20  28 63 29 20 45 6c 65 63  |. *     (c) Elec|
000000a0  74 72 6f 6e 20 55 73 65  72 20 20 20 20 20 2a 0d  |tron User     *.|
000000b0  00 3c 23 f4 20 2a 20 20  20 20 20 20 20 20 20 20  |.<#. *          |
000000c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000000d0  20 2a 0d 00 46 23 f4 20  2a 2a 2a 2a 2a 2a 2a 2a  | *..F#. ********|
000000e0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000000f0  2a 2a 2a 2a 2a 0d 00 50  05 3a 0d 00 5a 0e eb 34  |*****..P.:..Z..4|
00000100  3a ee 85 20 f2 65 72 72  0d 00 64 38 f2 73 74 3a  |:.. .err..d8.st:|
00000110  f2 65 6e 74 65 72 3a f5  3a f2 62 61 74 74 6c 65  |.enter:.:.battle|
00000120  3a fd 4d 25 3d 31 37 20  84 4e 25 3d 31 37 3a f2  |:.M%=17 .N%=17:.|
00000130  77 69 6e 3a ef 34 3a ff  22 46 58 31 35 22 3a f9  |win:.4:."FX15":.|
00000140  0d 00 6e 05 3a 0d 00 78  37 dd f2 65 72 72 3a ef  |..n.:..x7..err:.|
00000150  32 32 2c 36 3a d4 31 2c  2d 31 35 2c 32 30 30 2c  |22,6:.1,-15,200,|
00000160  31 3a f1 3a e7 9f 3d 31  37 20 f6 3a f1 22 20 61  |1:.:..=17 .:." a|
00000170  74 20 6c 69 6e 65 20 22  3b 9e 3a e0 0d 00 82 80  |t line ";.:.....|
00000180  f1 27 22 48 61 6e 67 20  6f 6e 20 61 20 6d 69 6e  |.'"Hang on a min|
00000190  75 74 65 20 2e 2e 2e 22  3a f6 3a f1 22 20 61 74  |ute ...":.:." at|
000001a0  20 6c 69 6e 65 20 22 3b  9e 3a f1 27 22 41 6e 64  | line ";.:.'"And|
000001b0  20 68 65 72 65 27 73 20  74 68 65 20 6f 66 66 65  | here's the offe|
000001c0  6e 64 69 6e 67 20 6c 69  6e 65 20 2e 2e 2e 22 3a  |nding line ...":|
000001d0  ff 22 46 58 31 35 22 3a  ff 22 4b 45 59 30 4c 49  |."FX15":."KEY0LI|
000001e0  53 54 22 2b c3 9e 2b 22  7c 4d 22 3a ff 22 46 58  |ST"+..+"|M":."FX|
000001f0  31 33 38 2c 30 2c 31 32  38 22 3a e0 0d 00 8c 05  |138,0,128":.....|
00000200  3a 0d 00 96 de dd f2 73  74 3a 6f 3d 26 46 46 45  |:......st:o=&FFE|
00000210  45 3a 70 3d 26 43 46 38  3a 71 3d 26 37 30 3a 72  |E:p=&CF8:q=&70:r|
00000220  3d 26 37 31 3a 73 3d 26  46 46 46 31 3a de 51 25  |=&71:s=&FFF1:.Q%|
00000230  34 30 30 2c 6e 24 28 34  2c 31 29 2c 70 24 28 34  |400,n$(4,1),p$(4|
00000240  29 2c 78 28 31 36 2c 32  29 2c 79 28 31 36 2c 32  |),x(16,2),y(16,2|
00000250  29 3a e3 6e 25 3d 30 b8  32 88 32 3a 50 25 3d 51  |):.n%=0.2.2:P%=Q|
00000260  25 3a 5b 4f 50 54 6e 25  3a 2e 53 3a 4c 44 41 23  |%:[OPTn%:.S:LDA#|
00000270  35 3a 4a 53 52 6f 3a 4c  44 41 23 30 3a 53 54 41  |5:JSRo:LDA#0:STA|
00000280  71 3a 2e 54 3a 4c 44 58  71 3a 4c 44 41 26 31 31  |q:.T:LDXq:LDA&11|
00000290  30 2c 58 3a 43 4d 50 23  31 33 3a 42 45 51 55 3a  |0,X:CMP#13:BEQU:|
000002a0  53 54 41 72 3a 49 4e 58  3a 53 54 58 71 3a 4c 44  |STAr:INX:STXq:LD|
000002b0  58 23 72 3a 4c 44 59 23  30 3a 4c 44 41 23 26 41  |X#r:LDY#0:LDA#&A|
000002c0  3a 4a 53 52 73 3a 4c 44  58 23 31 3a 4c 44 59 23  |:JSRs:LDX#1:LDY#|
000002d0  30 3a 4c 44 41 72 2c 58  3a 53 54 41 70 2c 59 0d  |0:LDAr,X:STAp,Y.|
000002e0  00 a0 e9 49 4e 58 3a 49  4e 59 3a 4c 44 41 72 2c  |...INX:INY:LDAr,|
000002f0  58 3a 53 54 41 70 2c 59  3a 49 4e 58 3a 49 4e 58  |X:STAp,Y:INX:INX|
00000300  3a 49 4e 59 3a 4c 44 41  72 2c 58 3a 53 54 41 70  |:INY:LDAr,X:STAp|
00000310  2c 59 3a 49 4e 58 3a 49  4e 59 3a 4c 44 41 72 2c  |,Y:INX:INY:LDAr,|
00000320  58 3a 53 54 41 70 2c 59  3a 49 4e 58 3a 49 4e 58  |X:STAp,Y:INX:INX|
00000330  3a 49 4e 59 3a 4c 44 41  72 2c 58 3a 53 54 41 70  |:INY:LDAr,X:STAp|
00000340  2c 59 3a 49 4e 59 3a 4c  44 41 23 30 3a 53 54 41  |,Y:INY:LDA#0:STA|
00000350  70 2c 59 3a 49 4e 59 3a  4c 44 41 23 30 3a 53 54  |p,Y:INY:LDA#0:ST|
00000360  41 70 2c 59 3a 4c 44 41  23 26 46 46 3a 4a 53 52  |Ap,Y:LDA#&FF:JSR|
00000370  6f 3a 4a 4d 50 54 3a 2e  55 3a 4c 44 41 23 34 3a  |o:JMPT:.U:LDA#4:|
00000380  4a 53 52 6f 3a 52 54 53  3a 2e 49 3a 4c 44 41 23  |JSRo:RTS:.I:LDA#|
00000390  30 3a 53 54 41 71 3a 2e  4a 3a 4c 44 58 71 3a 4c  |0:STAq:.J:LDXq:L|
000003a0  44 41 26 31 31 30 2c 58  3a 43 4d 50 23 31 33 3a  |DA&110,X:CMP#13:|
000003b0  42 45 51 4b 3a 53 54 41  72 3a 49 4e 58 3a 53 54  |BEQK:STAr:INX:ST|
000003c0  58 71 3a 4c 44 58 23 72  0d 00 aa ea 4c 44 59 23  |Xq:LDX#r....LDY#|
000003d0  30 3a 4c 44 41 23 26 41  3a 4a 53 52 73 3a 4c 44  |0:LDA#&A:JSRs:LD|
000003e0  58 23 31 3a 4c 44 59 23  30 3a 4c 44 41 72 2c 58  |X#1:LDY#0:LDAr,X|
000003f0  3a 4c 53 52 41 3a 53 54  41 70 2c 59 3a 49 4e 58  |:LSRA:STAp,Y:INX|
00000400  3a 49 4e 59 3a 4c 44 41  72 2c 58 3a 4c 53 52 41  |:INY:LDAr,X:LSRA|
00000410  3a 53 54 41 70 2c 59 3a  49 4e 58 3a 49 4e 59 3a  |:STAp,Y:INX:INY:|
00000420  4c 44 41 72 2c 58 3a 53  54 41 70 2c 59 3a 49 4e  |LDAr,X:STAp,Y:IN|
00000430  58 3a 49 4e 59 3a 4c 44  41 72 2c 58 3a 53 54 41  |X:INY:LDAr,X:STA|
00000440  70 2c 59 3a 49 4e 58 3a  49 4e 59 3a 4c 44 41 72  |p,Y:INX:INY:LDAr|
00000450  2c 58 3a 53 54 41 70 2c  59 3a 49 4e 58 3a 49 4e  |,X:STAp,Y:INX:IN|
00000460  59 3a 4c 44 41 72 2c 58  3a 41 53 4c 41 3a 53 54  |Y:LDAr,X:ASLA:ST|
00000470  41 70 2c 59 3a 49 4e 58  3a 49 4e 59 3a 4c 44 41  |Ap,Y:INX:INY:LDA|
00000480  72 2c 58 3a 41 53 4c 41  3a 53 54 41 70 2c 59 3a  |r,X:ASLA:STAp,Y:|
00000490  49 4e 58 3a 49 4e 59 3a  4c 44 41 72 2c 58 3a 41  |INX:INY:LDAr,X:A|
000004a0  53 4c 41 3a 53 54 41 70  2c 59 3a 4c 44 41 23 26  |SLA:STAp,Y:LDA#&|
000004b0  46 46 0d 00 b4 c7 4a 53  52 6f 3a 4a 4d 50 4a 3a  |FF....JSRo:JMPJ:|
000004c0  2e 4b 3a 52 54 53 3a 5d  3a ed 3a ef 32 33 3b 38  |.K:RTS:]:.:.23;8|
000004d0  32 30 32 3b 30 3b 30 3b  30 3b 31 39 2c 30 2c 34  |202;0;0;0;19,0,4|
000004e0  3b 30 3b 31 39 2c 31 2c  33 3b 30 3b 3a f2 62 6f  |;0;19,1,3;0;:.bo|
000004f0  3a f2 77 69 28 33 32 2c  39 31 32 2c 31 32 34 38  |:.wi(32,912,1248|
00000500  2c 31 30 30 38 29 3a f2  74 78 28 22 47 20 55 20  |,1008):.tx("G U |
00000510  4e 20 42 20 4f 20 41 20  54 22 2c 34 33 32 2c 39  |N B O A T",432,9|
00000520  39 32 29 3a f2 73 6d 28  22 42 59 20 44 41 52 52  |92):.sm("BY DARR|
00000530  45 4e 20 42 52 41 44 4c  45 59 22 2c 33 36 38 2c  |EN BRADLEY",368,|
00000540  39 34 36 29 3a f2 74 78  28 22 49 20 4e 20 53 20  |946):.tx("I N S |
00000550  54 20 52 20 55 20 43 20  54 20 49 20 4f 20 4e 20  |T R U C T I O N |
00000560  53 22 2c 32 37 32 2c 38  36 34 29 3a ef 32 38 2c  |S",272,864):.28,|
00000570  31 2c 33 31 2c 33 38 2c  37 0d 00 be de f1 22 49  |1,31,38,7....."I|
00000580  6e 74 72 6f 64 75 63 74  69 6f 6e 3a 22 27 27 22  |ntroduction:"''"|
00000590  20 47 75 6e 62 6f 61 74  20 69 73 20 61 20 76 65  | Gunboat is a ve|
000005a0  72 73 69 6f 6e 20 6f 66  20 74 68 65 20 63 6c 61  |rsion of the cla|
000005b0  73 73 69 63 22 27 22 74  77 6f 20 70 6c 61 79 65  |ssic"'"two playe|
000005c0  72 20 67 61 6d 65 2c 20  22 3b 3a f2 69 74 28 22  |r game, ";:.it("|
000005d0  27 42 41 54 54 4c 45 53  48 49 50 27 2e 22 29 3a  |'BATTLESHIP'."):|
000005e0  f1 27 27 22 20 54 68 69  73 20 73 69 6d 75 6c 61  |.''" This simula|
000005f0  74 69 6f 6e 20 61 6c 6c  6f 77 73 20 74 77 6f 20  |tion allows two |
00000600  70 6c 61 79 65 72 73 22  27 22 74 6f 20 66 69 67  |players"'"to fig|
00000610  68 74 20 69 74 20 6f 75  74 20 61 74 20 73 65 61  |ht it out at sea|
00000620  2c 20 62 79 20 61 74 74  65 6d 70 74 69 6e 67 22  |, by attempting"|
00000630  27 22 74 6f 20 66 69 6e  64 20 74 68 65 20 6f 70  |'"to find the op|
00000640  70 6f 6e 65 6e 74 27 73  20 68 69 64 64 65 6e 20  |ponent's hidden |
00000650  73 68 69 70 73 2c 22 0d  00 c8 e4 f1 22 61 6e 64  |ships,"....."and|
00000660  20 75 6c 74 69 6d 61 74  65 6c 79 2c 20 74 6f 20  | ultimately, to |
00000670  73 69 6e 6b 20 74 68 65  69 72 20 66 6c 65 65 74  |sink their fleet|
00000680  2e 22 27 27 22 20 45 61  63 68 20 66 6c 65 65 74  |."''" Each fleet|
00000690  20 63 6f 6e 73 69 73 74  73 20 6f 66 20 66 69 76  | consists of fiv|
000006a0  65 20 73 68 69 70 73 3a  22 27 27 22 31 2e 29 20  |e ships:"''"1.) |
000006b0  54 68 65 20 41 69 72 63  72 61 66 74 20 43 61 72  |The Aircraft Car|
000006c0  72 69 65 72 22 27 22 32  2e 29 20 54 68 65 20 42  |rier"'"2.) The B|
000006d0  61 74 74 6c 65 73 68 69  70 22 27 22 33 2e 29 20  |attleship"'"3.) |
000006e0  54 68 65 20 44 65 73 74  72 6f 79 65 72 22 27 22  |The Destroyer"'"|
000006f0  34 2e 29 20 54 68 65 20  53 75 62 6d 61 72 69 6e  |4.) The Submarin|
00000700  65 22 27 22 35 2e 29 20  54 68 65 20 54 75 67 20  |e"'"5.) The Tug |
00000710  42 6f 61 74 22 27 27 22  20 54 68 65 20 73 68 69  |Boat"''" The shi|
00000720  70 73 20 61 72 65 20 6f  66 20 64 69 66 66 65 72  |ps are of differ|
00000730  65 6e 74 20 73 69 7a 65  73 2c 22 0d 00 d2 d8 f1  |ent sizes,".....|
00000740  22 61 6e 64 20 74 68 75  73 20 72 65 71 75 69 72  |"and thus requir|
00000750  65 20 61 20 76 61 72 79  69 6e 67 20 6e 75 6d 62  |e a varying numb|
00000760  65 72 20 6f 66 22 27 22  68 69 74 73 20 74 6f 20  |er of"'"hits to |
00000770  73 69 6e 6b 2e 22 3a f2  73 70 73 63 72 3a f1 22  |sink.":.spscr:."|
00000780  48 6f 77 20 74 6f 20 70  6c 61 79 3a 22 27 27 22  |How to play:"''"|
00000790  20 45 61 63 68 20 70 6c  61 79 65 72 20 6d 75 73  | Each player mus|
000007a0  74 20 69 6e 20 74 75 72  6e 2c 20 73 65 74 20 74  |t in turn, set t|
000007b0  68 65 22 27 22 63 6f 6f  72 64 69 6e 61 74 65 73  |he"'"coordinates|
000007c0  20 6f 66 20 74 68 65 69  72 20 66 6c 65 65 74 2c  | of their fleet,|
000007d0  20 6f 6e 20 74 68 65 22  27 22 61 70 70 72 6f 70  | on the"'"approp|
000007e0  72 69 61 74 65 20 67 72  69 64 2e 22 27 27 22 20  |riate grid."''" |
000007f0  57 68 69 6c 65 20 61 20  70 6c 61 79 65 72 20 69  |While a player i|
00000800  73 20 73 65 74 74 69 6e  67 20 75 70 20 74 68 65  |s setting up the|
00000810  69 72 22 0d 00 dc e9 f1  22 66 6c 65 65 74 2c 20  |ir"....."fleet, |
00000820  74 68 65 69 72 20 6f 70  70 6f 6e 65 6e 74 20 6d  |their opponent m|
00000830  75 73 74 20 6c 65 61 76  65 20 74 68 65 22 27 22  |ust leave the"'"|
00000840  72 6f 6f 6d 20 6f 72 20  63 6c 6f 73 65 20 74 68  |room or close th|
00000850  65 69 72 20 65 79 65 73  2c 20 73 6f 20 61 73 22  |eir eyes, so as"|
00000860  27 22 6e 6f 74 20 74 6f  20 73 65 65 20 74 68 65  |'"not to see the|
00000870  20 6c 6f 63 61 74 69 6f  6e 20 6f 66 20 74 68 65  | location of the|
00000880  20 6f 74 68 65 72 22 27  22 70 6c 61 79 65 72 27  | other"'"player'|
00000890  73 20 73 68 69 70 73 2e  22 27 27 22 20 54 68 65  |s ships."''" The|
000008a0  20 6b 65 79 73 20 77 69  74 68 20 77 68 69 63 68  | keys with which|
000008b0  20 74 6f 20 73 65 74 20  75 70 20 74 68 65 22 27  | to set up the"'|
000008c0  22 66 6c 65 65 74 20 61  72 65 3a 22 27 27 22 5a  |"fleet are:"''"Z|
000008d0  20 2e 2e 20 4d 6f 76 65  20 43 72 6f 73 73 20 4c  | .. Move Cross L|
000008e0  65 66 74 22 27 22 58 20  2e 2e 20 4d 6f 76 65 20  |eft"'"X .. Move |
000008f0  43 72 6f 73 73 20 52 69  67 68 74 22 0d 00 e6 d4  |Cross Right"....|
00000900  f1 22 2a 20 2e 2e 20 4d  6f 76 65 20 43 72 6f 73  |."* .. Move Cros|
00000910  73 20 55 70 22 27 22 3f  20 2e 2e 20 4d 6f 76 65  |s Up"'"? .. Move|
00000920  20 43 72 6f 73 73 20 44  6f 77 6e 22 27 22 3c 52  | Cross Down"'"<R|
00000930  45 54 55 52 4e 3e 20 2e  2e 20 53 65 74 20 53 68  |ETURN> .. Set Sh|
00000940  69 70 22 27 22 3c 53 50  41 43 45 2d 42 41 52 3e  |ip"'"<SPACE-BAR>|
00000950  20 2e 2e 20 43 6f 6e 66  69 72 6d 20 44 69 72 65  | .. Confirm Dire|
00000960  63 74 69 6f 6e 22 27 22  3c 53 48 49 46 54 3e 20  |ction"'"<SHIFT> |
00000970  2e 2e 20 55 6e 73 65 74  20 53 68 69 70 22 3a f2  |.. Unset Ship":.|
00000980  73 70 73 63 72 3a f1 22  20 4f 6e 63 65 20 61 20  |spscr:." Once a |
00000990  70 6c 61 79 65 72 20 68  61 73 20 70 6f 73 69 74  |player has posit|
000009a0  69 6f 6e 65 64 20 74 68  65 69 72 22 27 22 66 6c  |ioned their"'"fl|
000009b0  65 65 74 2c 20 74 68 65  20 63 6f 6f 72 64 69 6e  |eet, the coordin|
000009c0  61 74 65 73 20 61 72 65  20 73 74 6f 72 65 64 22  |ates are stored"|
000009d0  0d 00 f0 dd f1 22 61 6e  64 20 74 68 65 20 73 68  |....."and the sh|
000009e0  69 70 73 20 61 72 65 20  65 72 61 73 65 64 20 66  |ips are erased f|
000009f0  72 6f 6d 20 73 69 67 68  74 2e 22 27 27 22 20 54  |rom sight."''" T|
00000a00  68 65 20 73 65 63 6f 6e  64 20 73 74 61 67 65 20  |he second stage |
00000a10  6f 66 20 74 68 65 20 67  61 6d 65 20 69 73 22 27  |of the game is"'|
00000a20  22 74 68 65 20 62 61 74  74 6c 65 2e 20 45 61 63  |"the battle. Eac|
00000a30  68 20 70 6c 61 79 65 72  2c 20 69 6e 20 74 75 72  |h player, in tur|
00000a40  6e 2c 22 27 22 69 6e 70  75 74 73 20 61 20 70 61  |n,"'"inputs a pa|
00000a50  69 72 20 6f 66 20 63 6f  6f 72 64 69 6e 61 74 65  |ir of coordinate|
00000a60  73 2c 20 69 6e 22 27 22  74 68 65 20 68 6f 70 65  |s, in"'"the hope|
00000a70  20 6f 66 20 68 69 74 74  69 6e 67 20 6f 6e 65 20  | of hitting one |
00000a80  6f 66 20 74 68 65 22 27  22 6f 70 70 6f 6e 65 6e  |of the"'"opponen|
00000a90  74 27 73 20 73 68 69 70  73 2e 20 54 68 65 20 77  |t's ships. The w|
00000aa0  69 6e 6e 65 72 20 69 73  20 74 68 65 22 0d 00 fa  |inner is the"...|
00000ab0  db f1 22 70 6c 61 79 65  72 20 77 68 6f 20 73 69  |.."player who si|
00000ac0  6e 6b 73 20 74 68 65 69  72 20 6f 70 70 6f 6e 65  |nks their oppone|
00000ad0  6e 74 27 73 22 27 22 66  6c 65 65 74 20 66 69 72  |nt's"'"fleet fir|
00000ae0  73 74 2e 22 27 27 22 54  68 65 20 6b 65 79 73 20  |st."''"The keys |
00000af0  66 6f 72 20 62 61 74 74  6c 65 20 61 72 65 3a 22  |for battle are:"|
00000b00  27 27 22 3c 41 2d 4a 3e  20 2e 2e 20 46 69 72 73  |''"<A-J> .. Firs|
00000b10  74 20 43 6f 6f 72 64 69  6e 61 74 65 22 27 22 3c  |t Coordinate"'"<|
00000b20  30 2d 39 3e 20 2e 2e 20  53 65 63 6f 6e 64 20 43  |0-9> .. Second C|
00000b30  6f 6f 72 64 69 6e 61 74  65 22 27 22 3c 44 45 4c  |oordinate"'"<DEL|
00000b40  45 54 45 3e 20 2e 2e 20  41 6c 74 65 72 20 62 6f  |ETE> .. Alter bo|
00000b50  74 68 20 63 6f 6f 72 64  69 6e 61 74 65 73 22 27  |th coordinates"'|
00000b60  27 3a f2 69 74 28 22 47  4f 4f 44 20 4c 55 43 4b  |':.it("GOOD LUCK|
00000b70  20 21 22 29 3a f2 73 70  73 63 72 3a ef 32 36 2c  | !"):.spscr:.26,|
00000b80  31 32 3a f7 8d 74 7a 44  0d 01 04 d2 e3 6e 25 3d  |12:..tzD.....n%=|
00000b90  30 b8 34 3a f3 6e 24 28  6e 25 2c 30 29 2c 6e 24  |0.4:.n$(n%,0),n$|
00000ba0  28 6e 25 2c 31 29 2c 70  24 28 6e 25 29 3a ed 3a  |(n%,1),p$(n%):.:|
00000bb0  4d 25 3d 30 3a 4e 25 3d  30 3a e2 31 2c 34 2c 34  |M%=0:N%=0:.1,4,4|
00000bc0  2c 38 2c 31 32 38 2c 34  2c 38 2c 31 32 38 2c 31  |,8,128,4,8,128,1|
00000bd0  32 36 2c 30 2c 30 2c 2d  31 32 36 2c 31 32 36 2c  |26,0,0,-126,126,|
00000be0  31 32 36 3a ff 22 46 58  39 2c 31 22 3a ff 22 46  |126:."FX9,1":."F|
00000bf0  58 31 30 2c 31 22 3a ef  32 33 2c 32 32 34 2c 31  |X10,1":.23,224,1|
00000c00  37 30 2c 38 35 2c 31 37  30 2c 38 35 2c 31 37 30  |70,85,170,85,170|
00000c10  2c 38 35 2c 31 37 30 2c  38 35 2c 32 33 2c 32 32  |,85,170,85,23,22|
00000c20  35 2c 30 2c 30 2c 32 30  2c 34 32 2c 38 35 2c 31  |5,0,0,20,42,85,1|
00000c30  37 30 2c 38 35 2c 31 37  30 2c 32 33 2c 32 32 36  |70,85,170,23,226|
00000c40  2c 32 34 2c 32 34 2c 32  34 2c 32 35 35 2c 32 35  |,24,24,24,255,25|
00000c50  35 2c 32 34 2c 32 34 2c  32 34 0d 01 0e cf ef 32  |5,24,24,24.....2|
00000c60  33 2c 32 32 37 2c 30 2c  36 30 2c 36 36 2c 36 36  |3,227,0,60,66,66|
00000c70  2c 36 36 2c 36 36 2c 36  30 2c 30 2c 32 33 2c 32  |,66,66,60,0,23,2|
00000c80  32 38 2c 30 2c 36 30 2c  31 32 36 2c 31 32 36 2c  |28,0,60,126,126,|
00000c90  31 32 36 2c 31 32 36 2c  36 30 2c 30 2c 32 33 2c  |126,126,60,0,23,|
00000ca0  32 32 39 2c 32 35 35 2c  32 35 35 2c 32 35 35 2c  |229,255,255,255,|
00000cb0  32 35 35 2c 32 35 35 2c  32 35 35 2c 32 35 35 2c  |255,255,255,255,|
00000cc0  32 35 35 2c 32 33 2c 32  33 30 2c 31 36 2c 31 36  |255,23,230,16,16|
00000cd0  2c 35 36 2c 31 32 30 2c  32 34 34 2c 32 32 38 2c  |,56,120,244,228,|
00000ce0  36 36 2c 32 2c 32 33 2c  32 33 31 2c 38 2c 38 2c  |66,2,23,231,8,8,|
00000cf0  32 38 2c 33 30 2c 34 37  2c 33 39 2c 36 36 2c 36  |28,30,47,39,66,6|
00000d00  34 3a 53 50 24 3d c4 31  31 2c bd 32 32 39 29 3a  |4:SP$=.11,.229):|
00000d10  43 4f 24 3d 22 3e 3e 20  20 20 3a 20 20 20 3c 3c  |CO$=">>   :   <<|
00000d20  22 3a e3 6e 25 3d 30 b8  34 0d 01 18 97 f1 c4 32  |":.n%=0.4......2|
00000d30  35 35 2c bd 32 32 34 29  3b 3a ed 3a ef 35 3a ec  |55,.224);:.:.5:.|
00000d40  31 31 32 32 2c 33 30 3a  f1 c4 36 2c bd 32 32 34  |1122,30:..6,.224|
00000d50  29 3a f2 62 6f 3a e3 6e  25 3d 30 b8 36 3a f3 61  |):.bo:.n%=0.6:.a|
00000d60  2c 62 2c 63 2c 64 3a f2  77 69 28 61 2c 62 2c 63  |,b,c,d:.wi(a,b,c|
00000d70  2c 64 29 3a ed 3a 78 3d  31 32 38 3a e3 79 3d 34  |,d):.:x=128:.y=4|
00000d80  30 b8 34 38 30 88 34 34  3a ec 31 32 38 2c 79 3a  |0.480.44:.128,y:|
00000d90  df 35 36 38 2c 79 3a ec  78 2c 34 30 3a df 78 2c  |.568,y:.x,40:.x,|
00000da0  34 38 30 3a ec 31 32 38  2c 79 2b 34 38 34 3a df  |480:.128,y+484:.|
00000db0  35 36 38 2c 79 2b 34 38  34 3a ec 78 2c 35 32 34  |568,y+484:.x,524|
00000dc0  0d 01 22 b7 df 78 2c 39  36 34 3a 78 3d 78 2b 34  |.."..x,964:x=x+4|
00000dd0  34 3a ed 3a 61 3d 36 35  3a 62 3d 34 38 3a 79 3d  |4:.:a=65:b=48:y=|
00000de0  39 35 36 3a e3 78 3d 31  33 36 b8 35 33 32 88 34  |956:.x=136.532.4|
00000df0  34 3a ec 78 2c 31 30 30  30 3a ef 61 3a ec 38 30  |4:.x,1000:.a:.80|
00000e00  2c 79 3a ef 62 3a ec 78  2c 35 31 36 3a ef 61 3a  |,y:.b:.x,516:.a:|
00000e10  ec 38 30 2c 79 2d 34 38  34 3a ef 62 3a 61 3d 61  |.80,y-484:.b:a=a|
00000e20  2b 31 3a 62 3d 62 2b 31  3a 79 3d 79 2d 34 34 3a  |+1:b=b+1:y=y-44:|
00000e30  ed 3a f2 74 78 28 70 24  28 30 29 2c 38 30 30 2c  |.:.tx(p$(0),800,|
00000e40  39 38 38 29 3a f2 74 78  28 70 24 28 31 29 2c 38  |988):.tx(p$(1),8|
00000e50  30 30 2c 34 36 30 29 3a  f2 73 68 69 70 28 37 35  |00,460):.ship(75|
00000e60  30 2c 38 31 36 29 3a f2  73 68 69 70 28 37 35 30  |0,816):.ship(750|
00000e70  2c 32 38 38 29 3a e1 0d  01 2c 05 3a 0d 01 36 34  |,288):...,.:..64|
00000e80  dd f2 62 6f 3a e6 30 2c  31 3a ec 30 2c 30 3a df  |..bo:.0,1:.0,0:.|
00000e90  30 2c 31 30 32 33 3a df  31 32 37 39 2c 31 30 32  |0,1023:.1279,102|
00000ea0  33 3a df 31 32 37 39 2c  30 3a df 30 2c 30 3a e1  |3:.1279,0:.0,0:.|
00000eb0  0d 01 40 05 3a 0d 01 4a  b3 dd f2 77 69 28 61 2c  |..@.:..J...wi(a,|
00000ec0  62 2c 63 2c 64 29 3a ef  31 38 2c 30 2c 31 32 39  |b,c,d):.18,0,129|
00000ed0  2c 31 38 2c 30 2c 30 2c  32 34 2c 61 2d 31 36 3b  |,18,0,0,24,a-16;|
00000ee0  62 2d 31 36 3b 63 2d 31  36 3b 64 2d 31 36 3b 31  |b-16;c-16;d-16;1|
00000ef0  36 2c 32 36 3a ec 61 2d  31 36 2c 62 2d 31 36 3a  |6,26:.a-16,b-16:|
00000f00  df 63 2d 31 36 2c 62 2d  31 36 3a df 63 2d 31 36  |.c-16,b-16:.c-16|
00000f10  2c 64 2d 31 36 3a df 61  2d 31 36 2c 64 2d 31 36  |,d-16:.a-16,d-16|
00000f20  3a df 61 2d 31 36 2c 62  2d 31 36 3a ef 31 38 2c  |:.a-16,b-16:.18,|
00000f30  30 2c 31 32 38 2c 31 38  2c 30 2c 31 2c 32 34 2c  |0,128,18,0,1,24,|
00000f40  61 3b 62 3b 63 3b 64 3b  31 36 2c 32 36 3a ec 61  |a;b;c;d;16,26:.a|
00000f50  2c 62 3a df 63 2c 62 3a  df 63 2c 64 3a df 61 2c  |,b:.c,b:.c,d:.a,|
00000f60  64 3a df 61 2c 62 3a e1  0d 01 54 05 3a 0d 01 5e  |d:.a,b:...T.:..^|
00000f70  66 dd f2 74 78 28 61 24  2c 78 2c 79 29 3a ef 31  |f..tx(a$,x,y):.1|
00000f80  38 2c 30 2c 31 2c 35 3a  e3 79 79 3d 79 2d 34 b8  |8,0,1,5:.yy=y-4.|
00000f90  79 2b 34 88 34 3a e3 78  78 3d 78 2d 34 b8 78 2b  |y+4.4:.xx=x-4.x+|
00000fa0  34 88 34 3a ec 78 78 2c  79 79 3a f2 69 74 28 61  |4.4:.xx,yy:.it(a|
00000fb0  24 29 3a ed 2c 3a e6 30  2c 30 3a ec 78 2c 79 3a  |$):.,:.0,0:.x,y:|
00000fc0  f2 69 74 28 61 24 29 3a  ef 31 38 2c 30 2c 31 2c  |.it(a$):.18,0,1,|
00000fd0  34 3a e1 0d 01 68 05 3a  0d 01 72 21 dd f2 73 6d  |4:...h.:..r!..sm|
00000fe0  28 24 26 31 31 30 2c 78  25 2c 79 25 29 3a ec 78  |($&110,x%,y%):.x|
00000ff0  25 2c 79 25 3a d6 53 3a  e1 0d 01 7c 05 3a 0d 01  |%,y%:.S:...|.:..|
00001000  86 14 dd f2 69 74 28 24  26 31 31 30 29 3a d6 49  |....it($&110):.I|
00001010  3a e1 0d 01 90 05 3a 0d  01 9a 94 dd f2 73 70 73  |:.....:......sps|
00001020  63 72 3a ea 61 24 2c 62  24 2c 63 24 2c 61 25 3a  |cr:.a$,b$,c$,a%:|
00001030  ff 22 46 58 32 31 22 3a  61 24 3d c4 31 39 2c 22  |."FX21":a$=.19,"|
00001040  20 22 29 2b 22 50 72 65  73 73 20 3c 53 50 41 43  | ")+"Press <SPAC|
00001050  45 2d 42 41 52 3e 22 3a  f5 3a 62 24 3d bf 30 3a  |E-BAR>":.:b$=.0:|
00001060  63 24 3d c2 61 24 2c 31  29 3a 61 24 3d 63 24 2b  |c$=.a$,1):a$=c$+|
00001070  c0 61 24 2c 33 35 29 3a  f1 8a 31 2c 32 33 29 3b  |.a$,35):..1,23);|
00001080  61 24 3a e3 61 25 3d 30  b8 31 30 30 3a ed 3a fd  |a$:.a%=0.100:.:.|
00001090  62 24 3d 22 20 22 3a d4  31 2c 2d 31 35 2c 31 35  |b$=" ":.1,-15,15|
000010a0  32 2c 31 3a db 3a f2 62  6f 3a e1 0d 01 a4 05 3a  |2,1:.:.bo:.....:|
000010b0  0d 01 ae 92 dd f2 73 68  69 70 28 78 2c 79 29 3a  |......ship(x,y):|
000010c0  f7 8d 64 4e 44 3a ec 78  2c 79 3a e3 6e 25 3d 30  |..dND:.x,y:.n%=0|
000010d0  b8 34 31 3a f3 61 2c 62  2c 63 3a f0 61 2c 62 2c  |.41:.a,b,c:.a,b,|
000010e0  63 3a ed 3a e6 30 2c 30  3a e3 6e 25 3d 30 b8 33  |c:.:.0,0:.n%=0.3|
000010f0  3a f3 61 2c 62 2c 63 3a  f0 61 2c 62 2c 63 3a ed  |:.a,b,c:.a,b,c:.|
00001100  3a ef 31 38 2c 34 2c 30  2c 35 3a ec 78 2d 36 30  |:.18,4,0,5:.x-60|
00001110  2c 79 2d 32 36 3a f1 c4  31 37 2c bd 32 32 35 29  |,y-26:..17,.225)|
00001120  3a ec 78 2d 36 30 2c 79  2d 35 38 3a f1 c4 31 37  |:.x-60,y-58:..17|
00001130  2c bd 32 32 34 29 3a ef  31 38 2c 30 2c 31 2c 34  |,.224):.18,0,1,4|
00001140  3a e1 0d 01 b8 05 3a 0d  01 c2 71 dd f2 65 6e 74  |:.....:...q..ent|
00001150  65 72 3a ea 7a 3a 72 25  3d 31 3a e6 34 2c 30 3a  |er:.z:r%=1:.4,0:|
00001160  f5 3a f2 73 6d 28 70 24  28 30 29 2c 38 30 34 2c  |.:.sm(p$(0),804,|
00001170  36 31 32 29 3a f2 73 6d  28 70 24 28 32 29 2c 36  |612):.sm(p$(2),6|
00001180  39 32 2c 35 38 38 29 3a  f2 73 6d 28 70 24 28 31  |92,588):.sm(p$(1|
00001190  29 2c 38 30 34 2c 38 34  29 3a f2 73 6d 28 70 24  |),804,84):.sm(p$|
000011a0  28 33 29 2c 37 34 30 2c  36 30 29 3a e7 7a 3d 30  |(3),740,60):.z=0|
000011b0  20 f2 73 65 74 28 31 29  0d 01 cc 7e 7a 3d 7a 2b  | .set(1)...~z=z+|
000011c0  31 3a fd 7a 3d 32 3a f2  65 72 61 73 65 28 79 33  |1:.z=2:.erase(y3|
000011d0  2c 72 25 29 3a 7a 3d 30  3a 72 25 3d 32 3a f5 3a  |,r%):z=0:r%=2:.:|
000011e0  f2 73 6d 28 70 24 28 30  29 2c 38 30 34 2c 36 31  |.sm(p$(0),804,61|
000011f0  32 29 3a f2 73 6d 28 70  24 28 33 29 2c 37 34 30  |2):.sm(p$(3),740|
00001200  2c 35 38 38 29 3a f2 73  6d 28 70 24 28 31 29 2c  |,588):.sm(p$(1),|
00001210  38 30 34 2c 38 34 29 3a  f2 73 6d 28 70 24 28 32  |804,84):.sm(p$(2|
00001220  29 2c 36 39 32 2c 36 30  29 3a e7 7a 3d 30 20 f2  |),692,60):.z=0 .|
00001230  73 65 74 28 32 29 0d 01  d6 1e 7a 3d 7a 2b 31 3a  |set(2)....z=z+1:|
00001240  fd 7a 3d 32 3a f2 65 72  61 73 65 28 79 33 2c 72  |.z=2:.erase(y3,r|
00001250  25 29 3a e1 0d 01 e0 05  3a 0d 01 ea 52 dd f2 73  |%):.....:...R..s|
00001260  65 74 28 7a 29 3a 53 25  3d 30 3a ef 35 3a e3 6e  |et(z):S%=0:.5:.n|
00001270  3d 30 b8 34 3a e7 7a 3d  31 20 79 3d 39 35 36 3a  |=0.4:.z=1 y=956:|
00001280  79 31 3d 79 3a 79 32 3d  35 36 30 3a 79 33 3d 37  |y1=y:y2=560:y3=7|
00001290  30 34 20 8b 79 3d 34 37  32 3a 79 31 3d 79 3a 79  |04 .y=472:y1=y:y|
000012a0  32 3d 37 36 3a 79 33 3d  31 37 36 0d 01 f4 79 64  |2=76:y3=176...yd|
000012b0  3d 30 3a 78 3d 31 33 36  3a ec 39 36 33 2d 28 28  |=0:x=136:.963-((|
000012c0  a9 6e 24 28 6e 2c 30 29  2a 33 32 29 2f 32 29 2c  |.n$(n,0)*32)/2),|
000012d0  79 33 3a f2 69 74 28 6e  24 28 6e 2c 30 29 29 3a  |y3:.it(n$(n,0)):|
000012e0  ec 78 2c 79 3a ef 32 32  36 3a f5 3a e7 a6 2d 39  |.x,y:.226:.:..-9|
000012f0  38 20 80 78 3e 31 33 36  20 f2 70 72 3a 78 3d 78  |8 .x>136 .pr:x=x|
00001300  2d 34 34 3a f2 70 72 20  8b e7 a6 2d 36 37 20 80  |-44:.pr ...-67 .|
00001310  78 3c 35 33 32 20 f2 70  72 3a 78 3d 78 2b 34 34  |x<532 .pr:x=x+44|
00001320  3a f2 70 72 0d 01 fe 3b  e7 a6 2d 37 33 20 80 79  |:.pr...;..-73 .y|
00001330  3c 79 31 20 f2 70 72 3a  79 3d 79 2b 34 34 3a f2  |<y1 .pr:y=y+44:.|
00001340  70 72 20 8b e7 a6 2d 31  30 35 20 80 79 3e 79 32  |pr ...-105 .y>y2|
00001350  20 f2 70 72 3a 79 3d 79  2d 34 34 3a f2 70 72 0d  | .pr:y=y-44:.pr.|
00001360  02 08 37 e7 a6 2d 37 34  20 d4 31 2c 2d 31 35 2c  |..7..-74 .1,-15,|
00001370  31 35 30 2c 31 3a 6f 78  3d 78 3a 6f 79 3d 79 3a  |150,1:ox=x:oy=y:|
00001380  64 3d a4 73 74 28 6f 78  2c 6f 79 2c 79 31 2c 79  |d=.st(ox,oy,y1,y|
00001390  32 2c 6e 2c 7a 29 0d 02  12 31 fd 64 3a ec 39 36  |2,n,z)...1.d:.96|
000013a0  33 2d 28 28 a9 6e 24 28  6e 2c 30 29 2a 33 32 29  |3-((.n$(n,0)*32)|
000013b0  2f 32 29 2c 79 33 3a f2  69 74 28 6e 24 28 6e 2c  |/2),y3:.it(n$(n,|
000013c0  30 29 29 3a ed 3a e1 0d  02 1c 05 3a 0d 02 26 14  |0)):.:.....:..&.|
000013d0  dd f2 70 72 3a ec 78 2c  79 3a ef 32 32 36 3a e1  |..pr:.x,y:.226:.|
000013e0  0d 02 30 05 3a 0d 02 3a  8c dd a4 73 74 28 6f 78  |..0.:..:...st(ox|
000013f0  2c 6f 79 2c 79 31 2c 79  32 2c 6e 2c 7a 29 3a 78  |,oy,y1,y2,n,z):x|
00001400  31 3d 6f 78 2d 28 28 bb  6e 24 28 6e 2c 31 29 29  |1=ox-((.n$(n,1))|
00001410  2d 31 29 2a 34 34 3a 78  32 3d 6f 78 2b 28 28 bb  |-1)*44:x2=ox+((.|
00001420  6e 24 28 6e 2c 31 29 29  2d 31 29 2a 34 34 3a 79  |n$(n,1))-1)*44:y|
00001430  61 3d 6f 79 2d 28 28 bb  6e 24 28 6e 2c 31 29 29  |a=oy-((.n$(n,1))|
00001440  2d 31 29 2a 34 34 3a 79  62 3d 6f 79 2b 28 28 bb  |-1)*44:yb=oy+((.|
00001450  6e 24 28 6e 2c 31 29 29  2d 31 29 2a 34 34 3a f2  |n$(n,1))-1)*44:.|
00001460  63 68 3a f2 70 72 32 3a  65 3d 30 3a 66 3d 30 3a  |ch:.pr2:e=0:f=0:|
00001470  f5 0d 02 44 48 e7 a6 2d  39 38 20 80 78 31 3e 31  |...DH..-98 .x1>1|
00001480  33 35 20 f2 70 72 32 3a  78 3d 78 31 3a 79 3d 6f  |35 .pr2:x=x1:y=o|
00001490  79 3a f2 70 72 32 20 8b  e7 a6 2d 36 37 20 80 78  |y:.pr2 ...-67 .x|
000014a0  32 3c 35 33 33 20 f2 70  72 32 3a 78 3d 78 32 3a  |2<533 .pr2:x=x2:|
000014b0  79 3d 6f 79 3a f2 70 72  32 0d 02 4e 4b e7 a6 2d  |y=oy:.pr2..NK..-|
000014c0  31 30 35 20 80 79 61 3e  79 32 2d 31 20 f2 70 72  |105 .ya>y2-1 .pr|
000014d0  32 3a 79 3d 79 61 3a 78  3d 6f 78 3a f2 70 72 32  |2:y=ya:x=ox:.pr2|
000014e0  20 8b e7 a6 2d 37 33 20  80 79 62 3c 79 31 2b 31  | ...-73 .yb<y1+1|
000014f0  20 f2 70 72 32 3a 79 3d  79 62 3a 78 3d 6f 78 3a  | .pr2:y=yb:x=ox:|
00001500  f2 70 72 32 0d 02 58 36  e7 a6 2d 39 39 20 d4 31  |.pr2..X6..-99 .1|
00001510  2c 2d 31 35 2c 38 30 2c  31 3a ec 6f 78 2c 6f 79  |,-15,80,1:.ox,oy|
00001520  3a ef 32 32 36 3a f2 70  72 32 3a 66 3d a4 64 72  |:.226:.pr2:f=.dr|
00001530  73 68 28 7a 29 3a 65 3d  2d 31 0d 02 62 2c e7 a6  |sh(z):e=-1..b,..|
00001540  2d 31 20 65 3d 2d 31 3a  66 3d 30 3a f2 70 72 32  |-1 e=-1:f=0:.pr2|
00001550  3a d4 31 2c 2d 31 35 2c  33 30 2c 31 3a 78 3d 6f  |:.1,-15,30,1:x=o|
00001560  78 3a 79 3d 6f 79 0d 02  6c 09 fd 65 3a 3d 66 0d  |x:y=oy..l..e:=f.|
00001570  02 76 05 3a 0d 02 80 2d  dd f2 63 68 3a e7 6f 78  |.v.:...-..ch:.ox|
00001580  2d 28 28 bb 6e 24 28 6e  2c 31 29 29 2d 31 29 2a  |-((.n$(n,1))-1)*|
00001590  34 34 3e 31 33 36 20 78  3d 78 31 20 8b 78 3d 78  |44>136 x=x1 .x=x|
000015a0  32 0d 02 8a 05 e1 0d 02  94 05 3a 0d 02 9e 2d dd  |2.........:...-.|
000015b0  f2 70 72 32 3a ec 6f 78  2b 31 36 2c 6f 79 2d 31  |.pr2:.ox+16,oy-1|
000015c0  36 3a df 78 2b 31 36 2c  79 2d 31 36 3a ec 78 2c  |6:.x+16,y-16:.x,|
000015d0  79 3a ef 32 32 36 3a e1  0d 02 a8 05 3a 0d 02 b2  |y:.226:.....:...|
000015e0  64 dd a4 64 72 73 68 28  7a 29 3a e7 78 3c 6f 78  |d..drsh(z):.x<ox|
000015f0  20 77 3d a4 63 68 6c 28  78 2c 6f 78 2c 7a 29 20  | w=.chl(x,ox,z) |
00001600  8b e7 6f 78 3c 78 20 77  3d a4 63 68 6c 28 6f 78  |..ox<x w=.chl(ox|
00001610  2c 78 2c 7a 29 20 8b e7  6f 79 3c 79 20 77 3d a4  |,x,z) ..oy<y w=.|
00001620  63 68 72 28 6f 79 2c 79  2c 7a 29 20 8b e7 79 3c  |chr(oy,y,z) ..y<|
00001630  6f 79 20 77 3d a4 63 68  72 28 79 2c 6f 79 2c 7a  |oy w=.chr(y,oy,z|
00001640  29 0d 02 bc 25 e7 77 3d  30 20 78 3d 31 33 36 3a  |)...%.w=0 x=136:|
00001650  79 3d 79 31 3a ec 78 2c  79 3a ef 32 32 36 3a 3d  |y=y1:.x,y:.226:=|
00001660  30 20 8b 3d 2d 31 0d 02  c6 05 3a 0d 02 d0 3b dd  |0 .=-1....:...;.|
00001670  a4 63 68 6c 28 64 2c 64  31 2c 7a 29 3a 6b 3d 30  |.chl(d,d1,z):k=0|
00001680  3a 6c 3d 30 3a e3 48 3d  64 20 b8 64 31 20 88 34  |:l=0:.H=d .d1 .4|
00001690  34 3a 6c 3d a4 73 73 28  48 2c 79 2c 7a 29 3a e7  |4:l=.ss(H,y,z):.|
000016a0  6c 20 6b 3d 2d 31 0d 02  da 40 ed 3a e7 6b 20 f2  |l k=-1...@.:.k .|
000016b0  69 6c 6c 65 67 61 6c 3a  3d 30 20 8b e3 48 3d 64  |illegal:=0 ..H=d|
000016c0  20 b8 64 31 20 88 34 34  3a ec 48 2c 79 3a ef 32  | .d1 .44:.H,y:.2|
000016d0  32 37 3a ee 7a 20 e4 8d  64 64 42 2c 8d 64 6e 42  |27:.z ..ddB,.dnB|
000016e0  3a ed 3a 3d 2d 31 0d 02  e4 21 78 28 53 25 2c 30  |:.:=-1...!x(S%,0|
000016f0  29 3d 48 3a 78 28 53 25  2c 31 29 3d 79 3a 53 25  |)=H:x(S%,1)=y:S%|
00001700  3d 53 25 2b 31 3a f8 0d  02 ee 21 79 28 53 25 2c  |=S%+1:....!y(S%,|
00001710  30 29 3d 48 3a 79 28 53  25 2c 31 29 3d 79 3a 53  |0)=H:y(S%,1)=y:S|
00001720  25 3d 53 25 2b 31 3a f8  0d 02 f8 05 3a 0d 03 02  |%=S%+1:.....:...|
00001730  3b dd a4 63 68 72 28 64  2c 64 31 2c 7a 29 3a 6b  |;..chr(d,d1,z):k|
00001740  3d 30 3a 6c 3d 30 3a e3  48 3d 64 20 b8 64 31 20  |=0:l=0:.H=d .d1 |
00001750  88 34 34 3a 6c 3d a4 73  73 28 78 2c 48 2c 7a 29  |.44:l=.ss(x,H,z)|
00001760  3a e7 6c 20 6b 3d 2d 31  0d 03 0c 40 ed 3a e7 6b  |:.l k=-1...@.:.k|
00001770  20 f2 69 6c 6c 65 67 61  6c 3a 3d 30 20 8b e3 48  | .illegal:=0 ..H|
00001780  3d 64 20 b8 64 31 20 88  34 34 3a ec 78 2c 48 3a  |=d .d1 .44:.x,H:|
00001790  ef 32 32 37 3a ee 7a 20  e4 8d 54 56 43 2c 8d 54  |.227:.z ..TVC,.T|
000017a0  60 43 3a ed 3a 3d 2d 31  0d 03 16 21 78 28 53 25  |`C:.:=-1...!x(S%|
000017b0  2c 30 29 3d 78 3a 78 28  53 25 2c 31 29 3d 48 3a  |,0)=x:x(S%,1)=H:|
000017c0  53 25 3d 53 25 2b 31 3a  f8 0d 03 20 21 79 28 53  |S%=S%+1:... !y(S|
000017d0  25 2c 30 29 3d 78 3a 79  28 53 25 2c 31 29 3d 48  |%,0)=x:y(S%,1)=H|
000017e0  3a 53 25 3d 53 25 2b 31  3a f8 0d 03 2a 05 3a 0d  |:S%=S%+1:...*.:.|
000017f0  03 34 35 dd a4 73 73 28  71 2c 72 2c 7a 29 3a ea  |.45..ss(q,r,z):.|
00001800  61 25 3a 62 25 3d 30 3a  e3 61 25 3d 30 b8 31 36  |a%:b%=0:.a%=0.16|
00001810  3a ee 7a 20 e4 8d 54 7e  43 2c 8d 44 48 43 3a ed  |:.z ..T~C,.DHC:.|
00001820  3a 3d 62 25 0d 03 3e 24  e7 78 28 61 25 2c 30 29  |:=b%..>$.x(a%,0)|
00001830  3d 71 20 80 78 28 61 25  2c 31 29 3d 72 20 62 25  |=q .x(a%,1)=r b%|
00001840  3d 2d 31 3a f8 20 8b f8  0d 03 48 24 e7 79 28 61  |=-1:. ....H$.y(a|
00001850  25 2c 30 29 3d 71 20 80  79 28 61 25 2c 31 29 3d  |%,0)=q .y(a%,1)=|
00001860  72 20 62 25 3d 2d 31 3a  f8 20 8b f8 0d 03 52 05  |r b%=-1:. ....R.|
00001870  3a 0d 03 5c ba dd f2 69  6c 6c 65 67 61 6c 3a ec  |:..\...illegal:.|
00001880  39 36 33 2d 28 28 a9 6e  24 28 6e 2c 30 29 2a 33  |963-((.n$(n,0)*3|
00001890  32 29 2f 32 29 2c 79 33  3a f2 69 74 28 6e 24 28  |2)/2),y3:.it(n$(|
000018a0  6e 2c 30 29 29 3a ec 37  32 33 2c 79 33 3a f2 69  |n,0)):.723,y3:.i|
000018b0  74 28 22 49 4c 4c 45 47  41 4c 20 50 4c 41 43 49  |t("ILLEGAL PLACI|
000018c0  4e 47 22 29 3a e3 76 3d  30 b8 31 34 3a d4 31 2c  |NG"):.v=0.14:.1,|
000018d0  2d 31 35 2c 32 30 2c 31  3a d4 31 2c 2d 31 35 2c  |-15,20,1:.1,-15,|
000018e0  38 2c 31 3a ed 3a ec 37  32 33 2c 79 33 3a f2 69  |8,1:.:.723,y3:.i|
000018f0  74 28 22 49 4c 4c 45 47  41 4c 20 50 4c 41 43 49  |t("ILLEGAL PLACI|
00001900  4e 47 22 29 3a ec 39 36  33 2d 28 28 a9 6e 24 28  |NG"):.963-((.n$(|
00001910  6e 2c 30 29 2a 33 32 29  2f 32 29 2c 79 33 3a f2  |n,0)*32)/2),y3:.|
00001920  69 74 28 6e 24 28 6e 2c  30 29 29 0d 03 66 05 e1  |it(n$(n,0))..f..|
00001930  0d 03 70 05 3a 0d 03 7a  74 dd f2 65 72 61 73 65  |..p.:..zt..erase|
00001940  28 79 33 2c 72 25 29 3a  ea 74 25 2c 68 25 3a f5  |(y3,r%):.t%,h%:.|
00001950  3a f2 73 6d 28 22 41 4c  4c 20 53 48 49 50 53 20  |:.sm("ALL SHIPS |
00001960  4f 2e 4b 2e 22 2c 37 33  39 2c 79 33 2d 39 32 29  |O.K.",739,y3-92)|
00001970  3a f2 73 6d 28 22 50 52  45 53 53 20 3c 53 50 41  |:.sm("PRESS <SPA|
00001980  43 45 2d 42 41 52 3e 22  2c 36 39 32 2c 79 33 2d  |CE-BAR>",692,y3-|
00001990  31 31 36 29 3a e7 74 25  3d 30 20 ff 22 46 58 32  |116):.t%=0 ."FX2|
000019a0  31 22 3a f5 fd a5 3d 33  32 0d 03 84 4d 74 25 3d  |1":...=32...Mt%=|
000019b0  74 25 2b 31 3a fd 74 25  3d 32 3a ef 35 3a e3 68  |t%+1:.t%=2:.5:.h|
000019c0  25 3d 30 b8 31 36 3a ee  72 25 20 e4 8d 74 4e 43  |%=0.16:.r% ..tNC|
000019d0  2c 8d 74 58 43 3a ed 3a  d4 31 2c 31 2c 32 38 2c  |,.tXC:.:.1,1,28,|
000019e0  36 3a d4 31 2c 30 2c 30  2c 33 3a d4 31 2c 31 2c  |6:.1,0,0,3:.1,1,|
000019f0  32 38 2c 36 3a e1 0d 03  8e 1b ec 78 28 68 25 2c  |28,6:......x(h%,|
00001a00  30 29 2c 78 28 68 25 2c  31 29 3a ef 32 32 37 3a  |0),x(h%,1):.227:|
00001a10  f8 0d 03 98 1b ec 79 28  68 25 2c 30 29 2c 79 28  |......y(h%,0),y(|
00001a20  68 25 2c 31 29 3a ef 32  32 37 3a f8 0d 03 a2 05  |h%,1):.227:.....|
00001a30  3a 0d 03 ac 22 dd f2 62  61 74 74 6c 65 3a f2 70  |:..."..battle:.p|
00001a40  6c 31 3a e7 4d 25 3d 31  37 20 e1 20 8b f2 70 6c  |l1:.M%=17 . ..pl|
00001a50  32 3a e1 0d 03 b6 05 3a  0d 03 c0 63 dd f2 70 6c  |2:.....:...c..pl|
00001a60  31 3a 68 69 74 25 3d 2d  31 3a e6 34 2c 30 3a f2  |1:hit%=-1:.4,0:.|
00001a70  73 6d 28 70 24 28 30 29  2c 38 30 34 2c 36 31 32  |sm(p$(0),804,612|
00001a80  29 3a f2 73 6d 28 70 24  28 32 29 2c 36 39 32 2c  |):.sm(p$(2),692,|
00001a90  35 38 38 29 3a f2 73 6d  28 70 24 28 31 29 2c 38  |588):.sm(p$(1),8|
00001aa0  30 34 2c 38 34 29 3a f2  73 6d 28 70 24 28 34 29  |04,84):.sm(p$(4)|
00001ab0  2c 37 32 34 2c 36 30 29  3a ef 35 0d 03 ca 49 e6  |,724,60):.5...I.|
00001ac0  30 2c 31 3a ec 37 38 37  2c 37 30 34 3a f1 43 4f  |0,1:.787,704:.CO|
00001ad0  24 3a ec 38 38 33 2c 37  30 34 3a 77 3d a4 6b 65  |$:.883,704:w=.ke|
00001ae0  79 28 34 37 32 29 3a e7  77 3d 30 20 ec 37 38 37  |y(472):.w=0 .787|
00001af0  2c 37 30 34 3a e6 30 2c  30 3a f1 53 50 24 3a e5  |,704:.0,0:.SP$:.|
00001b00  8d 64 4a 43 0d 03 d4 53  e3 6e 3d 32 32 34 b8 31  |.dJC...S.n=224.1|
00001b10  34 30 88 2d 34 3a d4 31  2c 2d 31 35 2c 6e 2c 31  |40.-4:.1,-15,n,1|
00001b20  3a ed 3a e3 6a 25 3d 30  b8 31 36 3a e7 79 28 6a  |:.:.j%=0.16:.y(j|
00001b30  25 2c 30 29 3d 61 25 20  80 79 28 6a 25 2c 31 29  |%,0)=a% .y(j%,1)|
00001b40  3d 62 25 20 80 79 28 6a  25 2c 32 29 3c 3e 31 20  |=b% .y(j%,2)<>1 |
00001b50  68 69 74 25 3d 6a 25 0d  03 de 39 ed 3a e7 68 69  |hit%=j%...9.:.hi|
00001b60  74 25 3e 2d 31 20 f2 68  69 74 28 32 39 38 29 3a  |t%>-1 .hit(298):|
00001b70  79 28 68 69 74 25 2c 32  29 3d 31 3a 4d 25 3d 4d  |y(hit%,2)=1:M%=M|
00001b80  25 2b 31 20 8b ec 61 25  2c 62 25 3a ef 32 32 37  |%+1 ..a%,b%:.227|
00001b90  0d 03 e8 67 ec 37 38 37  2c 37 30 34 3a e6 30 2c  |...g.787,704:.0,|
00001ba0  30 3a f1 53 50 24 3a e6  34 2c 30 3a f2 73 6d 28  |0:.SP$:.4,0:.sm(|
00001bb0  70 24 28 30 29 2c 38 30  34 2c 36 31 32 29 3a f2  |p$(0),804,612):.|
00001bc0  73 6d 28 70 24 28 32 29  2c 36 39 32 2c 35 38 38  |sm(p$(2),692,588|
00001bd0  29 3a f2 73 6d 28 70 24  28 31 29 2c 38 30 34 2c  |):.sm(p$(1),804,|
00001be0  38 34 29 3a f2 73 6d 28  70 24 28 34 29 2c 37 32  |84):.sm(p$(4),72|
00001bf0  34 2c 36 30 29 3a e1 0d  03 f2 05 3a 0d 03 fc 96  |4,60):.....:....|
00001c00  dd a4 6b 65 79 28 65 25  29 3a ff 22 46 58 32 31  |..key(e%):."FX21|
00001c10  22 3a f5 3a 61 25 3d a5  3a fd 61 25 3e 36 34 80  |":.:a%=.:.a%>64.|
00001c20  61 25 3c 37 35 3a f1 bd  61 25 3b 22 20 20 20 22  |a%<75:..a%;"   "|
00001c30  3b 3a d4 31 2c 31 2c 32  30 30 2c 32 3a 61 25 3d  |;:.1,1,200,2:a%=|
00001c40  31 33 36 2b 28 28 61 25  2d 36 35 29 2a 34 34 29  |136+((a%-65)*44)|
00001c50  3a f5 3a 62 25 3d a5 3a  fd 62 25 3e 34 37 80 62  |:.:b%=.:.b%>47.b|
00001c60  25 3c 35 38 3a ef 62 25  3a d4 31 2c 31 2c 32 30  |%<58:.b%:.1,1,20|
00001c70  30 2c 32 3a 62 25 3d 65  25 2d 28 28 62 25 2d 34  |0,2:b%=e%-((b%-4|
00001c80  38 29 2a 34 34 29 3a f5  fd a6 2d 39 30 84 a6 2d  |8)*44):...-90..-|
00001c90  37 34 0d 04 06 11 e7 a6  2d 39 30 20 8c 3d 30 8b  |74......-90 .=0.|
00001ca0  3d 2d 31 0d 04 10 05 3a  0d 04 1a 67 dd f2 68 69  |=-1....:...g..hi|
00001cb0  74 28 66 25 29 3a ef 31  39 2c 30 2c 31 32 3b 30  |t(f%):.19,0,12;0|
00001cc0  3b 3a d4 30 2c 2d 31 35  2c 32 30 2c 34 30 3a f2  |;:.0,-15,20,40:.|
00001cd0  62 6f 6f 6d 28 37 37 30  2c 66 25 29 3a e3 67 3d  |boom(770,f%):.g=|
00001ce0  30 b8 31 32 30 30 3a ed  3a f2 62 6f 6f 6d 28 37  |0.1200:.:.boom(7|
00001cf0  37 30 2c 66 25 29 3a ef  31 39 2c 30 2c 34 3b 30  |70,f%):.19,0,4;0|
00001d00  3b 3a ec 61 25 2c 62 25  3a ef 32 32 38 3a e1 0d  |;:.a%,b%:.228:..|
00001d10  04 24 05 3a 0d 04 2e 46  dd f2 62 6f 6f 6d 28 78  |.$.:...F..boom(x|
00001d20  2c 79 29 3a ea 61 25 2c  62 25 2c 63 25 3a f7 8d  |,y):.a%,b%,c%:..|
00001d30  64 62 44 3a e6 34 2c 30  3a ec 78 2c 79 3a e3 61  |dbD:.4,0:.x,y:.a|
00001d40  25 3d 30 b8 32 33 3a f3  62 25 2c 63 25 3a f0 31  |%=0.23:.b%,c%:.1|
00001d50  2c 62 25 2c 63 25 3a ed  3a e1 0d 04 38 05 3a 0d  |,b%,c%:.:...8.:.|
00001d60  04 42 5e dd f2 70 6c 32  3a 68 69 74 25 3d 2d 31  |.B^..pl2:hit%=-1|
00001d70  3a f2 73 6d 28 70 24 28  30 29 2c 38 30 34 2c 36  |:.sm(p$(0),804,6|
00001d80  31 32 29 3a f2 73 6d 28  70 24 28 34 29 2c 37 32  |12):.sm(p$(4),72|
00001d90  34 2c 35 38 38 29 3a f2  73 6d 28 70 24 28 31 29  |4,588):.sm(p$(1)|
00001da0  2c 38 30 34 2c 38 34 29  3a f2 73 6d 28 70 24 28  |,804,84):.sm(p$(|
00001db0  32 29 2c 36 39 32 2c 36  30 29 3a ef 35 0d 04 4c  |2),692,60):.5..L|
00001dc0  49 e6 30 2c 31 3a ec 37  38 37 2c 31 37 36 3a f1  |I.0,1:.787,176:.|
00001dd0  43 4f 24 3a ec 38 38 33  2c 31 37 36 3a 77 3d a4  |CO$:.883,176:w=.|
00001de0  6b 65 79 28 39 35 36 29  3a e7 77 3d 30 20 ec 37  |key(956):.w=0 .7|
00001df0  38 37 2c 31 37 36 3a e6  30 2c 30 3a f1 53 50 24  |87,176:.0,0:.SP$|
00001e00  3a e5 8d 44 4c 44 0d 04  56 53 e3 6e 3d 32 32 34  |:..DLD..VS.n=224|
00001e10  b8 31 34 30 88 2d 34 3a  d4 31 2c 2d 31 35 2c 6e  |.140.-4:.1,-15,n|
00001e20  2c 31 3a ed 3a e3 6a 25  3d 30 b8 31 36 3a e7 78  |,1:.:.j%=0.16:.x|
00001e30  28 6a 25 2c 30 29 3d 61  25 20 80 78 28 6a 25 2c  |(j%,0)=a% .x(j%,|
00001e40  31 29 3d 62 25 20 80 78  28 6a 25 2c 32 29 3c 3e  |1)=b% .x(j%,2)<>|
00001e50  31 20 68 69 74 25 3d 6a  25 0d 04 60 39 ed 3a e7  |1 hit%=j%..`9.:.|
00001e60  68 69 74 25 3e 2d 31 20  f2 68 69 74 28 38 32 36  |hit%>-1 .hit(826|
00001e70  29 3a 78 28 68 69 74 25  2c 32 29 3d 31 3a 4e 25  |):x(hit%,2)=1:N%|
00001e80  3d 4e 25 2b 31 20 8b ec  61 25 2c 62 25 3a ef 32  |=N%+1 ..a%,b%:.2|
00001e90  32 37 0d 04 6a 67 ec 37  38 37 2c 31 37 36 3a e6  |27..jg.787,176:.|
00001ea0  30 2c 30 3a f1 53 50 24  3a e6 34 2c 30 3a f2 73  |0,0:.SP$:.4,0:.s|
00001eb0  6d 28 70 24 28 30 29 2c  38 30 34 2c 36 31 32 29  |m(p$(0),804,612)|
00001ec0  3a f2 73 6d 28 70 24 28  34 29 2c 37 32 34 2c 35  |:.sm(p$(4),724,5|
00001ed0  38 38 29 3a f2 73 6d 28  70 24 28 31 29 2c 38 30  |88):.sm(p$(1),80|
00001ee0  34 2c 38 34 29 3a f2 73  6d 28 70 24 28 32 29 2c  |4,84):.sm(p$(2),|
00001ef0  36 39 32 2c 36 30 29 3a  e1 0d 04 74 05 3a 0d 04  |692,60):...t.:..|
00001f00  7e 8d dd f2 77 69 6e 3a  ea 61 2c 62 2c 63 2c 64  |~...win:.a,b,c,d|
00001f10  3a db 3a f2 62 6f 3a f2  73 68 69 70 28 34 31 36  |:.:.bo:.ship(416|
00001f20  2c 34 38 30 29 3a ec 34  2c 34 35 34 3a ef 35 3a  |,480):.4,454:.5:|
00001f30  f1 c4 31 31 2c bd 32 32  35 29 3a ec 39 30 30 2c  |..11,.225):.900,|
00001f40  34 35 34 3a f1 c4 31 32  2c bd 32 32 35 29 3a ec  |454:..12,.225):.|
00001f50  34 2c 34 32 32 3a f1 c4  31 31 2c bd 32 32 34 29  |4,422:..11,.224)|
00001f60  3a ec 39 30 30 2c 34 32  32 3a f1 c4 31 32 2c bd  |:.900,422:..12,.|
00001f70  32 32 34 29 3a e7 4d 25  3d 31 37 20 64 3d 31 20  |224):.M%=17 d=1 |
00001f80  8b e7 4e 25 3d 31 37 20  64 3d 30 0d 04 88 b7 f2  |..N%=17 d=0.....|
00001f90  74 78 28 22 48 41 52 44  20 4c 55 43 4b 20 22 2b  |tx("HARD LUCK "+|
00001fa0  70 24 28 64 29 2b 22 20  21 22 2c 32 38 38 2c 38  |p$(d)+" !",288,8|
00001fb0  36 34 29 3a f2 74 78 28  70 24 28 94 28 64 2d 31  |64):.tx(p$(.(d-1|
00001fc0  29 29 2b 22 20 48 41 53  20 53 55 4e 4b 20 59 4f  |))+" HAS SUNK YO|
00001fd0  55 52 20 46 4c 45 45 54  2e 22 2c 31 34 34 2c 38  |UR FLEET.",144,8|
00001fe0  30 30 29 3a ef 35 3a 61  3d 32 33 30 3a 62 3d 2d  |00):.5:a=230:b=-|
00001ff0  32 34 3a 63 3d 32 30 3a  f5 3a e3 6e 3d 30 b8 31  |24:c=20:.:.n=0.1|
00002000  3a e6 34 2c 30 3a ec 35  39 34 2b 62 2c 35 37 35  |:.4,0:.594+b,575|
00002010  3a ef 61 3a e3 6b 3d 30  b8 31 35 30 3a ed 2c 3a  |:.a:.k=0.150:.,:|
00002020  62 3d 30 3a 61 3d 61 2b  31 3a 63 3d 63 2d 31 3a  |b=0:a=a+1:c=c-1:|
00002030  e7 61 3d 32 33 32 20 61  3d 32 33 30 3a 62 3d 2d  |.a=232 a=230:b=-|
00002040  32 34 0d 04 92 21 fd 63  3d 30 3a ef 34 2c 32 38  |24...!.c=0:.4,28|
00002050  2c 31 2c 33 31 2c 33 38  2c 30 3a f2 73 70 73 63  |,1,31,38,0:.spsc|
00002060  72 3a e1 0d 04 9c 05 3a  0d 04 a6 a9 dd f2 73 61  |r:.....:......sa|
00002070  3a ef 31 32 2c 31 37 2c  31 32 39 2c 31 37 2c 30  |:.12,17,129,17,0|
00002080  2c 33 31 2c 36 2c 31 32  2c 38 30 2c 38 32 2c 37  |,31,6,12,80,82,7|
00002090  39 2c 37 31 2c 38 32 2c  36 35 2c 37 37 2c 37 37  |9,71,82,65,77,77|
000020a0  2c 36 39 2c 36 38 2c 33  32 2c 36 36 2c 38 39 2c  |,69,68,32,66,89,|
000020b0  33 32 2c 36 38 2c 36 35  2c 38 32 2c 38 32 2c 36  |32,68,65,82,82,6|
000020c0  39 2c 37 38 2c 33 32 2c  36 36 2c 38 32 2c 36 35  |9,78,32,66,82,65|
000020d0  2c 36 38 2c 37 36 2c 36  39 2c 38 39 2c 33 31 2c  |,68,76,69,89,31,|
000020e0  31 36 2c 31 34 2c 34 39  2c 35 37 2c 34 37 2c 34  |16,14,49,57,47,4|
000020f0  38 2c 35 32 2c 34 37 2c  35 37 2c 34 38 2c 31 33  |8,52,47,57,48,13|
00002100  2c 31 30 2c 31 37 2c 31  2c 31 37 2c 31 32 38 3a  |,10,17,1,17,128:|
00002110  e1 0d 04 b0 05 3a 0d 04  ba 8f dc 20 41 49 52 43  |.....:..... AIRC|
00002120  52 41 46 54 20 43 41 52  52 49 45 52 2c 35 2c 50  |RAFT CARRIER,5,P|
00002130  4c 41 59 45 52 20 4f 4e  45 2c 42 41 54 54 4c 45  |LAYER ONE,BATTLE|
00002140  53 48 49 50 2c 34 2c 50  4c 41 59 45 52 20 54 57  |SHIP,4,PLAYER TW|
00002150  4f 2c 44 45 53 54 52 4f  59 45 52 2c 33 2c 45 4e  |O,DESTROYER,3,EN|
00002160  54 45 52 20 43 4f 4f 52  44 49 4e 41 54 45 53 2c  |TER COORDINATES,|
00002170  53 55 42 4d 41 52 49 4e  45 2c 33 2c 4c 45 41 56  |SUBMARINE,3,LEAV|
00002180  45 20 54 48 45 20 52 4f  4f 4d 2c 54 55 47 20 42  |E THE ROOM,TUG B|
00002190  4f 41 54 2c 32 2c 46 49  4e 47 45 52 53 20 43 52  |OAT,2,FINGERS CR|
000021a0  4f 53 53 45 44 0d 04 c4  78 dc 33 32 2c 33 32 2c  |OSSED...x.32,32,|
000021b0  36 30 38 2c 31 30 30 38  2c 36 37 32 2c 39 34 34  |608,1008,672,944|
000021c0  2c 31 32 34 38 2c 31 30  30 38 2c 36 37 32 2c 36  |,1248,1008,672,6|
000021d0  35 36 2c 31 32 34 38 2c  39 31 32 2c 36 37 32 2c  |56,1248,912,672,|
000021e0  35 36 30 2c 31 32 34 38  2c 36 32 34 2c 36 37 32  |560,1248,624,672|
000021f0  2c 34 31 36 2c 31 32 34  38 2c 34 38 30 2c 36 37  |,416,1248,480,67|
00002200  32 2c 31 32 38 2c 31 32  34 38 2c 33 38 34 2c 36  |2,128,1248,384,6|
00002210  37 32 2c 33 32 2c 31 32  34 38 2c 39 36 0d 04 ce  |72,32,1248,96...|
00002220  e9 dc 30 2c 34 30 2c 2d  34 30 2c 38 31 2c 33 35  |..0,40,-40,81,35|
00002230  30 2c 30 2c 30 2c 33 30  2c 34 30 2c 38 31 2c 2d  |0,0,0,30,40,81,-|
00002240  34 32 30 2c 30 2c 30 2c  2d 31 30 2c 30 2c 30 2c  |420,0,0,-10,0,0,|
00002250  30 2c 31 30 2c 38 31 2c  34 34 30 2c 30 2c 30 2c  |0,10,81,440,0,0,|
00002260  30 2c 2d 31 30 2c 38 31  2c 2d 34 34 30 2c 30 2c  |0,-10,81,-440,0,|
00002270  30 2c 37 30 2c 31 30 2c  30 2c 36 30 2c 30 2c 38  |0,70,10,0,60,0,8|
00002280  31 2c 2d 32 30 2c 32 30  2c 30 2c 2d 33 30 2c 30  |1,-20,20,0,-30,0|
00002290  2c 38 31 2c 2d 31 30 2c  2d 32 30 2c 30 2c 31 30  |,81,-10,-20,0,10|
000022a0  2c 31 30 2c 30 2c 30 2c  31 30 2c 38 31 2c 2d 33  |,10,0,0,10,81,-3|
000022b0  30 2c 30 2c 30 2c 30 2c  2d 31 30 2c 38 31 2c 33  |0,0,0,0,-10,81,3|
000022c0  30 2c 30 2c 30 2c 37 30  2c 2d 31 30 2c 30 2c 32  |0,0,0,70,-10,0,2|
000022d0  30 2c 30 2c 38 31 2c 30  2c 35 30 2c 30 2c 30 2c  |0,0,81,0,50,0,0,|
000022e0  2d 35 30 2c 30 2c 30 2c  31 30 2c 38 31 2c 32 33  |-50,0,0,10,81,23|
000022f0  30 2c 2d 31 30 2c 30 2c  30 2c 31 30 2c 38 31 2c  |0,-10,0,0,10,81,|
00002300  2d 32 33 30 2c 30 0d 04  d8 a1 dc 30 2c 35 30 2c  |-230,0.....0,50,|
00002310  30 2c 30 2c 2d 31 30 2c  34 30 2c 38 31 2c 2d 34  |0,0,-10,40,81,-4|
00002320  30 2c 2d 34 30 2c 30 2c  30 2c 34 30 2c 38 31 2c  |0,-40,0,0,40,81,|
00002330  34 30 2c 30 2c 30 2c 34  30 2c 2d 34 30 2c 30 2c  |40,0,0,40,-40,0,|
00002340  30 2c 33 30 2c 38 31 2c  32 30 2c 30 2c 30 2c 30  |0,30,81,20,0,0,0|
00002350  2c 2d 33 30 2c 38 31 2c  2d 32 30 2c 30 2c 30 2c  |,-30,81,-20,0,0,|
00002360  34 30 2c 30 2c 30 2c 37  30 2c 30 2c 38 31 2c 2d  |40,0,0,70,0,81,-|
00002370  37 30 2c 35 30 2c 30 2c  33 30 2c 30 2c 38 31 2c  |70,50,0,30,0,81,|
00002380  34 30 2c 2d 35 30 2c 34  2c 78 2d 32 30 2c 79 2c  |40,-50,4,x-20,y,|
00002390  31 2c 34 36 30 2c 30 2c  30 2c 30 2c 31 30 2c 31  |1,460,0,0,0,10,1|
000023a0  2c 2d 34 36 30 2c 30 0d  04 e2 a5 dc 2d 31 30 2c  |,-460,0.....-10,|
000023b0  34 30 2c 33 30 2c 2d 31  30 2c 32 30 2c 34 30 2c  |40,30,-10,20,40,|
000023c0  32 30 2c 2d 34 30 2c 32  30 2c 35 30 2c 33 30 2c  |20,-40,20,50,30,|
000023d0  2d 34 30 2c 32 30 2c 33  30 2c 32 30 2c 2d 31 30  |-40,20,30,20,-10|
000023e0  2c 33 30 2c 31 35 2c 32  30 2c 2d 33 30 2c 33 30  |,30,15,20,-30,30|
000023f0  2c 33 35 2c 32 30 2c 2d  32 30 2c 34 30 2c 32 35  |,35,20,-20,40,25|
00002400  2c 31 30 2c 2d 32 30 2c  33 30 2c 32 30 2c 31 30  |,10,-20,30,20,10|
00002410  2c 2d 33 30 2c 33 30 2c  32 30 2c 2d 32 30 2c 2d  |,-30,30,20,-20,-|
00002420  33 30 2c 35 30 2c 32 30  2c 2d 32 30 2c 2d 33 30  |30,50,20,-20,-30|
00002430  2c 34 30 2c 31 30 2c 2d  33 30 2c 2d 33 30 2c 33  |,40,10,-30,-30,3|
00002440  30 2c 31 30 2c 2d 32 30  2c 2d 32 35 0d ff        |0,10,-20,-25..|
0000244e
gunboat.m0
gunboat.m1
gunboat.m2
gunboat.m4
gunboat.m5