Home » CEEFAX disks » telesoftware2.adl » 26_09_87/SOL2

26_09_87/SOL2

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 » telesoftware2.adl
Filename: 26_09_87/SOL2
Read OK:
File size: 0D96 bytes
Load address: 1900
Exec address: 8023
Duplicates

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

File contents
   10 REM"�Solitair version 3�"
   20 REM"�ROB ANDERSON 1986�"
   30:
   40 ONERRORRUN
   50:
   60 CLEAR:MODE1:PROCinitial
   70 PROCplay
   80 END
   90:
  100 DEFPROCinitial
  110 *FX11,5
  120 shpos=8:svpos=7:dhpos=8:dvpos=7:flag=0
  130 VDU5:FORA=0TO4:VDU19,A,0;0;:NEXT
  140 MOVE400,700:FORA=1TO3:VDU10;10:FORB=1TO7:GCOL3,3:PROChole(128):VDU8;8;11:GCOL3,2:PROChole(132):VDU11:NEXT:FORC=1TO14:VDU8:NEXT,:FORA=1TO8:VDU11:NEXT
  150 VDU9;9;9;9:FORS=1TO2:FORB=0TO1:FORA=1TO3:GCOL3,3:PROChole(128):VDU8;8;11:GCOL3,2:PROChole(132):VDU11:NEXT:VDU10;10:FORN=1TO6:VDU8:NEXT,:VDU10;10;10;10;10;10:NEXT:VDU20:FORM=1TO14:VDU11:NEXT
  160 VDU9;9:GCOL3,2:PROChole(132):GCOL0,3:RESTORE1010:J=-1:MOVE70,1000:FORB=1TO5:READA$:FORA=1TO27:J=J+1:IFJ=3VDU9:J=0
  170 IFMID$(A$,A,1)="1"GCOL0,2:VDU148:GCOL0,1:VDU8;149:ELSEVDU9
  180 NEXT:MOVE38,1000-B*32:NEXT:VDU4;17,3
  190 VDU4:COLOUR2:PRINTTAB(4,11)"^ \"TAB(4,13)"[ _"TAB(31,11);CHR$136;" ";CHR$137;TAB(31,13);CHR$138;" ";CHR$139;
  200 COLOUR3:PRINTTAB(0,15)"To move"'"destination"'"peg."TAB(28,15)"To move";TAB(28,16);"source";TAB(28,17);"peg."
  210 COLOUR1:PRINTTAB(4,19);CHR$144;CHR$145'TAB(4);CHR$146;CHR$147
  220 COLOUR2:PRINTTAB(31,19);CHR$140;CHR$141'TAB(31,20);CHR$142;CHR$143
  230 VDU28,0,31,39,24
  240 COLOUR2:PRINTTAB(10,2)"DELETE "TAB(10,4)"RETURN"
  250 COLOUR3:PRINTTAB(18,2);"- Give up."TAB(18,4);"- Enter move."
  260 ENDPROC
  270:
  280 DEFPROCplay
  290 VDU5:PROCprint(144):PROCprint1(140)
  300 DIMP(6,6):FORA=0TO6:FORB=2TO4:P(B,A)=1:P(A,B)=1:NEXT,:P(3,3)=0:TT=0
  310 REPEAT:*FX15,0
  320 IFINKEY(-90)=-1PROCgiveup
  330 E=dhpos:F=dvpos:PROCcheckkey(-25,-121,-57,-41):IFflag=2PROCprint(144)
  340 dhpos=E:dvpos=F:IFflag=1PROCprint(144)
  350 E=shpos:F=svpos:PROCcheckkey(-26,-122,-58,-42):IFflag=2PROCprint1(140)
  360 shpos=E:svpos=F:IFflag=1PROCprint1(140)
  370 UNTILINKEY(1)=13:IF shpos=dhpos AND(svpos+4=dvpos OR svpos-4=dvpos)GOTO400
  380 IF svpos=dvpos AND(shpos+4=dhpos OR shpos-4=dhpos)GOTO400
  390 GOTO310
  400 Q=(shpos/2)-1:R=((svpos-1)/2):IF P(Q,R)<>1 GOTO310
  410 S=(dhpos/2)-1:T=((dvpos-1)/2):IF P(S,T)<>0 GOTO310
  420 IF Q=0GOTO450
  430 IFQ=S+2ANDP(Q-1,R)=1 P(Q-1,R)=0:GOTO510
  440 IF Q=6GOTO470
  450 IFQ=S-2ANDP(Q+1,R)=1 P(Q+1,R)=0:GOTO510
  460 IF R=6GOTO490
  470 IFR=T-2ANDP(Q,R+1)=1 P(Q,R+1)=0:GOTO510
  480 IF R=6GOTO510
  490 IFR=T+2ANDP(Q,R-1)=1 P(Q,R-1)=0:GOTO510
  500 GOTO310
  510 IFQ=S+2 shpos=shpos-2:PROCprint1(132):shpos=shpos+2
  520 IFQ=S-2 shpos=shpos+2:PROCprint1(132):shpos=shpos-2
  530 IFR=T-2 svpos=svpos+2:PROCprint1(132):svpos=svpos-2
  540 IFR=T+2 svpos=svpos-2:PROCprint1(132):svpos=svpos+2
  550 SOUND3,-15,200,5:P(Q,R)=0:P(S,T)=1:GCOL3,2:PROCprint1(132):GCOL3,2:PROCprint(132)
  560 TT=TT+1:IFTT=31ANDP(3,3)=1PROCwin ELSEIFTT=31PROCfinish
  570 GOTO310
  580 ENDPROC
  590:
  600 DEFPROCprint(CHR)
  610 MOVE370,798:FORA=2TOdhpos:VDU9:NEXT:FORA=2TOdvpos+1:VDU10:NEXT:GCOL3,2:PROChole(CHR):flag=flag-1:SOUND2,-15,20,1
  620 ENDPROC
  630:
  640 DEFPROCprint1(CH)
  650 MOVE370,798:FORA=2TOshpos:VDU9:NEXT:FORA=2TOsvpos+1:VDU10:NEXT:GCOL3,2:PROChole(CH):flag=flag-1:SOUND1,-15,120,1
  660 ENDPROC
  670:
  680 DEFPROCcheckkey(A,B,C,D)
  690 G=INKEY(A):IF(G=-1AND E>2AND F>4AND F<10)OR(G=-1AND E>6)E=E-2:flag=2
  700 G=INKEY(B):IF(G=-1AND E<14AND F>4AND F<10)OR(G=-1AND E<10)E=E+2:flag=2
  710 G=INKEY(C):IF(G=-1AND F>2AND E>4AND E<12)OR(G=-1AND F>6)F=F-2:flag=2
  720 G=INKEY(D):IF(G=-1AND F<12AND E>4AND E<12)OR(G=-1AND F<8)F=F+2:flag=2
  730 ENDPROC
  740:
  750 DEFPROCwin
  760 COLOUR3:CLS:VDU4:PRINTTAB(14,2)"CONGRATULATIONS":PROCescape
  770 REPEAT:FORA=0TO16:VDU19,0,A;0;0;:NEXT:UNTILFALSE
  780 ENDPROC
  790:
  800 DEFPROCfinish
  810 VDU4;12;17,3:PRINTTAB(0,1)"Tough luck! , the last peg has got to go"'TAB(12)"in the middle.":PROCescape
  820 ENDPROC
  830:
  840 DEFPROCgiveup
  850 VDU4;12;17,3:PRINTTAB(5,2)"You managed to clear ";TT;" peg";:IFTT=1PRINT"."ELSEPRINT"s."
  860 PROCescape
  870 ENDPROC
  880:
  890 DEFPROCescape
  900 PRINTTAB(7,6)"Press        to continue":COLOUR1:PRINTTAB(13,6);"ESCAPE"
  910 ENDPROC
  920:
  930 DEFPROCd(A$,K,L)
  940 A%=&A:X%=0:Y%=&A:D=&A00:FORN=1TOLEN(A$):B$=MID$(A$,N,1):?D=ASC(B$):CALL(&FFF1):VDU23,128,D?1,D?1,D?2,D?2,D?3,D?3,D?4,D?4;23,129,D?5,D?5,D?6,D?6,D?7,D?7,D?8,D?8:PRINTTAB(K+N,L);CHR$(128);TAB(K+N,L+1);CHR$129:NEXT
  950 ENDPROC
  960:
  970 DEFPROChole(Z)
  980 PRINTCHR$(Z);CHR$(Z+1);:VDU10;8;8:PRINTCHR$(Z+2);CHR$(Z+3);
  990 ENDPROC
 1000:
 1010 DATA111010100111111010111111111,100101100010010101010101100,111101100010010111010110111,001101100010010101010101100,111010111111010101111101111

 �"�Solitair version 3�"
 �"�ROB ANDERSON 1986�"
:
( �
2:
< �:�1:�initial
F
 �play
P �
Z:
d ��initial
n *FX11,5
x+ shpos=8:svpos=7:dhpos=8:dvpos=7:flag=0
� �5:�A=0�4:�19,A,0;0;:�
�k �400,700:�A=1�3:�10;10:�B=1�7:�3,3:�hole(128):�8;8;11:�3,2:�hole(132):�11:�:�C=1�14:�8:�,:�A=1�8:�11:�
�� �9;9;9;9:�S=1�2:�B=0�1:�A=1�3:�3,3:�hole(128):�8;8;11:�3,2:�hole(132):�11:�:�10;10:�N=1�6:�8:�,:�10;10;10;10;10;10:�:�20:�M=1�14:�11:�
�V �9;9:�3,2:�hole(132):�0,3:��drC:J=-1:�70,1000:�B=1�5:�A$:�A=1�27:J=J+1:�J=3�9:J=0
�+ �A$,A,1)="1"�0,2:�148:�0,1:�8;149:��9
� �:�38,1000-B*32:�:�4;17,3
�N �4:�2:�4,11)"^ \"�4,13)"[ _"�31,11);�136;" ";�137;�31,13);�138;" ";�139;
�] �3:�0,15)"To move"'"destination"'"peg."�28,15)"To move";�28,16);"source";�28,17);"peg."
�' �1:�4,19);�144;�145'�4);�146;�147
�, �2:�31,19);�140;�141'�31,20);�142;�143
� �28,0,31,39,24
�& �2:�10,2)"DELETE "�10,4)"RETURN"
�2 �3:�18,2);"- Give up."�18,4);"- Enter move."
 �
