Home » CEEFAX disks » telesoftware9.adl » 26-08-88/SHIPS

26-08-88/SHIPS

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 » CEEFAX disks » telesoftware9.adl
Filename: 26-08-88/SHIPS
Read OK:
File size: 0E2D bytes
Load address: FFFF0E00
Exec address: FFFF802B
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
    1REM C Charles Hope,1988
   10MODE1
   20ENVELOPE 2,3,0,0,0,1,1,1,120,-5,-5,-10,120,90
   30DIM fleet(10,10):DIM SHIP(8):DIM Name$(10):DIM Score(10)
   40FORZ=0 TO 10:Score(Z)=100:Name$(Z)=STRING$(12,"*"):NEXT
   50PROCTITLE
   60FORX=1TO10:FORY=1TO10:fleet(X,Y)=0:NEXT:NEXT
   70HIT=0:SHOT=0:Rep=0
   80PROCload
   90PROCDELAY(40)
  100PROCGRID
  110REPEAT
  120PROCFIRE
  130PROCcheck
  140PROCend
  150UNTIL Rep=1
  160CLS:PRINT''''':GOTO60
  170END
  180DEFPROCGRID
  190CLS
  200COLOUR1:GCOL0,7
  210FORZ=1TO10
  220PRINTTAB(Z*2+8,2)CHR$(Z+64)
  230NEXT
  240FORZ=1TO10
  250PRINTTAB(7,Z*2+2)STR$(Z)
  260NEXT
  270PLOT4,304,912
  280DRAW944,912
  290DRAW944,272
  300DRAW304,272
  310DRAW304,912
  320FORZ=1TO9
  330PLOT4,304,(272+Z*64)
  340PLOT1,640,0
  350PLOT4,Z*64+304,272
  360PLOT1,0,640
  370NEXT
  380PRINTTAB(32,11)"ENEMY"
  390PRINTTAB(32,12)"FLEET"
  400COLOUR3
  410ENDPROC
  420DEFPROCFIRE
  430PRINTTAB(9,25)SPC18
  440COLOUR3
  450 INPUTTAB(9,25)"WHICH SQUARE? "Q$
  460F%=1
  470X$=LEFT$(Q$,1)
  480Y$=RIGHT$(Q$,LEN(Q$)-1)
  490X=ASC(X$)-64
  500IF X>10 GOTO430
  510IF X<1 GOTO430
  520Y=VAL("+"+Y$)
  530IF Y>10 GOTO430
  540IF Y<1 GOTO430
  550PROCplot(3,2)
  560F%=0:SHOT=SHOT+1
  570ENDPROC
  580DEFPROCplot(C,D)
  590VDU19,2,C,0,0,0
  600GCOL0,D
  610PLOT4,(X*64+244),(916-Y*64)
  620PLOT1,56,0
  630FORJ=0TO28
  640PLOT1,0,56-J*2
  650PLOT1,J*2-56,0
  660PLOT1,0,J*2-55
  670PLOT1,55-J*2,0
  680IFF%=1 THEN SOUND1,-5,209-4*J,2
  690NEXT
  700ENDPROC
  710DEFPROCcheck
  720HIT=0
  730IF FNthere(fleet(X,Y))=1THEN HIT=1
  740IF HIT=1 THEN GOTO790 ELSE GOTO760
  750ELSEVDU19,2,7,0,0,0
  760SOUND 0,2,4,10
  770PROCplot(7,3)
  780ENDPROC
  790SOUND 0,2,6,10
  800PROCplot(1,1)
  810K=FNwhich(fleet(X,Y))
  820SHIP(K)=SHIP(K)-1
  830IF SHIP(K)>0 fleet(X,Y)=81:ENDPROC ELSE SOUND0,-15,4,20
  840COLOUR1
  850IF K=8 GOTO900
  860PRINTTAB(32,15)"SUNK"
  870 Size=6-K:IF Size=2 THEN Size=3
  880 IF Size<2 THEN Size=2
  890PRINTTAB(32,K+16)STRING$(Size,"*"):ENDPROC
  900PRINTTAB(5,25)"YOU HIT THERE BEFORE!"
  910PROCDELAY(50)
  920PRINTTAB(5,25)SPC(22)
  930ENDPROC
  940DEFPROCDELAY(T)
  950TIME=0:REPEAT UNTIL TIME=T*10
  960ENDPROC
  970DEF FNthere(q)=q MOD 10
  980DEFPROCload
  990LOCAL S:Val=1
 1000FOR S=5 TO 1 STEP-1
 1010 Clash=FALSE
 1020Clash=FALSE:z=RND(4)
 1030IF z=1 GOTO 1070
 1040IF z=2 GOTO 1130
 1050IF z=3 GOTO 1190
 1060GOTO1250
 1070x=RND(11-S):y=RND(10)
 1080FOR Z=0 TO S-1:IF FNthere(fleet(x+Z,y))>0 THEN Clash=TRUE
 1090NEXT
 1100IF Clash=TRUE GOTO 1020
 1110FOR Z=0 TO S-1:fleet(x+Z,y)=Val*10+1:NEXT
 1120GOTO1300
 1130x=RND(10):y=RND(11-S)
 1140FOR Z=0 TO S-1:IF FNthere(fleet(x,y+Z))>0 THEN Clash=TRUE
 1150NEXT
 1160IF Clash=TRUE GOTO 1020
 1170FOR Z=0 TO S-1:fleet(x,y+Z)=Val*10+1:NEXT
 1180GOTO1300
 1190x=RND(11-S):y=RND(11-S)
 1200FOR Z=0 TO S-1:IF FNthere(fleet(x+Z,y+Z))>0 THEN Clash=TRUE
 1210NEXT
 1220IF Clash=TRUE GOTO 1020
 1230FOR Z=0 TO S-1:fleet(x+Z,y+Z)=Val*10+1:NEXT
 1240GOTO1300
 1250 x=RND(11-S):y=RND(11-S)+S-1
 1260FOR Z=0 TO S-1:IF FNthere(fleet(x+Z,y-Z))>0 THEN Clash=TRUE
 1270NEXT
 1280IF Clash=TRUE GOTO 1020
 1290FOR Z=0 TO S-1:fleet(x+Z,y-Z)=Val*10+1:NEXT
 1300 SHIP(Val)=S:PROCclear:V=VPOS:PRINTTAB(11-S)STRING$(S,"*"):COLOUR 3:PRINTTAB(13,V)" Ready for sea":COLOUR 1
 1310Clash=FALSE
 1320Val=Val+1
 1330IF Val=4 OR Val=6 OR Val=7 THEN S=S+1
 1340IF Val=8 THEN S=1
 1350NEXT:GOTO1360
 1360COLOUR3:PRINTTAB(14,20)"FLEET SAILS!":ENDPROC
 1370DEF FNwhich(W)= W DIV 10
 1380DEFPROCend
 1390@%=1:COLOUR1
 1400 IF SHIP(1)=0 AND SHIP(2)=0 AND SHIP(3)=0 AND SHIP(4)=0 AND SHIP(5)=0 AND SHIP(6)=0 AND SHIP(7)=0 THEN PRINTTAB(9,25)"FLEET SUNK IN "SHOT" SHOTS":PROCSCORE:PRINTTAB(5)"PRESS SPACE BAR TO PLAY AGAIN":REPEAT UNTIL GET=32:Rep=1:ENDPROC
 1410ENDPROC
 1420 END
 1430DEFPROCTEST
 1440@%=1
 1450LOCALA,B
 1460FOR A=10TO1 STEP -1
 1470FOR B=1TO10
 1480IFFNwhich(fleet(A,B))>0 THEN PRINTTAB(A*2+8,B*2+2)FNwhich(fleet(A,B))
 1490NEXT B
 1500NEXT A
 1510ENDPROC
 1520DEFPROCTITLE
 1530CLS:VDU19,2,3,0,0,0:COLOUR1
 1540PRINTTAB(15,4)"BATTLESHIPS"'':COLOUR2
 1550*TYPE RULES
 1560PROCDELAY(80):CLS:COLOUR3:PRINTTAB(3,10)"Enemy fleet being prepared for sea"':COLOUR1
 1570ENDPROC
 1580DEFPROCclear
 1590LOCAL X%,Y%,A%,B%
 1600FORX%=1TO10:FORY%=1TO10
 1610IFfleet(X%,Y%)>2 THENGOTO1620 ELSE GOTO1690
 1620FORA%=-1TO1:FORB%=-1TO1
 1630P%=X%+A%:IF P%<1 THEN P%=1
 1640IFP%>10 THEN P%=10
 1650Q%=Y%+B%:IFQ%<1 THEN Q%=1
 1660IFQ%>10 THEN Q%=10
 1670IF fleet(P%,Q%)=0 THEN fleet(P%,Q%)=2
 1680NEXT:NEXT
 1690NEXT:NEXT
 1700ENDPROC
 1710DEFPROCSCORE
 1720Q=OPENUP("SCORES")
 1730PROCDELAY(15):CLS
 1740FORZ=0TO9:INPUT#Q,Score(Z),Name$(Z):NEXT:CLOSE#Q
 1750INPUTTAB(6,6)"What is your name? "NAME$
 1760CLS:COLOUR1:PRINTTAB(14,4)"TOP SCORES"''
 1770FORZ=0TO9:IF SHOT<Score(Z) THEN PROCshuffle:Z=9
 1780NEXT:COLOUR3
 1790FOR Z=0TO9:PRINTTAB(6)Name$(Z);TAB(30)Score(Z)':NEXT:COLOUR1
 1800Q=OPENOUT("SCORES")
 1810FOR Z=0 TO 9:PRINT#Q,Score(Z),Name$(Z):NEXT:CLOSE#Q
 1820ENDPROC
 1830DEFPROCshuffle
 1840FOR L=9 TO Z+1 STEP -1
 1850Score(L)=Score(L-1):Name$(L)=Name$(L-1)
 1860NEXT:Score(Z)=SHOT:Name$(Z)=NAME$
 1870ENDPROC
� C Charles Hope,1988

�1
*� 2,3,0,0,0,1,1,1,120,-5,-5,-10,120,90
4� fleet(10,10):� SHIP(8):� Name$(10):� Score(10)
(.�Z=0 � 10:Score(Z)=100:Name$(Z)=�12,"*"):�
2
�TITLE
<$�X=1�10:�Y=1�10:fleet(X,Y)=0:�:�
FHIT=0:SHOT=0:Rep=0
P	�load
Z�DELAY(40)
d	�GRID
n�
x	�FIRE
�
�check
��end
�� Rep=1
��:�''''':�T|@
��
�
��GRID
��
��1:�0,7
��Z=1�10
��Z*2+8,2)�(Z+64)
��
��Z=1�10
��7,Z*2+2)�(Z)
�
�4,304,912
�944,912
"�944,272
,�304,272
6�304,912
@
�Z=1�9
J�4,304,(272+Z*64)
T�1,640,0
^�4,Z*64+304,272
h�1,0,640
r�
|�32,11)"ENEMY"
��32,12)"FLEET"
��3
��
�
��FIRE
��9,25)�18
��3
� �9,25)"WHICH SQUARE? "Q$
�F%=1
�
X$=�Q$,1)
�Y$=�Q$,�(Q$)-1)
�X=�(X$)-64
�� X>10 �tnA
�� X<1 �tnA
Y=�("+"+Y$)
� Y>10 �tnA
� Y<1 �tnA
&�plot(3,2)
0F%=0:SHOT=SHOT+1
:�
D��plot(C,D)
N�19,2,C,0,0,0
X�0,D
b�4,(X*64+244),(916-Y*64)
l�1,56,0
v�J=0�28
��1,0,56-J*2
��1,J*2-56,0
��1,0,J*2-55
��1,55-J*2,0
��F%=1 � �1,-5,209-4*J,2
��
��
���check
�	HIT=0
�!� �there(fleet(X,Y))=1� HIT=1
�� HIT=1 � �TVC � �dxB
���19,2,7,0,0,0
�� 0,2,4,10
�plot(7,3)
�
� 0,2,6,10
 �plot(1,1)