:
 ��play
"  �5:�print(144):�print1(140)
,= �P(6,6):�A=0�6:�B=2�4:P(B,A)=1:P(A,B)=1:�,:P(3,3)=0:TT=0
6 �:*FX15,0
@ �(-90)=-1�giveup
JC E=dhpos:F=dvpos:�checkkey(-25,-121,-57,-41):�flag=2�print(144)
T' dhpos=E:dvpos=F:�flag=1�print(144)
^D E=shpos:F=svpos:�checkkey(-26,-122,-58,-42):�flag=2�print1(140)
h( shpos=E:svpos=F:�flag=1�print1(140)
rA ��(1)=13:� shpos=dhpos �(svpos+4=dvpos � svpos-4=dvpos)�tPA
|8 � svpos=dvpos �(shpos+4=dhpos � shpos-4=dhpos)�tPA
�
 �TvA
�4 Q=(shpos/2)-1:R=((svpos-1)/2):� P(Q,R)<>1 �TvA
�4 S=(dhpos/2)-1:T=((dvpos-1)/2):� P(S,T)<>0 �TvA
� � Q=0�dBA
�' �Q=S+2�P(Q-1,R)=1 P(Q-1,R)=0:�d~A
� � Q=6�dVA
�' �Q=S-2�P(Q+1,R)=1 P(Q+1,R)=0:�d~A
� � R=6�djA
�' �R=T-2�P(Q,R+1)=1 P(Q,R+1)=0:�d~A
� � R=6�d~A
�' �R=T+2�P(Q,R-1)=1 P(Q,R-1)=0:�d~A
�
 �TvA
�4 �Q=S+2 shpos=shpos-2:�print1(132):shpos=shpos+2
4 �Q=S-2 shpos=shpos+2:�print1(132):shpos=shpos-2
4 �R=T-2 svpos=svpos+2:�print1(132):svpos=svpos-2
4 �R=T+2 svpos=svpos-2:�print1(132):svpos=svpos+2
&F �3,-15,200,5:P(Q,R)=0:P(S,T)=1:�3,2:�print1(132):�3,2:�print(132)
0/ TT=TT+1:�TT=31�P(3,3)=1�win ��TT=31�finish
:
 �TvA
D �
N:
X ��print(CHR)
bX �370,798:�A=2�dhpos:�9:�:�A=2�dvpos+1:�10:�:�3,2:�hole(CHR):flag=flag-1:�2,-15,20,1
l �
v:
� ��print1(CH)
�X �370,798:�A=2�shpos:�9:�:�A=2�svpos+1:�10:�:�3,2:�hole(CH):flag=flag-1:�1,-15,120,1
� �
�:
� ��checkkey(A,B,C,D)
�; G=�(A):�(G=-1� E>2� F>4� F<10)�(G=-1� E>6)E=E-2:flag=2
�= G=�(B):�(G=-1� E<14� F>4� F<10)�(G=-1� E<10)E=E+2:flag=2
�; G=�(C):�(G=-1� F>2� E>4� E<12)�(G=-1� F>6)F=F-2:flag=2
�< G=�(D):�(G=-1� F<12� E>4� E<12)�(G=-1� F<8)F=F+2:flag=2
� �
�:
�
 ��win
�- �3:�:�4:�14,2)"CONGRATULATIONS":�escape
  �:�A=0�16:�19,0,A;0;0;:�:��
 �
:
 
 ��finish
*] �4;12;17,3:�0,1)"Tough luck! , the last peg has got to go"'�12)"in the middle.":�escape
4 �
>:
H
 ��giveup
RH �4;12;17,3:�5,2)"You managed to clear ";TT;" peg";:�TT=1�"."��"s."
\ �escape
f �
p:
z
 ��escape
�9 �7,6)"Press        to continue":�1:�13,6);"ESCAPE"
� �
�:
� ��d(A$,K,L)
�� A%=&A:X%=0:Y%=&A:D=&A00:�N=1��(A$):B$=�A$,N,1):?D=�(B$):�(&FFF1):�23,128,D?1,D?1,D?2,D?2,D?3,D?3,D?4,D?4;23,129,D?5,D?5,D?6,D?6,D?7,D?7,D?8,D?8:�K+N,L);�(128);�K+N,L+1);�129:�
� �
�:
� ��hole(Z)
�* �(Z);�(Z+1);:�10;8;8:�(Z+2);�(Z+3);
� �
�:
� �111010100111111010111111111,100101100010010101010101100,111101100010010111010110111,001101100010010101010101100,111010111111010101111101111
�
00000000  0d 00 0a 1c 20 f4 22 81  53 6f 6c 69 74 61 69 72  |.... .".Solitair|
00000010  20 76 65 72 73 69 6f 6e  20 33 87 22 0d 00 14 1b  | version 3."....|
00000020  20 f4 22 82 52 4f 42 20  41 4e 44 45 52 53 4f 4e  | .".ROB ANDERSON|
00000030  20 31 39 38 36 87 22 0d  00 1e 05 3a 0d 00 28 08  | 1986."....:..(.|
00000040  20 ee 85 f9 0d 00 32 05  3a 0d 00 3c 12 20 d8 3a  | .....2.:..<. .:|
00000050  eb 31 3a f2 69 6e 69 74  69 61 6c 0d 00 46 0a 20  |.1:.initial..F. |
00000060  f2 70 6c 61 79 0d 00 50  06 20 e0 0d 00 5a 05 3a  |.play..P. ...Z.:|
00000070  0d 00 64 0e 20 dd f2 69  6e 69 74 69 61 6c 0d 00  |..d. ..initial..|
00000080  6e 0c 20 2a 46 58 31 31  2c 35 0d 00 78 2b 20 73  |n. *FX11,5..x+ s|
00000090  68 70 6f 73 3d 38 3a 73  76 70 6f 73 3d 37 3a 64  |hpos=8:svpos=7:d|
000000a0  68 70 6f 73 3d 38 3a 64  76 70 6f 73 3d 37 3a 66  |hpos=8:dvpos=7:f|
000000b0  6c 61 67 3d 30 0d 00 82  1b 20 ef 35 3a e3 41 3d  |lag=0.... .5:.A=|
000000c0  30 b8 34 3a ef 31 39 2c  41 2c 30 3b 30 3b 3a ed  |0.4:.19,A,0;0;:.|
000000d0  0d 00 8c 6b 20 ec 34 30  30 2c 37 30 30 3a e3 41  |...k .400,700:.A|
000000e0  3d 31 b8 33 3a ef 31 30  3b 31 30 3a e3 42 3d 31  |=1.3:.10;10:.B=1|
000000f0  b8 37 3a e6 33 2c 33 3a  f2 68 6f 6c 65 28 31 32  |.7:.3,3:.hole(12|
00000100  38 29 3a ef 38 3b 38 3b  31 31 3a e6 33 2c 32 3a  |8):.8;8;11:.3,2:|
00000110  f2 68 6f 6c 65 28 31 33  32 29 3a ef 31 31 3a ed  |.hole(132):.11:.|
00000120  3a e3 43 3d 31 b8 31 34  3a ef 38 3a ed 2c 3a e3  |:.C=1.14:.8:.,:.|
00000130  41 3d 31 b8 38 3a ef 31  31 3a ed 0d 00 96 8b 20  |A=1.8:.11:..... |
00000140  ef 39 3b 39 3b 39 3b 39  3a e3 53 3d 31 b8 32 3a  |.9;9;9;9:.S=1.2:|
00000150  e3 42 3d 30 b8 31 3a e3  41 3d 31 b8 33 3a e6 33  |.B=0.1:.A=1.3:.3|
00000160  2c 33 3a f2 68 6f 6c 65  28 31 32 38 29 3a ef 38  |,3:.hole(128):.8|
00000170  3b 38 3b 31 31 3a e6 33  2c 32 3a f2 68 6f 6c 65  |;8;11:.3,2:.hole|
00000180  28 31 33 32 29 3a ef 31  31 3a ed 3a ef 31 30 3b  |(132):.11:.:.10;|
00000190  31 30 3a e3 4e 3d 31 b8  36 3a ef 38 3a ed 2c 3a  |10:.N=1.6:.8:.,:|
000001a0  ef 31 30 3b 31 30 3b 31  30 3b 31 30 3b 31 30 3b  |.10;10;10;10;10;|
000001b0  31 30 3a ed 3a ef 32 30  3a e3 4d 3d 31 b8 31 34  |10:.:.20:.M=1.14|
000001c0  3a ef 31 31 3a ed 0d 00  a0 56 20 ef 39 3b 39 3a  |:.11:....V .9;9:|
000001d0  e6 33 2c 32 3a f2 68 6f  6c 65 28 31 33 32 29 3a  |.3,2:.hole(132):|
000001e0  e6 30 2c 33 3a f7 8d 64  72 43 3a 4a 3d 2d 31 3a  |.0,3:..drC:J=-1:|
000001f0  ec 37 30 2c 31 30 30 30  3a e3 42 3d 31 b8 35 3a  |.70,1000:.B=1.5:|
00000200  f3 41 24 3a e3 41 3d 31  b8 32 37 3a 4a 3d 4a 2b  |.A$:.A=1.27:J=J+|
00000210  31 3a e7 4a 3d 33 ef 39  3a 4a 3d 30 0d 00 aa 2b  |1:.J=3.9:J=0...+|
00000220  20 e7 c1 41 24 2c 41 2c  31 29 3d 22 31 22 e6 30  | ..A$,A,1)="1".0|
00000230  2c 32 3a ef 31 34 38 3a  e6 30 2c 31 3a ef 38 3b  |,2:.148:.0,1:.8;|
00000240  31 34 39 3a 8b ef 39 0d  00 b4 1e 20 ed 3a ec 33  |149:..9.... .:.3|
00000250  38 2c 31 30 30 30 2d 42  2a 33 32 3a ed 3a ef 34  |8,1000-B*32:.:.4|
00000260  3b 31 37 2c 33 0d 00 be  4e 20 ef 34 3a fb 32 3a  |;17,3...N .4:.2:|
00000270  f1 8a 34 2c 31 31 29 22  5e 20 5c 22 8a 34 2c 31  |..4,11)"^ \".4,1|
00000280  33 29 22 5b 20 5f 22 8a  33 31 2c 31 31 29 3b bd  |3)"[ _".31,11);.|
00000290  31 33 36 3b 22 20 22 3b  bd 31 33 37 3b 8a 33 31  |136;" ";.137;.31|
000002a0  2c 31 33 29 3b bd 31 33  38 3b 22 20 22 3b bd 31  |,13);.138;" ";.1|
000002b0  33 39 3b 0d 00 c8 5d 20  fb 33 3a f1 8a 30 2c 31  |39;...] .3:..0,1|
000002c0  35 29 22 54 6f 20 6d 6f  76 65 22 27 22 64 65 73  |5)"To move"'"des|
000002d0  74 69 6e 61 74 69 6f 6e  22 27 22 70 65 67 2e 22  |tination"'"peg."|
000002e0  8a 32 38 2c 31 35 29 22  54 6f 20 6d 6f 76 65 22  |.28,15)"To move"|
000002f0  3b 8a 32 38 2c 31 36 29  3b 22 73 6f 75 72 63 65  |;.28,16);"source|
00000300  22 3b 8a 32 38 2c 31 37  29 3b 22 70 65 67 2e 22  |";.28,17);"peg."|
00000310  0d 00 d2 27 20 fb 31 3a  f1 8a 34 2c 31 39 29 3b  |...' .1:..4,19);|
00000320  bd 31 34 34 3b bd 31 34  35 27 8a 34 29 3b bd 31  |.144;.145'.4);.1|
00000330  34 36 3b bd 31 34 37 0d  00 dc 2c 20 fb 32 3a f1  |46;.147..., .2:.|
00000340  8a 33 31 2c 31 39 29 3b  bd 31 34 30 3b bd 31 34  |.31,19);.140;.14|
00000350  31 27 8a 33 31 2c 32 30  29 3b bd 31 34 32 3b bd  |1'.31,20);.142;.|
00000360  31 34 33 0d 00 e6 13 20  ef 32 38 2c 30 2c 33 31  |143.... .28,0,31|
00000370  2c 33 39 2c 32 34 0d 00  f0 26 20 fb 32 3a f1 8a  |,39,24...& .2:..|
00000380  31 30 2c 32 29 22 44 45  4c 45 54 45 20 22 8a 31  |10,2)"DELETE ".1|
00000390  30 2c 34 29 22 52 45 54  55 52 4e 22 0d 00 fa 32  |0,4)"RETURN"...2|
000003a0  20 fb 33 3a f1 8a 31 38  2c 32 29 3b 22 2d 20 47  | .3:..18,2);"- G|
000003b0  69 76 65 20 75 70 2e 22  8a 31 38 2c 34 29 3b 22  |ive up.".18,4);"|
000003c0  2d 20 45 6e 74 65 72 20  6d 6f 76 65 2e 22 0d 01  |- Enter move."..|
000003d0  04 06 20 e1 0d 01 0e 05  3a 0d 01 18 0b 20 dd f2  |.. .....:.... ..|
000003e0  70 6c 61 79 0d 01 22 20  20 ef 35 3a f2 70 72 69  |play.."  .5:.pri|
000003f0  6e 74 28 31 34 34 29 3a  f2 70 72 69 6e 74 31 28  |nt(144):.print1(|
00000400  31 34 30 29 0d 01 2c 3d  20 de 50 28 36 2c 36 29  |140)..,= .P(6,6)|
00000410  3a e3 41 3d 30 b8 36 3a  e3 42 3d 32 b8 34 3a 50  |:.A=0.6:.B=2.4:P|
00000420  28 42 2c 41 29 3d 31 3a  50 28 41 2c 42 29 3d 31  |(B,A)=1:P(A,B)=1|
00000430  3a ed 2c 3a 50 28 33 2c  33 29 3d 30 3a 54 54 3d  |:.,:P(3,3)=0:TT=|
00000440  30 0d 01 36 0e 20 f5 3a  2a 46 58 31 35 2c 30 0d  |0..6. .:*FX15,0.|
00000450  01 40 16 20 e7 a6 28 2d  39 30 29 3d 2d 31 f2 67  |.@. ..(-90)=-1.g|
00000460  69 76 65 75 70 0d 01 4a  43 20 45 3d 64 68 70 6f  |iveup..JC E=dhpo|
00000470  73 3a 46 3d 64 76 70 6f  73 3a f2 63 68 65 63 6b  |s:F=dvpos:.check|
00000480  6b 65 79 28 2d 32 35 2c  2d 31 32 31 2c 2d 35 37  |key(-25,-121,-57|
00000490  2c 2d 34 31 29 3a e7 66  6c 61 67 3d 32 f2 70 72  |,-41):.flag=2.pr|
000004a0  69 6e 74 28 31 34 34 29  0d 01 54 27 20 64 68 70  |int(144)..T' dhp|
000004b0  6f 73 3d 45 3a 64 76 70  6f 73 3d 46 3a e7 66 6c  |os=E:dvpos=F:.fl|
000004c0  61 67 3d 31 f2 70 72 69  6e 74 28 31 34 34 29 0d  |ag=1.print(144).|
000004d0  01 5e 44 20 45 3d 73 68  70 6f 73 3a 46 3d 73 76  |.^D E=shpos:F=sv|
000004e0  70 6f 73 3a f2 63 68 65  63 6b 6b 65 79 28 2d 32  |pos:.checkkey(-2|
000004f0  36 2c 2d 31 32 32 2c 2d  35 38 2c 2d 34 32 29 3a  |6,-122,-58,-42):|
00000500  e7 66 6c 61 67 3d 32 f2  70 72 69 6e 74 31 28 31  |.flag=2.print1(1|
00000510  34 30 29 0d 01 68 28 20  73 68 70 6f 73 3d 45 3a  |40)..h( shpos=E:|
00000520  73 76 70 6f 73 3d 46 3a  e7 66 6c 61 67 3d 31 f2  |svpos=F:.flag=1.|
00000530  70 72 69 6e 74 31 28 31  34 30 29 0d 01 72 41 20  |print1(140)..rA |
00000540  fd a6 28 31 29 3d 31 33  3a e7 20 73 68 70 6f 73  |..(1)=13:. shpos|
00000550  3d 64 68 70 6f 73 20 80  28 73 76 70 6f 73 2b 34  |=dhpos .(svpos+4|
00000560  3d 64 76 70 6f 73 20 84  20 73 76 70 6f 73 2d 34  |=dvpos . svpos-4|
00000570  3d 64 76 70 6f 73 29 e5  8d 74 50 41 0d 01 7c 38  |=dvpos)..tPA..|8|
00000580  20 e7 20 73 76 70 6f 73  3d 64 76 70 6f 73 20 80  | . svpos=dvpos .|
00000590  28 73 68 70 6f 73 2b 34  3d 64 68 70 6f 73 20 84  |(shpos+4=dhpos .|
000005a0  20 73 68 70 6f 73 2d 34  3d 64 68 70 6f 73 29 e5  | shpos-4=dhpos).|
000005b0  8d 74 50 41 0d 01 86 0a  20 e5 8d 54 76 41 0d 01  |.tPA.... ..TvA..|
000005c0  90 34 20 51 3d 28 73 68  70 6f 73 2f 32 29 2d 31  |.4 Q=(shpos/2)-1|
000005d0  3a 52 3d 28 28 73 76 70  6f 73 2d 31 29 2f 32 29  |:R=((svpos-1)/2)|
000005e0  3a e7 20 50 28 51 2c 52  29 3c 3e 31 20 e5 8d 54  |:. P(Q,R)<>1 ..T|
000005f0  76 41 0d 01 9a 34 20 53  3d 28 64 68 70 6f 73 2f  |vA...4 S=(dhpos/|
00000600  32 29 2d 31 3a 54 3d 28  28 64 76 70 6f 73 2d 31  |2)-1:T=((dvpos-1|
00000610  29 2f 32 29 3a e7 20 50  28 53 2c 54 29 3c 3e 30  |)/2):. P(S,T)<>0|
00000620  20 e5 8d 54 76 41 0d 01  a4 0f 20 e7 20 51 3d 30  | ..TvA.... . Q=0|
00000630  e5 8d 64 42 41 0d 01 ae  27 20 e7 51 3d 53 2b 32  |..dBA...' .Q=S+2|
00000640  80 50 28 51 2d 31 2c 52  29 3d 31 20 50 28 51 2d  |.P(Q-1,R)=1 P(Q-|
00000650  31 2c 52 29 3d 30 3a e5  8d 64 7e 41 0d 01 b8 0f  |1,R)=0:..d~A....|
00000660  20 e7 20 51 3d 36 e5 8d  64 56 41 0d 01 c2 27 20  | . Q=6..dVA...' |
00000670  e7 51 3d 53 2d 32 80 50  28 51 2b 31 2c 52 29 3d  |.Q=S-2.P(Q+1,R)=|
00000680  31 20 50 28 51 2b 31 2c  52 29 3d 30 3a e5 8d 64  |1 P(Q+1,R)=0:..d|
00000690  7e 41 0d 01 cc 0f 20 e7  20 52 3d 36 e5 8d 64 6a  |~A.... . R=6..dj|
000006a0  41 0d 01 d6 27 20 e7 52  3d 54 2d 32 80 50 28 51  |A...' .R=T-2.P(Q|
000006b0  2c 52 2b 31 29 3d 31 20  50 28 51 2c 52 2b 31 29  |,R+1)=1 P(Q,R+1)|
000006c0  3d 30 3a e5 8d 64 7e 41  0d 01 e0 0f 20 e7 20 52  |=0:..d~A.... . R|
000006d0  3d 36 e5 8d 64 7e 41 0d  01 ea 27 20 e7 52 3d 54  |=6..d~A...' .R=T|
000006e0  2b 32 80 50 28 51 2c 52  2d 31 29 3d 31 20 50 28  |+2.P(Q,R-1)=1 P(|
000006f0  51 2c 52 2d 31 29 3d 30  3a e5 8d 64 7e 41 0d 01  |Q,R-1)=0:..d~A..|
00000700  f4 0a 20 e5 8d 54 76 41  0d 01 fe 34 20 e7 51 3d  |.. ..TvA...4 .Q=|
00000710  53 2b 32 20 73 68 70 6f  73 3d 73 68 70 6f 73 2d  |S+2 shpos=shpos-|
00000720  32 3a f2 70 72 69 6e 74  31 28 31 33 32 29 3a 73  |2:.print1(132):s|
00000730  68 70 6f 73 3d 73 68 70  6f 73 2b 32 0d 02 08 34  |hpos=shpos+2...4|
00000740  20 e7 51 3d 53 2d 32 20  73 68 70 6f 73 3d 73 68  | .Q=S-2 shpos=sh|
00000750  70 6f 73 2b 32 3a f2 70  72 69 6e 74 31 28 31 33  |pos+2:.print1(13|
00000760  32 29 3a 73 68 70 6f 73  3d 73 68 70 6f 73 2d 32  |2):shpos=shpos-2|
00000770  0d 02 12 34 20 e7 52 3d  54 2d 32 20 73 76 70 6f  |...4 .R=T-2 svpo|
00000780  73 3d 73 76 70 6f 73 2b  32 3a f2 70 72 69 6e 74  |s=svpos+2:.print|
00000790  31 28 31 33 32 29 3a 73  76 70 6f 73 3d 73 76 70  |1(132):svpos=svp|
000007a0  6f 73 2d 32 0d 02 1c 34  20 e7 52 3d 54 2b 32 20  |os-2...4 .R=T+2 |
000007b0  73 76 70 6f 73 3d 73 76  70 6f 73 2d 32 3a f2 70  |svpos=svpos-2:.p|
000007c0  72 69 6e 74 31 28 31 33  32 29 3a 73 76 70 6f 73  |rint1(132):svpos|
000007d0  3d 73 76 70 6f 73 2b 32  0d 02 26 46 20 d4 33 2c  |=svpos+2..&F .3,|
000007e0  2d 31 35 2c 32 30 30 2c  35 3a 50 28 51 2c 52 29  |-15,200,5:P(Q,R)|
000007f0  3d 30 3a 50 28 53 2c 54  29 3d 31 3a e6 33 2c 32  |=0:P(S,T)=1:.3,2|
00000800  3a f2 70 72 69 6e 74 31  28 31 33 32 29 3a e6 33  |:.print1(132):.3|
00000810  2c 32 3a f2 70 72 69 6e  74 28 31 33 32 29 0d 02  |,2:.print(132)..|
00000820  30 2f 20 54 54 3d 54 54  2b 31 3a e7 54 54 3d 33  |0/ TT=TT+1:.TT=3|
00000830  31 80 50 28 33 2c 33 29  3d 31 f2 77 69 6e 20 8b  |1.P(3,3)=1.win .|
00000840  e7 54 54 3d 33 31 f2 66  69 6e 69 73 68 0d 02 3a  |.TT=31.finish..:|
00000850  0a 20 e5 8d 54 76 41 0d  02 44 06 20 e1 0d 02 4e  |. ..TvA..D. ...N|
00000860  05 3a 0d 02 58 11 20 dd  f2 70 72 69 6e 74 28 43  |.:..X. ..print(C|
00000870  48 52 29 0d 02 62 58 20  ec 33 37 30 2c 37 39 38  |HR)..bX .370,798|
00000880  3a e3 41 3d 32 b8 64 68  70 6f 73 3a ef 39 3a ed  |:.A=2.dhpos:.9:.|
00000890  3a e3 41 3d 32 b8 64 76  70 6f 73 2b 31 3a ef 31  |:.A=2.dvpos+1:.1|
000008a0  30 3a ed 3a e6 33 2c 32  3a f2 68 6f 6c 65 28 43  |0:.:.3,2:.hole(C|
000008b0  48 52 29 3a 66 6c 61 67  3d 66 6c 61 67 2d 31 3a  |HR):flag=flag-1:|
000008c0  d4 32 2c 2d 31 35 2c 32  30 2c 31 0d 02 6c 06 20  |.2,-15,20,1..l. |
000008d0  e1 0d 02 76 05 3a 0d 02  80 11 20 dd f2 70 72 69  |...v.:.... ..pri|
000008e0  6e 74 31 28 43 48 29 0d  02 8a 58 20 ec 33 37 30  |nt1(CH)...X .370|
000008f0  2c 37 39 38 3a e3 41 3d  32 b8 73 68 70 6f 73 3a  |,798:.A=2.shpos:|
00000900  ef 39 3a ed 3a e3 41 3d  32 b8 73 76 70 6f 73 2b  |.9:.:.A=2.svpos+|
00000910  31 3a ef 31 30 3a ed 3a  e6 33 2c 32 3a f2 68 6f  |1:.10:.:.3,2:.ho|
00000920  6c 65 28 43 48 29 3a 66  6c 61 67 3d 66 6c 61 67  |le(CH):flag=flag|
00000930  2d 31 3a d4 31 2c 2d 31  35 2c 31 32 30 2c 31 0d  |-1:.1,-15,120,1.|
00000940  02 94 06 20 e1 0d 02 9e  05 3a 0d 02 a8 18 20 dd  |... .....:.... .|
00000950  f2 63 68 65 63 6b 6b 65  79 28 41 2c 42 2c 43 2c  |.checkkey(A,B,C,|
00000960  44 29 0d 02 b2 3b 20 47  3d a6 28 41 29 3a e7 28  |D)...; G=.(A):.(|
00000970  47 3d 2d 31 80 20 45 3e  32 80 20 46 3e 34 80 20  |G=-1. E>2. F>4. |
00000980  46 3c 31 30 29 84 28 47  3d 2d 31 80 20 45 3e 36  |F<10).(G=-1. E>6|
00000990  29 45 3d 45 2d 32 3a 66  6c 61 67 3d 32 0d 02 bc  |)E=E-2:flag=2...|
000009a0  3d 20 47 3d a6 28 42 29  3a e7 28 47 3d 2d 31 80  |= G=.(B):.(G=-1.|
000009b0  20 45 3c 31 34 80 20 46  3e 34 80 20 46 3c 31 30  | E<14. F>4. F<10|
000009c0  29 84 28 47 3d 2d 31 80  20 45 3c 31 30 29 45 3d  |).(G=-1. E<10)E=|
000009d0  45 2b 32 3a 66 6c 61 67  3d 32 0d 02 c6 3b 20 47  |E+2:flag=2...; G|
000009e0  3d a6 28 43 29 3a e7 28  47 3d 2d 31 80 20 46 3e  |=.(C):.(G=-1. F>|
000009f0  32 80 20 45 3e 34 80 20  45 3c 31 32 29 84 28 47  |2. E>4. E<12).(G|
00000a00  3d 2d 31 80 20 46 3e 36  29 46 3d 46 2d 32 3a 66  |=-1. F>6)F=F-2:f|
00000a10  6c 61 67 3d 32 0d 02 d0  3c 20 47 3d a6 28 44 29  |lag=2...< G=.(D)|
00000a20  3a e7 28 47 3d 2d 31 80  20 46 3c 31 32 80 20 45  |:.(G=-1. F<12. E|
00000a30  3e 34 80 20 45 3c 31 32  29 84 28 47 3d 2d 31 80  |>4. E<12).(G=-1.|
00000a40  20 46 3c 38 29 46 3d 46  2b 32 3a 66 6c 61 67 3d  | F<8)F=F+2:flag=|
00000a50  32 0d 02 da 06 20 e1 0d  02 e4 05 3a 0d 02 ee 0a  |2.... .....:....|
00000a60  20 dd f2 77 69 6e 0d 02  f8 2d 20 fb 33 3a db 3a  | ..win...- .3:.:|
00000a70  ef 34 3a f1 8a 31 34 2c  32 29 22 43 4f 4e 47 52  |.4:..14,2)"CONGR|
00000a80  41 54 55 4c 41 54 49 4f  4e 53 22 3a f2 65 73 63  |ATULATIONS":.esc|
00000a90  61 70 65 0d 03 02 20 20  f5 3a e3 41 3d 30 b8 31  |ape...  .:.A=0.1|
00000aa0  36 3a ef 31 39 2c 30 2c  41 3b 30 3b 30 3b 3a ed  |6:.19,0,A;0;0;:.|
00000ab0  3a fd a3 0d 03 0c 06 20  e1 0d 03 16 05 3a 0d 03  |:...... .....:..|
00000ac0  20 0d 20 dd f2 66 69 6e  69 73 68 0d 03 2a 5d 20  | . ..finish..*] |
00000ad0  ef 34 3b 31 32 3b 31 37  2c 33 3a f1 8a 30 2c 31  |.4;12;17,3:..0,1|
00000ae0  29 22 54 6f 75 67 68 20  6c 75 63 6b 21 20 2c 20  |)"Tough luck! , |
00000af0  74 68 65 20 6c 61 73 74  20 70 65 67 20 68 61 73  |the last peg has|
00000b00  20 67 6f 74 20 74 6f 20  67 6f 22 27 8a 31 32 29  | got to go"'.12)|
00000b10  22 69 6e 20 74 68 65 20  6d 69 64 64 6c 65 2e 22  |"in the middle."|
00000b20  3a f2 65 73 63 61 70 65  0d 03 34 06 20 e1 0d 03  |:.escape..4. ...|
00000b30  3e 05 3a 0d 03 48 0d 20  dd f2 67 69 76 65 75 70  |>.:..H. ..giveup|
00000b40  0d 03 52 48 20 ef 34 3b  31 32 3b 31 37 2c 33 3a  |..RH .4;12;17,3:|
00000b50  f1 8a 35 2c 32 29 22 59  6f 75 20 6d 61 6e 61 67  |..5,2)"You manag|
00000b60  65 64 20 74 6f 20 63 6c  65 61 72 20 22 3b 54 54  |ed to clear ";TT|
00000b70  3b 22 20 70 65 67 22 3b  3a e7 54 54 3d 31 f1 22  |;" peg";:.TT=1."|
00000b80  2e 22 8b f1 22 73 2e 22  0d 03 5c 0c 20 f2 65 73  |.".."s."..\. .es|
00000b90  63 61 70 65 0d 03 66 06  20 e1 0d 03 70 05 3a 0d  |cape..f. ...p.:.|
00000ba0  03 7a 0d 20 dd f2 65 73  63 61 70 65 0d 03 84 39  |.z. ..escape...9|
00000bb0  20 f1 8a 37 2c 36 29 22  50 72 65 73 73 20 20 20  | ..7,6)"Press   |
00000bc0  20 20 20 20 20 74 6f 20  63 6f 6e 74 69 6e 75 65  |     to continue|
00000bd0  22 3a fb 31 3a f1 8a 31  33 2c 36 29 3b 22 45 53  |":.1:..13,6);"ES|
00000be0  43 41 50 45 22 0d 03 8e  06 20 e1 0d 03 98 05 3a  |CAPE".... .....:|
00000bf0  0d 03 a2 10 20 dd f2 64  28 41 24 2c 4b 2c 4c 29  |.... ..d(A$,K,L)|
00000c00  0d 03 ac b5 20 41 25 3d  26 41 3a 58 25 3d 30 3a  |.... A%=&A:X%=0:|
00000c10  59 25 3d 26 41 3a 44 3d  26 41 30 30 3a e3 4e 3d  |Y%=&A:D=&A00:.N=|
00000c20  31 b8 a9 28 41 24 29 3a  42 24 3d c1 41 24 2c 4e  |1..(A$):B$=.A$,N|
00000c30  2c 31 29 3a 3f 44 3d 97  28 42 24 29 3a d6 28 26  |,1):?D=.(B$):.(&|
00000c40  46 46 46 31 29 3a ef 32  33 2c 31 32 38 2c 44 3f  |FFF1):.23,128,D?|
00000c50  31 2c 44 3f 31 2c 44 3f  32 2c 44 3f 32 2c 44 3f  |1,D?1,D?2,D?2,D?|
00000c60  33 2c 44 3f 33 2c 44 3f  34 2c 44 3f 34 3b 32 33  |3,D?3,D?4,D?4;23|
00000c70  2c 31 32 39 2c 44 3f 35  2c 44 3f 35 2c 44 3f 36  |,129,D?5,D?5,D?6|
00000c80  2c 44 3f 36 2c 44 3f 37  2c 44 3f 37 2c 44 3f 38  |,D?6,D?7,D?7,D?8|
00000c90  2c 44 3f 38 3a f1 8a 4b  2b 4e 2c 4c 29 3b bd 28  |,D?8:..K+N,L);.(|
00000ca0  31 32 38 29 3b 8a 4b 2b  4e 2c 4c 2b 31 29 3b bd  |128);.K+N,L+1);.|
00000cb0  31 32 39 3a ed 0d 03 b6  06 20 e1 0d 03 c0 05 3a  |129:..... .....:|
00000cc0  0d 03 ca 0e 20 dd f2 68  6f 6c 65 28 5a 29 0d 03  |.... ..hole(Z)..|
00000cd0  d4 2a 20 f1 bd 28 5a 29  3b bd 28 5a 2b 31 29 3b  |.* ..(Z);.(Z+1);|
00000ce0  3a ef 31 30 3b 38 3b 38  3a f1 bd 28 5a 2b 32 29  |:.10;8;8:..(Z+2)|
00000cf0  3b bd 28 5a 2b 33 29 3b  0d 03 de 06 20 e1 0d 03  |;.(Z+3);.... ...|
00000d00  e8 05 3a 0d 03 f2 91 20  dc 31 31 31 30 31 30 31  |..:.... .1110101|
00000d10  30 30 31 31 31 31 31 31  30 31 30 31 31 31 31 31  |0011111101011111|
00000d20  31 31 31 31 2c 31 30 30  31 30 31 31 30 30 30 31  |1111,10010110001|
00000d30  30 30 31 30 31 30 31 30  31 30 31 30 31 31 30 30  |0010101010101100|
00000d40  2c 31 31 31 31 30 31 31  30 30 30 31 30 30 31 30  |,111101100010010|
00000d50  31 31 31 30 31 30 31 31  30 31 31 31 2c 30 30 31  |111010110111,001|
00000d60  31 30 31 31 30 30 30 31  30 30 31 30 31 30 31 30  |1011000100101010|
00000d70  31 30 31 30 31 31 30 30  2c 31 31 31 30 31 30 31  |10101100,1110101|
00000d80  31 31 31 31 31 30 31 30  31 30 31 31 31 31 31 30  |1111101010111110|
00000d90  31 31 31 31 0d ff                                 |1111..|
00000d96
26_09_87/SOL2.m0
26_09_87/SOL2.m1
26_09_87/SOL2.m2
26_09_87/SOL2.m4
26_09_87/SOL2.m5