*K=�which(fleet(X,Y))
4SHIP(K)=SHIP(K)-1
>-� SHIP(K)>0 fleet(X,Y)=81:� � �0,-15,4,20
H�1
R� K=8 �tDC
\�32,15)"SUNK"
f Size=6-K:� Size=2 � Size=3
p � Size<2 � Size=2
z�32,K+16)�Size,"*"):�
�"�5,25)"YOU HIT THERE BEFORE!"
��DELAY(50)
��5,25)�(22)
��
���DELAY(T)
��=0:� � �=T*10
��
�� �there(q)=q � 10
�
��load
�
� S:Val=1
�� S=5 � 1 �-1
� Clash=�
�Clash=�:z=�(4)
� z=1 � �TnD
� z=2 � �DjD
� z=3 � �tfD
$	�dbD
.x=�(11-S):y=�(10)
82� Z=0 � S-1:� �there(fleet(x+Z,y))>0 � Clash=�
B�
L� Clash=� � �d|C
V'� Z=0 � S-1:fleet(x+Z,y)=Val*10+1:�
`	�TTE
jx=�(10):y=�(11-S)
t2� Z=0 � S-1:� �there(fleet(x,y+Z))>0 � Clash=�
~�
�� Clash=� � �d|C
�'� Z=0 � S-1:fleet(x,y+Z)=Val*10+1:�
�	�TTE
�x=�(11-S):y=�(11-S)
�4� Z=0 � S-1:� �there(fleet(x+Z,y+Z))>0 � Clash=�
��
�� Clash=� � �d|C
�)� Z=0 � S-1:fleet(x+Z,y+Z)=Val*10+1:�
�	�TTE
� x=�(11-S):y=�(11-S)+S-1
�4� Z=0 � S-1:� �there(fleet(x+Z,y-Z))>0 � Clash=�
��
� Clash=� � �d|C

)� Z=0 � S-1:fleet(x+Z,y-Z)=Val*10+1:�
J SHIP(Val)=S:�clear:V=�:�11-S)�S,"*"):� 3:�13,V)" Ready for sea":� 1
Clash=�
(
Val=Val+1
2#� Val=4 � Val=6 � Val=7 � S=S+1
<� Val=8 � S=1
F�:�DPE
P�3:�14,20)"FLEET SAILS!":�
Z� �which(W)= W � 10
d	��end
n@%=1:�1
x� � SHIP(1)=0 � SHIP(2)=0 � SHIP(3)=0 � SHIP(4)=0 � SHIP(5)=0 � SHIP(6)=0 � SHIP(7)=0 � �9,25)"FLEET SUNK IN "SHOT" SHOTS":�SCORE:�5)"PRESS SPACE BAR TO PLAY AGAIN":� � �=32:Rep=1:�
��
� �
�
��TEST
�@%=1
��A,B
�� A=10�1 � -1
�� B=1�10
�<�which(fleet(A,B))>0 � �A*2+8,B*2+2)�which(fleet(A,B))
�� B
�� A
��
���TITLE
��:�19,2,3,0,0,0:�1
�15,4)"BATTLESHIPS"'':�2
*TYPE RULES
C�DELAY(80):�:�3:�3,10)"Enemy fleet being prepared for sea"':�1
"�
,��clear
6� X%,Y%,A%,B%
@�X%=1�10:�Y%=1�10
J"�fleet(X%,Y%)>2 ��DTF � �tZF
T�A%=-1�1:�B%=-1�1
^P%=X%+A%:� P%<1 � P%=1
h�P%>10 � P%=10
rQ%=Y%+B%:�Q%<1 � Q%=1
|�Q%>10 � Q%=10
�%� fleet(P%,Q%)=0 � fleet(P%,Q%)=2
��:�
��:�
��
���SCORE
�Q=�("SCORES")
��DELAY(15):�
�&�Z=0�9:�#Q,Score(Z),Name$(Z):�:�#Q
�$�6,6)"What is your name? "NAME$
��:�1:�14,4)"TOP SCORES"''
�)�Z=0�9:� SHOT<Score(Z) � �shuffle:Z=9
��:�3
�+� Z=0�9:�6)Name$(Z);�30)Score(Z)':�:�1
Q=�("SCORES")
)� Z=0 � 9:�#Q,Score(Z),Name$(Z):�:�#Q
�
&
��shuffle
0� L=9 � Z+1 � -1
:+Score(L)=Score(L-1):Name$(L)=Name$(L-1)
D"�:Score(Z)=SHOT:Name$(Z)=NAME$
N�
�
00000000  0d 00 01 19 f4 20 43 20  43 68 61 72 6c 65 73 20  |..... C Charles |
00000010  48 6f 70 65 2c 31 39 38  38 0d 00 0a 06 eb 31 0d  |Hope,1988.....1.|
00000020  00 14 2a e2 20 32 2c 33  2c 30 2c 30 2c 30 2c 31  |..*. 2,3,0,0,0,1|
00000030  2c 31 2c 31 2c 31 32 30  2c 2d 35 2c 2d 35 2c 2d  |,1,1,120,-5,-5,-|
00000040  31 30 2c 31 32 30 2c 39  30 0d 00 1e 34 de 20 66  |10,120,90...4. f|
00000050  6c 65 65 74 28 31 30 2c  31 30 29 3a de 20 53 48  |leet(10,10):. SH|
00000060  49 50 28 38 29 3a de 20  4e 61 6d 65 24 28 31 30  |IP(8):. Name$(10|
00000070  29 3a de 20 53 63 6f 72  65 28 31 30 29 0d 00 28  |):. Score(10)..(|
00000080  2e e3 5a 3d 30 20 b8 20  31 30 3a 53 63 6f 72 65  |..Z=0 . 10:Score|
00000090  28 5a 29 3d 31 30 30 3a  4e 61 6d 65 24 28 5a 29  |(Z)=100:Name$(Z)|
000000a0  3d c4 31 32 2c 22 2a 22  29 3a ed 0d 00 32 0a f2  |=.12,"*"):...2..|
000000b0  54 49 54 4c 45 0d 00 3c  24 e3 58 3d 31 b8 31 30  |TITLE..<$.X=1.10|
000000c0  3a e3 59 3d 31 b8 31 30  3a 66 6c 65 65 74 28 58  |:.Y=1.10:fleet(X|
000000d0  2c 59 29 3d 30 3a ed 3a  ed 0d 00 46 16 48 49 54  |,Y)=0:.:...F.HIT|
000000e0  3d 30 3a 53 48 4f 54 3d  30 3a 52 65 70 3d 30 0d  |=0:SHOT=0:Rep=0.|
000000f0  00 50 09 f2 6c 6f 61 64  0d 00 5a 0e f2 44 45 4c  |.P..load..Z..DEL|
00000100  41 59 28 34 30 29 0d 00  64 09 f2 47 52 49 44 0d  |AY(40)..d..GRID.|
00000110  00 6e 05 f5 0d 00 78 09  f2 46 49 52 45 0d 00 82  |.n....x..FIRE...|
00000120  0a f2 63 68 65 63 6b 0d  00 8c 08 f2 65 6e 64 0d  |..check.....end.|
00000130  00 96 0b fd 20 52 65 70  3d 31 0d 00 a0 12 db 3a  |.... Rep=1.....:|
00000140  f1 27 27 27 27 27 3a e5  8d 54 7c 40 0d 00 aa 05  |.''''':..T|@....|
00000150  e0 0d 00 b4 0a dd f2 47  52 49 44 0d 00 be 05 db  |.......GRID.....|
00000160  0d 00 c8 0b fb 31 3a e6  30 2c 37 0d 00 d2 0b e3  |.....1:.0,7.....|
00000170  5a 3d 31 b8 31 30 0d 00  dc 15 f1 8a 5a 2a 32 2b  |Z=1.10......Z*2+|
00000180  38 2c 32 29 bd 28 5a 2b  36 34 29 0d 00 e6 05 ed  |8,2).(Z+64).....|
00000190  0d 00 f0 0b e3 5a 3d 31  b8 31 30 0d 00 fa 12 f1  |.....Z=1.10.....|
000001a0  8a 37 2c 5a 2a 32 2b 32  29 c3 28 5a 29 0d 01 04  |.7,Z*2+2).(Z)...|
000001b0  05 ed 0d 01 0e 0e f0 34  2c 33 30 34 2c 39 31 32  |.......4,304,912|
000001c0  0d 01 18 0c df 39 34 34  2c 39 31 32 0d 01 22 0c  |.....944,912..".|
000001d0  df 39 34 34 2c 32 37 32  0d 01 2c 0c df 33 30 34  |.944,272..,..304|
000001e0  2c 32 37 32 0d 01 36 0c  df 33 30 34 2c 39 31 32  |,272..6..304,912|
000001f0  0d 01 40 0a e3 5a 3d 31  b8 39 0d 01 4a 15 f0 34  |..@..Z=1.9..J..4|
00000200  2c 33 30 34 2c 28 32 37  32 2b 5a 2a 36 34 29 0d  |,304,(272+Z*64).|
00000210  01 54 0c f0 31 2c 36 34  30 2c 30 0d 01 5e 13 f0  |.T..1,640,0..^..|
00000220  34 2c 5a 2a 36 34 2b 33  30 34 2c 32 37 32 0d 01  |4,Z*64+304,272..|
00000230  68 0c f0 31 2c 30 2c 36  34 30 0d 01 72 05 ed 0d  |h..1,0,640..r...|
00000240  01 7c 13 f1 8a 33 32 2c  31 31 29 22 45 4e 45 4d  |.|...32,11)"ENEM|
00000250  59 22 0d 01 86 13 f1 8a  33 32 2c 31 32 29 22 46  |Y"......32,12)"F|
00000260  4c 45 45 54 22 0d 01 90  06 fb 33 0d 01 9a 05 e1  |LEET".....3.....|
00000270  0d 01 a4 0a dd f2 46 49  52 45 0d 01 ae 0e f1 8a  |......FIRE......|
00000280  39 2c 32 35 29 89 31 38  0d 01 b8 06 fb 33 0d 01  |9,25).18.....3..|
00000290  c2 1e 20 e8 8a 39 2c 32  35 29 22 57 48 49 43 48  |.. ..9,25)"WHICH|
000002a0  20 53 51 55 41 52 45 3f  20 22 51 24 0d 01 cc 08  | SQUARE? "Q$....|
000002b0  46 25 3d 31 0d 01 d6 0d  58 24 3d c0 51 24 2c 31  |F%=1....X$=.Q$,1|
000002c0  29 0d 01 e0 13 59 24 3d  c2 51 24 2c a9 28 51 24  |)....Y$=.Q$,.(Q$|
000002d0  29 2d 31 29 0d 01 ea 0e  58 3d 97 28 58 24 29 2d  |)-1)....X=.(X$)-|
000002e0  36 34 0d 01 f4 10 e7 20  58 3e 31 30 20 e5 8d 74  |64..... X>10 ..t|
000002f0  6e 41 0d 01 fe 0f e7 20  58 3c 31 20 e5 8d 74 6e  |nA..... X<1 ..tn|
00000300  41 0d 02 08 0f 59 3d bb  28 22 2b 22 2b 59 24 29  |A....Y=.("+"+Y$)|
00000310  0d 02 12 10 e7 20 59 3e  31 30 20 e5 8d 74 6e 41  |..... Y>10 ..tnA|
00000320  0d 02 1c 0f e7 20 59 3c  31 20 e5 8d 74 6e 41 0d  |..... Y<1 ..tnA.|
00000330  02 26 0e f2 70 6c 6f 74  28 33 2c 32 29 0d 02 30  |.&..plot(3,2)..0|
00000340  14 46 25 3d 30 3a 53 48  4f 54 3d 53 48 4f 54 2b  |.F%=0:SHOT=SHOT+|
00000350  31 0d 02 3a 05 e1 0d 02  44 0f dd f2 70 6c 6f 74  |1..:....D...plot|
00000360  28 43 2c 44 29 0d 02 4e  11 ef 31 39 2c 32 2c 43  |(C,D)..N..19,2,C|
00000370  2c 30 2c 30 2c 30 0d 02  58 08 e6 30 2c 44 0d 02  |,0,0,0..X..0,D..|
00000380  62 1c f0 34 2c 28 58 2a  36 34 2b 32 34 34 29 2c  |b..4,(X*64+244),|
00000390  28 39 31 36 2d 59 2a 36  34 29 0d 02 6c 0b f0 31  |(916-Y*64)..l..1|
000003a0  2c 35 36 2c 30 0d 02 76  0b e3 4a 3d 30 b8 32 38  |,56,0..v..J=0.28|
000003b0  0d 02 80 0f f0 31 2c 30  2c 35 36 2d 4a 2a 32 0d  |.....1,0,56-J*2.|
000003c0  02 8a 0f f0 31 2c 4a 2a  32 2d 35 36 2c 30 0d 02  |....1,J*2-56,0..|
000003d0  94 0f f0 31 2c 30 2c 4a  2a 32 2d 35 35 0d 02 9e  |...1,0,J*2-55...|
000003e0  0f f0 31 2c 35 35 2d 4a  2a 32 2c 30 0d 02 a8 1b  |..1,55-J*2,0....|
000003f0  e7 46 25 3d 31 20 8c 20  d4 31 2c 2d 35 2c 32 30  |.F%=1 . .1,-5,20|
00000400  39 2d 34 2a 4a 2c 32 0d  02 b2 05 ed 0d 02 bc 05  |9-4*J,2.........|
00000410  e1 0d 02 c6 0b dd f2 63  68 65 63 6b 0d 02 d0 09  |.......check....|
00000420  48 49 54 3d 30 0d 02 da  21 e7 20 a4 74 68 65 72  |HIT=0...!. .ther|
00000430  65 28 66 6c 65 65 74 28  58 2c 59 29 29 3d 31 8c  |e(fleet(X,Y))=1.|
00000440  20 48 49 54 3d 31 0d 02  e4 1b e7 20 48 49 54 3d  | HIT=1..... HIT=|
00000450  31 20 8c 20 e5 8d 54 56  43 20 8b 20 e5 8d 64 78  |1 . ..TVC . ..dx|
00000460  42 0d 02 ee 12 8b ef 31  39 2c 32 2c 37 2c 30 2c  |B......19,2,7,0,|
00000470  30 2c 30 0d 02 f8 0e d4  20 30 2c 32 2c 34 2c 31  |0,0..... 0,2,4,1|
00000480  30 0d 03 02 0e f2 70 6c  6f 74 28 37 2c 33 29 0d  |0.....plot(7,3).|
00000490  03 0c 05 e1 0d 03 16 0e  d4 20 30 2c 32 2c 36 2c  |......... 0,2,6,|
000004a0  31 30 0d 03 20 0e f2 70  6c 6f 74 28 31 2c 31 29  |10.. ..plot(1,1)|
000004b0  0d 03 2a 18 4b 3d a4 77  68 69 63 68 28 66 6c 65  |..*.K=.which(fle|
000004c0  65 74 28 58 2c 59 29 29  0d 03 34 15 53 48 49 50  |et(X,Y))..4.SHIP|
000004d0  28 4b 29 3d 53 48 49 50  28 4b 29 2d 31 0d 03 3e  |(K)=SHIP(K)-1..>|
000004e0  2d e7 20 53 48 49 50 28  4b 29 3e 30 20 66 6c 65  |-. SHIP(K)>0 fle|
000004f0  65 74 28 58 2c 59 29 3d  38 31 3a e1 20 8b 20 d4  |et(X,Y)=81:. . .|
00000500  30 2c 2d 31 35 2c 34 2c  32 30 0d 03 48 06 fb 31  |0,-15,4,20..H..1|
00000510  0d 03 52 0f e7 20 4b 3d  38 20 e5 8d 74 44 43 0d  |..R.. K=8 ..tDC.|
00000520  03 5c 12 f1 8a 33 32 2c  31 35 29 22 53 55 4e 4b  |.\...32,15)"SUNK|
00000530  22 0d 03 66 1f 20 53 69  7a 65 3d 36 2d 4b 3a e7  |"..f. Size=6-K:.|
00000540  20 53 69 7a 65 3d 32 20  8c 20 53 69 7a 65 3d 33  | Size=2 . Size=3|
00000550  0d 03 70 16 20 e7 20 53  69 7a 65 3c 32 20 8c 20  |..p. . Size<2 . |
00000560  53 69 7a 65 3d 32 0d 03  7a 1a f1 8a 33 32 2c 4b  |Size=2..z...32,K|
00000570  2b 31 36 29 c4 53 69 7a  65 2c 22 2a 22 29 3a e1  |+16).Size,"*"):.|
00000580  0d 03 84 22 f1 8a 35 2c  32 35 29 22 59 4f 55 20  |..."..5,25)"YOU |
00000590  48 49 54 20 54 48 45 52  45 20 42 45 46 4f 52 45  |HIT THERE BEFORE|
000005a0  21 22 0d 03 8e 0e f2 44  45 4c 41 59 28 35 30 29  |!".....DELAY(50)|
000005b0  0d 03 98 10 f1 8a 35 2c  32 35 29 89 28 32 32 29  |......5,25).(22)|
000005c0  0d 03 a2 05 e1 0d 03 ac  0e dd f2 44 45 4c 41 59  |...........DELAY|
000005d0  28 54 29 0d 03 b6 12 d1  3d 30 3a f5 20 fd 20 91  |(T).....=0:. . .|
000005e0  3d 54 2a 31 30 0d 03 c0  05 e1 0d 03 ca 16 dd 20  |=T*10.......... |
000005f0  a4 74 68 65 72 65 28 71  29 3d 71 20 83 20 31 30  |.there(q)=q . 10|
00000600  0d 03 d4 0a dd f2 6c 6f  61 64 0d 03 de 0d ea 20  |......load..... |
00000610  53 3a 56 61 6c 3d 31 0d  03 e8 11 e3 20 53 3d 35  |S:Val=1..... S=5|
00000620  20 b8 20 31 20 88 2d 31  0d 03 f2 0c 20 43 6c 61  | . 1 .-1.... Cla|
00000630  73 68 3d a3 0d 03 fc 12  43 6c 61 73 68 3d a3 3a  |sh=.....Clash=.:|
00000640  7a 3d b3 28 34 29 0d 04  06 10 e7 20 7a 3d 31 20  |z=.(4)..... z=1 |
00000650  e5 20 8d 54 6e 44 0d 04  10 10 e7 20 7a 3d 32 20  |. .TnD..... z=2 |
00000660  e5 20 8d 44 6a 44 0d 04  1a 10 e7 20 7a 3d 33 20  |. .DjD..... z=3 |
00000670  e5 20 8d 74 66 44 0d 04  24 09 e5 8d 64 62 44 0d  |. .tfD..$...dbD.|
00000680  04 2e 15 78 3d b3 28 31  31 2d 53 29 3a 79 3d b3  |...x=.(11-S):y=.|
00000690  28 31 30 29 0d 04 38 32  e3 20 5a 3d 30 20 b8 20  |(10)..82. Z=0 . |
000006a0  53 2d 31 3a e7 20 a4 74  68 65 72 65 28 66 6c 65  |S-1:. .there(fle|
000006b0  65 74 28 78 2b 5a 2c 79  29 29 3e 30 20 8c 20 43  |et(x+Z,y))>0 . C|
000006c0  6c 61 73 68 3d b9 0d 04  42 05 ed 0d 04 4c 14 e7  |lash=...B....L..|
000006d0  20 43 6c 61 73 68 3d b9  20 e5 20 8d 64 7c 43 0d  | Clash=. . .d|C.|
000006e0  04 56 27 e3 20 5a 3d 30  20 b8 20 53 2d 31 3a 66  |.V'. Z=0 . S-1:f|
000006f0  6c 65 65 74 28 78 2b 5a  2c 79 29 3d 56 61 6c 2a  |leet(x+Z,y)=Val*|
00000700  31 30 2b 31 3a ed 0d 04  60 09 e5 8d 54 54 45 0d  |10+1:...`...TTE.|
00000710  04 6a 15 78 3d b3 28 31  30 29 3a 79 3d b3 28 31  |.j.x=.(10):y=.(1|
00000720  31 2d 53 29 0d 04 74 32  e3 20 5a 3d 30 20 b8 20  |1-S)..t2. Z=0 . |
00000730  53 2d 31 3a e7 20 a4 74  68 65 72 65 28 66 6c 65  |S-1:. .there(fle|
00000740  65 74 28 78 2c 79 2b 5a  29 29 3e 30 20 8c 20 43  |et(x,y+Z))>0 . C|
00000750  6c 61 73 68 3d b9 0d 04  7e 05 ed 0d 04 88 14 e7  |lash=...~.......|
00000760  20 43 6c 61 73 68 3d b9  20 e5 20 8d 64 7c 43 0d  | Clash=. . .d|C.|
00000770  04 92 27 e3 20 5a 3d 30  20 b8 20 53 2d 31 3a 66  |..'. Z=0 . S-1:f|
00000780  6c 65 65 74 28 78 2c 79  2b 5a 29 3d 56 61 6c 2a  |leet(x,y+Z)=Val*|
00000790  31 30 2b 31 3a ed 0d 04  9c 09 e5 8d 54 54 45 0d  |10+1:.......TTE.|
000007a0  04 a6 17 78 3d b3 28 31  31 2d 53 29 3a 79 3d b3  |...x=.(11-S):y=.|
000007b0  28 31 31 2d 53 29 0d 04  b0 34 e3 20 5a 3d 30 20  |(11-S)...4. Z=0 |
000007c0  b8 20 53 2d 31 3a e7 20  a4 74 68 65 72 65 28 66  |. S-1:. .there(f|
000007d0  6c 65 65 74 28 78 2b 5a  2c 79 2b 5a 29 29 3e 30  |leet(x+Z,y+Z))>0|
000007e0  20 8c 20 43 6c 61 73 68  3d b9 0d 04 ba 05 ed 0d  | . Clash=.......|
000007f0  04 c4 14 e7 20 43 6c 61  73 68 3d b9 20 e5 20 8d  |.... Clash=. . .|
00000800  64 7c 43 0d 04 ce 29 e3  20 5a 3d 30 20 b8 20 53  |d|C...). Z=0 . S|
00000810  2d 31 3a 66 6c 65 65 74  28 78 2b 5a 2c 79 2b 5a  |-1:fleet(x+Z,y+Z|
00000820  29 3d 56 61 6c 2a 31 30  2b 31 3a ed 0d 04 d8 09  |)=Val*10+1:.....|
00000830  e5 8d 54 54 45 0d 04 e2  1c 20 78 3d b3 28 31 31  |..TTE.... x=.(11|
00000840  2d 53 29 3a 79 3d b3 28  31 31 2d 53 29 2b 53 2d  |-S):y=.(11-S)+S-|
00000850  31 0d 04 ec 34 e3 20 5a  3d 30 20 b8 20 53 2d 31  |1...4. Z=0 . S-1|
00000860  3a e7 20 a4 74 68 65 72  65 28 66 6c 65 65 74 28  |:. .there(fleet(|
00000870  78 2b 5a 2c 79 2d 5a 29  29 3e 30 20 8c 20 43 6c  |x+Z,y-Z))>0 . Cl|
00000880  61 73 68 3d b9 0d 04 f6  05 ed 0d 05 00 14 e7 20  |ash=........... |
00000890  43 6c 61 73 68 3d b9 20  e5 20 8d 64 7c 43 0d 05  |Clash=. . .d|C..|
000008a0  0a 29 e3 20 5a 3d 30 20  b8 20 53 2d 31 3a 66 6c  |.). Z=0 . S-1:fl|
000008b0  65 65 74 28 78 2b 5a 2c  79 2d 5a 29 3d 56 61 6c  |eet(x+Z,y-Z)=Val|
000008c0  2a 31 30 2b 31 3a ed 0d  05 14 4a 20 53 48 49 50  |*10+1:....J SHIP|
000008d0  28 56 61 6c 29 3d 53 3a  f2 63 6c 65 61 72 3a 56  |(Val)=S:.clear:V|
000008e0  3d bc 3a f1 8a 31 31 2d  53 29 c4 53 2c 22 2a 22  |=.:..11-S).S,"*"|
000008f0  29 3a fb 20 33 3a f1 8a  31 33 2c 56 29 22 20 52  |):. 3:..13,V)" R|
00000900  65 61 64 79 20 66 6f 72  20 73 65 61 22 3a fb 20  |eady for sea":. |
00000910  31 0d 05 1e 0b 43 6c 61  73 68 3d a3 0d 05 28 0d  |1....Clash=...(.|
00000920  56 61 6c 3d 56 61 6c 2b  31 0d 05 32 23 e7 20 56  |Val=Val+1..2#. V|
00000930  61 6c 3d 34 20 84 20 56  61 6c 3d 36 20 84 20 56  |al=4 . Val=6 . V|
00000940  61 6c 3d 37 20 8c 20 53  3d 53 2b 31 0d 05 3c 11  |al=7 . S=S+1..<.|
00000950  e7 20 56 61 6c 3d 38 20  8c 20 53 3d 31 0d 05 46  |. Val=8 . S=1..F|
00000960  0b ed 3a e5 8d 44 50 45  0d 05 50 1f fb 33 3a f1  |..:..DPE..P..3:.|
00000970  8a 31 34 2c 32 30 29 22  46 4c 45 45 54 20 53 41  |.14,20)"FLEET SA|
00000980  49 4c 53 21 22 3a e1 0d  05 5a 17 dd 20 a4 77 68  |ILS!":...Z.. .wh|
00000990  69 63 68 28 57 29 3d 20  57 20 81 20 31 30 0d 05  |ich(W)= W . 10..|
000009a0  64 09 dd f2 65 6e 64 0d  05 6e 0b 40 25 3d 31 3a  |d...end..n.@%=1:|
000009b0  fb 31 0d 05 78 ba 20 e7  20 53 48 49 50 28 31 29  |.1..x. . SHIP(1)|
000009c0  3d 30 20 80 20 53 48 49  50 28 32 29 3d 30 20 80  |=0 . SHIP(2)=0 .|
000009d0  20 53 48 49 50 28 33 29  3d 30 20 80 20 53 48 49  | SHIP(3)=0 . SHI|
000009e0  50 28 34 29 3d 30 20 80  20 53 48 49 50 28 35 29  |P(4)=0 . SHIP(5)|
000009f0  3d 30 20 80 20 53 48 49  50 28 36 29 3d 30 20 80  |=0 . SHIP(6)=0 .|
00000a00  20 53 48 49 50 28 37 29  3d 30 20 8c 20 f1 8a 39  | SHIP(7)=0 . ..9|
00000a10  2c 32 35 29 22 46 4c 45  45 54 20 53 55 4e 4b 20  |,25)"FLEET SUNK |
00000a20  49 4e 20 22 53 48 4f 54  22 20 53 48 4f 54 53 22  |IN "SHOT" SHOTS"|
00000a30  3a f2 53 43 4f 52 45 3a  f1 8a 35 29 22 50 52 45  |:.SCORE:..5)"PRE|
00000a40  53 53 20 53 50 41 43 45  20 42 41 52 20 54 4f 20  |SS SPACE BAR TO |
00000a50  50 4c 41 59 20 41 47 41  49 4e 22 3a f5 20 fd 20  |PLAY AGAIN":. . |
00000a60  a5 3d 33 32 3a 52 65 70  3d 31 3a e1 0d 05 82 05  |.=32:Rep=1:.....|
00000a70  e1 0d 05 8c 06 20 e0 0d  05 96 0a dd f2 54 45 53  |..... .......TES|
00000a80  54 0d 05 a0 08 40 25 3d  31 0d 05 aa 08 ea 41 2c  |T....@%=1.....A,|
00000a90  42 0d 05 b4 11 e3 20 41  3d 31 30 b8 31 20 88 20  |B..... A=10.1 . |
00000aa0  2d 31 0d 05 be 0c e3 20  42 3d 31 b8 31 30 0d 05  |-1..... B=1.10..|
00000ab0  c8 3c e7 a4 77 68 69 63  68 28 66 6c 65 65 74 28  |.<..which(fleet(|
00000ac0  41 2c 42 29 29 3e 30 20  8c 20 f1 8a 41 2a 32 2b  |A,B))>0 . ..A*2+|
00000ad0  38 2c 42 2a 32 2b 32 29  a4 77 68 69 63 68 28 66  |8,B*2+2).which(f|
00000ae0  6c 65 65 74 28 41 2c 42  29 29 0d 05 d2 07 ed 20  |leet(A,B))..... |
00000af0  42 0d 05 dc 07 ed 20 41  0d 05 e6 05 e1 0d 05 f0  |B..... A........|
00000b00  0b dd f2 54 49 54 4c 45  0d 05 fa 16 db 3a ef 31  |...TITLE.....:.1|
00000b10  39 2c 32 2c 33 2c 30 2c  30 2c 30 3a fb 31 0d 06  |9,2,3,0,0,0:.1..|
00000b20  04 1d f1 8a 31 35 2c 34  29 22 42 41 54 54 4c 45  |....15,4)"BATTLE|
00000b30  53 48 49 50 53 22 27 27  3a fb 32 0d 06 0e 0f 2a  |SHIPS"'':.2....*|
00000b40  54 59 50 45 20 52 55 4c  45 53 0d 06 18 43 f2 44  |TYPE RULES...C.D|
00000b50  45 4c 41 59 28 38 30 29  3a db 3a fb 33 3a f1 8a  |ELAY(80):.:.3:..|
00000b60  33 2c 31 30 29 22 45 6e  65 6d 79 20 66 6c 65 65  |3,10)"Enemy flee|
00000b70  74 20 62 65 69 6e 67 20  70 72 65 70 61 72 65 64  |t being prepared|
00000b80  20 66 6f 72 20 73 65 61  22 27 3a fb 31 0d 06 22  | for sea"':.1.."|
00000b90  05 e1 0d 06 2c 0b dd f2  63 6c 65 61 72 0d 06 36  |....,...clear..6|
00000ba0  11 ea 20 58 25 2c 59 25  2c 41 25 2c 42 25 0d 06  |.. X%,Y%,A%,B%..|
00000bb0  40 15 e3 58 25 3d 31 b8  31 30 3a e3 59 25 3d 31  |@..X%=1.10:.Y%=1|
00000bc0  b8 31 30 0d 06 4a 22 e7  66 6c 65 65 74 28 58 25  |.10..J".fleet(X%|
00000bd0  2c 59 25 29 3e 32 20 8c  e5 8d 44 54 46 20 8b 20  |,Y%)>2 ...DTF . |
00000be0  e5 8d 74 5a 46 0d 06 54  15 e3 41 25 3d 2d 31 b8  |..tZF..T..A%=-1.|
00000bf0  31 3a e3 42 25 3d 2d 31  b8 31 0d 06 5e 1a 50 25  |1:.B%=-1.1..^.P%|
00000c00  3d 58 25 2b 41 25 3a e7  20 50 25 3c 31 20 8c 20  |=X%+A%:. P%<1 . |
00000c10  50 25 3d 31 0d 06 68 12  e7 50 25 3e 31 30 20 8c  |P%=1..h..P%>10 .|
00000c20  20 50 25 3d 31 30 0d 06  72 19 51 25 3d 59 25 2b  | P%=10..r.Q%=Y%+|
00000c30  42 25 3a e7 51 25 3c 31  20 8c 20 51 25 3d 31 0d  |B%:.Q%<1 . Q%=1.|
00000c40  06 7c 12 e7 51 25 3e 31  30 20 8c 20 51 25 3d 31  |.|..Q%>10 . Q%=1|
00000c50  30 0d 06 86 25 e7 20 66  6c 65 65 74 28 50 25 2c  |0...%. fleet(P%,|
00000c60  51 25 29 3d 30 20 8c 20  66 6c 65 65 74 28 50 25  |Q%)=0 . fleet(P%|
00000c70  2c 51 25 29 3d 32 0d 06  90 07 ed 3a ed 0d 06 9a  |,Q%)=2.....:....|
00000c80  07 ed 3a ed 0d 06 a4 05  e1 0d 06 ae 0b dd f2 53  |..:............S|
00000c90  43 4f 52 45 0d 06 b8 11  51 3d ad 28 22 53 43 4f  |CORE....Q=.("SCO|
00000ca0  52 45 53 22 29 0d 06 c2  10 f2 44 45 4c 41 59 28  |RES").....DELAY(|
00000cb0  31 35 29 3a db 0d 06 cc  26 e3 5a 3d 30 b8 39 3a  |15):....&.Z=0.9:|
00000cc0  e8 23 51 2c 53 63 6f 72  65 28 5a 29 2c 4e 61 6d  |.#Q,Score(Z),Nam|
00000cd0  65 24 28 5a 29 3a ed 3a  d9 23 51 0d 06 d6 24 e8  |e$(Z):.:.#Q...$.|
00000ce0  8a 36 2c 36 29 22 57 68  61 74 20 69 73 20 79 6f  |.6,6)"What is yo|
00000cf0  75 72 20 6e 61 6d 65 3f  20 22 4e 41 4d 45 24 0d  |ur name? "NAME$.|
00000d00  06 e0 1e db 3a fb 31 3a  f1 8a 31 34 2c 34 29 22  |....:.1:..14,4)"|
00000d10  54 4f 50 20 53 43 4f 52  45 53 22 27 27 0d 06 ea  |TOP SCORES"''...|
00000d20  29 e3 5a 3d 30 b8 39 3a  e7 20 53 48 4f 54 3c 53  |).Z=0.9:. SHOT<S|
00000d30  63 6f 72 65 28 5a 29 20  8c 20 f2 73 68 75 66 66  |core(Z) . .shuff|
00000d40  6c 65 3a 5a 3d 39 0d 06  f4 08 ed 3a fb 33 0d 06  |le:Z=9.....:.3..|
00000d50  fe 2b e3 20 5a 3d 30 b8  39 3a f1 8a 36 29 4e 61  |.+. Z=0.9:..6)Na|
00000d60  6d 65 24 28 5a 29 3b 8a  33 30 29 53 63 6f 72 65  |me$(Z);.30)Score|
00000d70  28 5a 29 27 3a ed 3a fb  31 0d 07 08 11 51 3d ae  |(Z)':.:.1....Q=.|
00000d80  28 22 53 43 4f 52 45 53  22 29 0d 07 12 29 e3 20  |("SCORES")...). |
00000d90  5a 3d 30 20 b8 20 39 3a  f1 23 51 2c 53 63 6f 72  |Z=0 . 9:.#Q,Scor|
00000da0  65 28 5a 29 2c 4e 61 6d  65 24 28 5a 29 3a ed 3a  |e(Z),Name$(Z):.:|
00000db0  d9 23 51 0d 07 1c 05 e1  0d 07 26 0d dd f2 73 68  |.#Q.......&...sh|
00000dc0  75 66 66 6c 65 0d 07 30  14 e3 20 4c 3d 39 20 b8  |uffle..0.. L=9 .|
00000dd0  20 5a 2b 31 20 88 20 2d  31 0d 07 3a 2b 53 63 6f  | Z+1 . -1..:+Sco|
00000de0  72 65 28 4c 29 3d 53 63  6f 72 65 28 4c 2d 31 29  |re(L)=Score(L-1)|
00000df0  3a 4e 61 6d 65 24 28 4c  29 3d 4e 61 6d 65 24 28  |:Name$(L)=Name$(|
00000e00  4c 2d 31 29 0d 07 44 22  ed 3a 53 63 6f 72 65 28  |L-1)..D".:Score(|
00000e10  5a 29 3d 53 48 4f 54 3a  4e 61 6d 65 24 28 5a 29  |Z)=SHOT:Name$(Z)|
00000e20  3d 4e 41 4d 45 24 0d 07  4e 05 e1 0d ff           |=NAME$..N....|
00000e2d
26-08-88/SHIPS.m0
26-08-88/SHIPS.m1
26-08-88/SHIPS.m2
26-08-88/SHIPS.m4
26-08-88/SHIPS.m5