Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_17.ADF » GAMES/CASTLE2

GAMES/CASTLE2

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 ADFS disks » Electron_User_Group » EUG_17.ADF
Filename: GAMES/CASTLE2
Read OK:
File size: 135C bytes
Load address: FFFF0E00
Exec address: FFFF8023
File contents
   10REM *************************
   20REM Beleaguered Castle part 2
   30REM By R.A.Dimond
   40REM (c) October 1992
   50REM *************************
   60ONERRORMODE6:REPORT:PRINT" at line ";ERL:END
   70IF PAGE>&E00 GOTO1550
   80VDU6
   90MODE1:VDU23,1,0;0;0;0;:G=RND(-TIME)
  100DIM N%(48),c%(48),s%(48),C%(8,16),S%(8,16),A%(4),D%(8)
  110REPEAT:VDU26,4:CLS:PROCrandom:PROCinit:PROCdeal:win%=FALSE
  120REPEAT:VDU26,4
  130VDU28,0,31,39,28:CLS
  140PROCenter
  150IFINKEY-74 GOTO200
  160PROCcheck
  170IFmv%=FALSE THEN VDU7:PRINT'TAB(10)"You can't move there!";:TIME=0:REPEATUNTILTIME>500:GOTO130
  180PROCmove
  190IFA%(1)=13 ANDA%(2)=13 ANDA%(3)=13 ANDA%(4)=13 THENwin%=TRUE
  200UNTILINKEY-74 ORwin%=TRUE
  210IFwin%=TRUE THEN MODE1:PROCwin
  220UNTIL0 ORK$="N"
  230END
  240DEFPROCrandom
  250FORI%=1TO48:N%(I%)=I%:NEXT:FORI%=48 TO2STEP-1:D%=RND(I%):T%=N%(D%):N%(D%)=N%(I%):N%(I%)=T%:NEXTI%
  260RESTORE:FORi%=1TO48:READc%(i%),s%(i%):NEXT
  270ENDPROC
  280DATA8,1,3,2,11,4,12,1,4,2,9,1,6,2,2,3,7,3,10,3,5,2,13,2,5,1,2,4,10,2,8,2,6,1,3,1,9,4,11,3,7,2,13,4,4,3,12,2
  290DATA10,1,12,4,4,1,13,1,8,3,2,1,7,1,11,2,3,4,9,2,6,4,13,3,7,4,2,2,11,1,5,3,9,3,6,3,4,4,10,4,3,3,8,4,5,4,12,3
  300DEFPROCcard:suit%=S%+223:IFS%=1ORS%=3colour=1:GC=0ELSEIFS%=2ORS%=4colour=0:GC=1
  310GCOL0,0:MOVEX%-4,Y%+14:DRAWX%+164,Y%+14:DRAWX%+164,Y%-201:DRAWX%-4,Y%-201:DRAWX%-4,Y%+14
  320VDU5,24,X%;Y%-197;X%+160;Y%+10;:GCOL0,131:CLG
  330GCOL0,colour:SOUND0,-15,4,1:MOVEX%+5,Y%-32:VDUsuit%:MOVEX%+128,Y%-134:PROCinv(suit%):VDU255
  340ON C% GOSUB360,370,380,390,400,410,420,430,440,450,470,480,490,500
  350ENDPROC
  360MOVEX%+128,Y%-168:PROCinv(65):VDU255:PROC1(80,0):MOVEX%+5,Y%:VDU65:RETURN
  370PROCc:PROC1(28,0):PROC1(132,1):RETURN
  380PROCc:PROC1(28,0):PROC1(80,0):PROC1(132,1):RETURN
  390PROCc:PROC2(28,0):PROC2(132,1):RETURN
  400PROCc:PROC2(28,0):PROC1(80,0):PROC2(132,1):RETURN
  410PROCc:PROC2(28,0):PROC2(80,0):PROC2(132,1):RETURN
  420PROCc:PROC2(28,0):PROC2(80,0):PROC2(132,1):PROC1(54,0):RETURN
  430PROCc:PROC2(28,0):PROC2(80,0):PROC2(132,1):PROC1(54,0):PROC1(104,1):RETURN
  440PROCc:PROC2(28,0):PROC2(62,0):PROC2(94,1):PROC2(132,1):PROC1(80,0):RETURN
  450MOVEX%+128,Y%-168:PROCinv(229):VDU255:MOVEX%+5,Y%:VDU229:PROC2(28,0):PROC2(62,0):PROC2(94,1):PROC2(132,1):PROC1(44,0):PROC1(116,1):RETURN
  460PROC2(28,0):PROC2(62,0):PROC2(94,1):PROC2(132,1):PROC1(44,0):PROC1(116,1):RETURN
  470PROCj:RETURN
  480PROCq:RETURN
  490PROCk:RETURN
  500RETURN
  510DEFPROCc:MOVEX%+5,Y%:VDU48+C%:MOVEX%+128,Y%-168:PROCinv(48+C%):VDU255:ENDPROC
  520DEFPROC1(Z%,F%):MOVEX%+64,Y%-Z%:IFF% PROCinv(suit%):VDU255 ELSEVDUsuit%
  530ENDPROC
  540DEFPROC2(Z%,F%):MOVEX%+32,Y%-Z%:IFF% PROCinv(suit%):VDU255 ELSEVDUsuit%
  550MOVEX%+96,Y%-Z%:IFF% PROCinv(suit%):VDU255 ELSEVDUsuit%
  560ENDPROC
  570DEFPROC5:MOVEX%+64,Y%-48:VDUsuit%:ENDPROC
  580DEFPROC6:MOVEX%+64,Y%-48:VDUsuit%:MOVEX%+64,Y%-108:VDUsuit%:ENDPROC
  590DEFPROC7:T$=CHR$suit%+CHR$8+CHR$10:t$=STRING$(4,T$):MOVEX%+28,Y%-26:PRINTt$:MOVEX%+100,Y%-26:PRINTt$:ENDPROC
  600DEFPROC8:MOVEX%+64,Y%-48:VDUsuit%:MOVEX%+64,Y%-110:VDUsuit%:ENDPROC
  610DEFPROCj:MOVEX%+1,Y%:VDU74:MOVEX%+128,Y%-168:PROCinv(74):VDU255
  620MOVEX%+65,Y%-14:VDU18,0,GC,253,231,8,8,10,239,240,8,8,8,10,18,0,2,241,18,0,GC,252,18,0,2,242,8,8,8,10,18,0,GC,243,244,8,8,10,245,246:PROCdraw:ENDPROC
  630DEFPROCq:MOVEX%+1,Y%:VDU81:MOVEX%+128,Y%-168:PROCinv(81):VDU255
  640MOVEX%+65,Y%-14:VDU18,0,GC,247,248,8,8,10,249,250,8,8,8,10,18,0,2,241,18,0,GC,252,18,0,2,242,8,8,8,10,18,0,GC,233,234,8,8,10,235,236:PROCdraw:ENDPROC 
  650DEFPROCk:MOVEX%+1,Y%:VDU75:MOVEX%+128,Y%-168:PROCinv(75):VDU255:GOTO620
  660DEFPROCdraw:MOVEX%+32,Y%-14:GCOL0,0:DRAWX%+130,Y%-14:DRAWX%+130,Y%-171:DRAWX%+32,Y%-171:DRAWX%+32,Y%-14
  670GCOL0,colour:MOVEX%+36,Y%-35:VDUsuit%:MOVEX%+96,Y%-130:PROCinv(suit%):VDU255:ENDPROC
  680DEFPROCinit
  690FORn%=1TO4:A%(n%)=1:NEXT:FORn%=1TO8:D%(n%)=6:NEXT
  700X%=560:FORn%=1TO4:Y%=1224-224*n%
  710C%=1:S%=n%:PROCcard
  720NEXT
  730n%=1:FORI%=1TO8:FORJ%=1TO6
  740C%(I%,J%)=c%(N%(n%)):S%(I%,J%)=s%(N%(n%)):n%=n%+1
  750NEXT:NEXT
  760ENDPROC
  770DEFPROCdeal
  780Y%=1000:FORI%=1TO8
  790IFI%>4 THENK%=844 ELSEK%=56
  800FORJ%=1TO6:X%=K%+40*(J%-1)
  810C%=C%(I%,J%):S%=S%(I%,J%)
  820PROCcard
  830NEXT
  840IFI%=4 THENY%=1000 ELSEY%=Y%-224
  850NEXT
  860VDU26,4:FORn%=1TO4:PRINTTAB(16,n%*7-4);n%:NEXT
  870FORn%=1TO8:IFn%>4 THENx%=25:y%=n%-4 ELSEx%=0:y%=n%
  880PRINTTAB(x%,7*y%-4)CHR$(64+n%);:NEXT
  890ENDPROC
  900DEFPROCenter
  910PRINTTAB(6,1);"Move from? ";
  920flag%=FALSE:PROCkey
  930IFINKEY-74 THEN ENDPROC 
  940from%=ASC(K$)-64
  950PRINTK$
  960PRINTTAB(26,1);"Move to? ";
  970flag%=TRUE:PROCkey
  980IFINKEY-74 THEN ENDPROC
  990to%=ASC(K$)-48
 1000PRINTK$
 1010ENDPROC
 1020DEFPROCkey
 1030REPEAT:K$=INKEY$0:UNTILK$>="A" ANDK$<="H" OR flag% AND (K$>="1" ANDK$<="4") ORINKEY-74
 1040ENDPROC
 1050DEFPROCcheck:mv%=TRUE:chk2%=FALSE
 1060IFD%(from%)=0 mv%=FALSE:ENDPROC
 1070IFto%>4:PROCcheck2:ENDPROC
 1080IFS%(from%,D%(from%))<>to% mv%=FALSE:ENDPROC
 1090IFC%(from%,D%(from%))<>A%(to%)+1 mv%=FALSE:ENDPROC
 1100ENDPROC
 1110DEFPROCcheck2
 1120to%=to%-16
 1130IFD%(to%)=16 mv%=FALSE:ENDPROC
 1140IFD%(to%)=0 mv%=TRUE:chk2%=TRUE:ENDPROC
 1150IFC%(from%,D%(from%))+1<>C%(to%,D%(to%)) mv%=FALSE:ENDPROC
 1160chk2%=TRUE
 1170ENDPROC
 1180DEFPROCmove
 1190C1%=C%(from%,D%(from%)):S1%=S%(from%,D%(from%))
 1200C%(from%,D%(from%))=0:S%(from%,D%(from%))=0
 1210D%(from%)=D%(from%)-1:Z%=1
 1220IFD%(from%)>6 THENZ%=D%(from%)-6
 1230IFfrom%>4 K%=844:Y%=1224-224*(from%-4) ELSEK%=56:Y%=1224-224*(from%)
 1240GCOL0,128:VDU24,K%;Y%-197;K%+400;Y%+10;:CLG
 1250IF D%(from%)=0 GOTO1300
 1260I%=from%:FORJ%=Z%TO D%(from%):X%=K%+40*(J%-Z%)
 1270C%=C%(I%,J%):S%=S%(I%,J%)
 1280PROCcard
 1290NEXT
 1300IFchk2%=TRUE GOTO1360
 1310A%(to%)=A%(to%)+1
 1320X%=560:Y%=1224-224*to%
 1330C%=A%(to%):S%=to%
 1340PROCcard
 1350ENDPROC
 1360D%(to%)=D%(to%)+1:Z%=1
 1370IF D%(to%)>7 Z%=D%(to%)-6
 1380C%(to%,D%(to%))=C1%:S%(to%,D%(to%))=S1%
 1390IFto%>4 K%=844:Y%=1224-224*(to%-4) ELSEK%=56:Y%=1224-224*(to%)
 1400GCOL0,128:VDU24,K%;Y%-197;K%+400;Y%+10;:CLG
 1410I%=to%:FORJ%=Z% TO D%(to%):X%=K%+40*(J%-Z%)
 1420C%=C%(I%,J%):S%=S%(I%,J%)
 1430PROCcard
 1440NEXT
 1450ENDPROC
 1460DEFPROCwin:VDU23,1,0;0;0;0;
 1470PRINTTAB(11,4)"CONGRATULATIONS!!"
 1480PRINTTAB(11,5)"-----------------"
 1490PRINTTAB(4,8)"You have completed that deal..."
 1500PRINTTAB(10,12)"Another deal?  (Y/N)"
 1510REPEAT:K$=INKEY$0:UNTILK$="Y" ORK$="N"
 1520ENDPROC
 1530DEFPROCinv(L%):?&56=L%:CALL&900:ENDPROC
 1540ENDPROC
 1550VDU21
 1560*K.0 *T.|MFORI%=0TO TOP-PAGE STEP4:I%!&E00=I%!PAGE:NEXT|MPAGE=&E00|MOLD|MRUN|M
 1570*FX138,0,128

� *************************
� Beleaguered Castle part 2
� By R.A.Dimond
(� (c) October 1992
2� *************************
<��6:�:�" at line ";�:�
F� �>&E00 �TNF
P�6
Z�1:�23,1,0;0;0;0;:G=�(-�)
d8� N%(48),c%(48),s%(48),C%(8,16),S%(8,16),A%(4),D%(8)
n(�:�26,4:�:�random:�init:�deal:win%=�
x�:�26,4
��28,0,31,39,28:�
�
�enter
��-74 �dH@
�
�check
�@�mv%=� � �7:�'�10)"You can't move there!";:�=0:���>500:�tB@
�	�move
�3�A%(1)=13 �A%(2)=13 �A%(3)=13 �A%(4)=13 �win%=�
���-74 �win%=�
��win%=� � �1:�win
��0 �K$="N"
��
���random
�T�I%=1�48:N%(I%)=I%:�:�I%=48 �2�-1:D%=�(I%):T%=N%(D%):N%(D%)=N%(I%):N%(I%)=T%:�I%
�:�i%=1�48:�c%(i%),s%(i%):�
�
l�8,1,3,2,11,4,12,1,4,2,9,1,6,2,2,3,7,3,10,3,5,2,13,2,5,1,2,4,10,2,8,2,6,1,3,1,9,4,11,3,7,2,13,4,4,3,12,2
"l�10,1,12,4,4,1,13,1,8,3,2,1,7,1,11,2,3,4,9,2,6,4,13,3,7,4,2,2,11,1,5,3,9,3,6,3,4,4,10,4,3,3,8,4,5,4,12,3
,G��card:suit%=S%+223:�S%=1�S%=3colour=1:GC=0��S%=2�S%=4colour=0:GC=1
6J�0,0:�X%-4,Y%+14:�X%+164,Y%+14:�X%+164,Y%-201:�X%-4,Y%-201:�X%-4,Y%+14
@*�5,24,X%;Y%-197;X%+160;Y%+10;:�0,131:�
JK�0,colour:�0,-15,4,1:�X%+5,Y%-32:�suit%:�X%+128,Y%-134:�inv(suit%):�255
TO� C% �DhA,�DrA,�D|A,�tFA,�tPA,�tZA,�tdA,�tnA,�txA,�dBA,�dVA,�d`A,�djA,�dtA
^�
h8�X%+128,Y%-168:�inv(65):�255:�1(80,0):�X%+5,Y%:�65:�
r�c:�1(28,0):�1(132,1):�
|$�c:�1(28,0):�1(80,0):�1(132,1):�
��c:�2(28,0):�2(132,1):�
�$�c:�2(28,0):�1(80,0):�2(132,1):�
�$�c:�2(28,0):�2(80,0):�2(132,1):�
�-�c:�2(28,0):�2(80,0):�2(132,1):�1(54,0):�
�7�c:�2(28,0):�2(80,0):�2(132,1):�1(54,0):�1(104,1):�
�6�c:�2(28,0):�2(62,0):�2(94,1):�2(132,1):�1(80,0):�
�i�X%+128,Y%-168:�inv(229):�255:�X%+5,Y%:�229:�2(28,0):�2(62,0):�2(94,1):�2(132,1):�1(44,0):�1(116,1):�
�=�2(28,0):�2(62,0):�2(94,1):�2(132,1):�1(44,0):�1(116,1):�
��j:�
��q:�
��k:�
��
�9��c:�X%+5,Y%:�48+C%:�X%+128,Y%-168:�inv(48+C%):�255:�
8��1(Z%,F%):�X%+64,Y%-Z%:�F% �inv(suit%):�255 ��suit%
�
8��2(Z%,F%):�X%+32,Y%-Z%:�F% �inv(suit%):�255 ��suit%
&-�X%+96,Y%-Z%:�F% �inv(suit%):�255 ��suit%
0�
:��5:�X%+64,Y%-48:�suit%:�
D2��6:�X%+64,Y%-48:�suit%:�X%+64,Y%-108:�suit%:�
NG��7:T$=�suit%+�8+�10:t$=�4,T$):�X%+28,Y%-26:�t$:�X%+100,Y%-26:�t$:�
X2��8:�X%+64,Y%-48:�suit%:�X%+64,Y%-110:�suit%:�
b1��j:�X%+1,Y%:�74:�X%+128,Y%-168:�inv(74):�255
l��X%+65,Y%-14:�18,0,GC,253,231,8,8,10,239,240,8,8,8,10,18,0,2,241,18,0,GC,252,18,0,2,242,8,8,8,10,18,0,GC,243,244,8,8,10,245,246:�draw:�
v1��q:�X%+1,Y%:�81:�X%+128,Y%-168:�inv(81):�255
���X%+65,Y%-14:�18,0,GC,247,248,8,8,10,249,250,8,8,8,10,18,0,2,241,18,0,GC,252,18,0,2,242,8,8,8,10,18,0,GC,233,234,8,8,10,235,236:�draw:� 
�7��k:�X%+1,Y%:�75:�X%+128,Y%-168:�inv(75):�255:�DlB
�T��draw:�X%+32,Y%-14:�0,0:�X%+130,Y%-14:�X%+130,Y%-171:�X%+32,Y%-171:�X%+32,Y%-14
�B�0,colour:�X%+36,Y%-35:�suit%:�X%+96,Y%-130:�inv(suit%):�255:�
�
��init
�)�n%=1�4:A%(n%)=1:�:�n%=1�8:D%(n%)=6:�
�!X%=560:�n%=1�4:Y%=1224-224*n%
�C%=1:S%=n%:�card
��
�n%=1:�I%=1�8:�J%=1�6
�5C%(I%,J%)=c%(N%(n%)):S%(I%,J%)=s%(N%(n%)):n%=n%+1
��:�
��

��deal
Y%=1000:�I%=1�8
�I%>4 �K%=844 �K%=56
 �J%=1�6:X%=K%+40*(J%-1)
*C%=C%(I%,J%):S%=S%(I%,J%)
4	�card
>�
H�I%=4 �Y%=1000 �Y%=Y%-224
R�
\#�26,4:�n%=1�4:�16,n%*7-4);n%:�
f,�n%=1�8:�n%>4 �x%=25:y%=n%-4 �x%=0:y%=n%
p�x%,7*y%-4)�(64+n%);:�
z�
���enter
��6,1);"Move from? ";
�flag%=�:�key
��-74 � � 
�from%=�(K$)-64
��K$
��26,1);"Move to? ";
�flag%=�:�key
�
�-74 � �
�to%=�(K$)-48
��K$
��
�	��key
@�:K$=�0:�K$>="A" �K$<="H" � flag% � (K$>="1" �K$<="4") ��-74
�
��check:mv%=�:chk2%=�
$�D%(from%)=0 mv%=�:�
.�to%>4:�check2:�
8%�S%(from%,D%(from%))<>to% mv%=�:�
B+�C%(from%,D%(from%))<>A%(to%)+1 mv%=�:�
L�
V��check2
`to%=to%-16
j�D%(to%)=16 mv%=�:�
t�D%(to%)=0 mv%=�:chk2%=�:�
~3�C%(from%,D%(from%))+1<>C%(to%,D%(to%)) mv%=�:�
�chk2%=�
��
�
��move
�3C1%=C%(from%,D%(from%)):S1%=S%(from%,D%(from%))
�/C%(from%,D%(from%))=0:S%(from%,D%(from%))=0
�D%(from%)=D%(from%)-1:Z%=1
� �D%(from%)>6 �Z%=D%(from%)-6
�D�from%>4 K%=844:Y%=1224-224*(from%-4) �K%=56:Y%=1224-224*(from%)
�(�0,128:�24,K%;Y%-197;K%+400;Y%+10;:�
�� D%(from%)=0 �TTE
�/I%=from%:�J%=Z%� D%(from%):X%=K%+40*(J%-Z%)
�C%=C%(I%,J%):S%=S%(I%,J%)
	�card

�
�chk2%=� �DPE
A%(to%)=A%(to%)+1
(X%=560:Y%=1224-224*to%
2C%=A%(to%):S%=to%
<	�card
F�
PD%(to%)=D%(to%)+1:Z%=1
Z� D%(to%)>7 Z%=D%(to%)-6
d+C%(to%,D%(to%))=C1%:S%(to%,D%(to%))=S1%
n>�to%>4 K%=844:Y%=1224-224*(to%-4) �K%=56:Y%=1224-224*(to%)
x(�0,128:�24,K%;Y%-197;K%+400;Y%+10;:�
�,I%=to%:�J%=Z% � D%(to%):X%=K%+40*(J%-Z%)
�C%=C%(I%,J%):S%=S%(I%,J%)
�	�card
��
��
���win:�23,1,0;0;0;0;
��11,4)"CONGRATULATIONS!!"
��11,5)"-----------------"
�+�4,8)"You have completed that deal..."
�"�10,12)"Another deal?  (Y/N)"
��:K$=�0:�K$="Y" �K$="N"
��
���inv(L%):?&56=L%:�&900:�
�
�21
R*K.0 *T.|MFORI%=0TO TOP-PAGE STEP4:I%!&E00=I%!PAGE:NEXT|MPAGE=&E00|MOLD|MRUN|M
"*FX138,0,128
�
00000000  0d 00 0a 1f 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 0d  |***************.|
00000020  00 14 1f f4 20 42 65 6c  65 61 67 75 65 72 65 64  |.... Beleaguered|
00000030  20 43 61 73 74 6c 65 20  70 61 72 74 20 32 0d 00  | Castle part 2..|
00000040  1e 13 f4 20 42 79 20 52  2e 41 2e 44 69 6d 6f 6e  |... By R.A.Dimon|
00000050  64 0d 00 28 16 f4 20 28  63 29 20 4f 63 74 6f 62  |d..(.. (c) Octob|
00000060  65 72 20 31 39 39 32 0d  00 32 1f f4 20 2a 2a 2a  |er 1992..2.. ***|
00000070  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00000080  2a 2a 2a 2a 2a 2a 0d 00  3c 1b ee 85 eb 36 3a f6  |******..<....6:.|
00000090  3a f1 22 20 61 74 20 6c  69 6e 65 20 22 3b 9e 3a  |:." at line ";.:|
000000a0  e0 0d 00 46 12 e7 20 90  3e 26 45 30 30 20 e5 8d  |...F.. .>&E00 ..|
000000b0  54 4e 46 0d 00 50 06 ef  36 0d 00 5a 1d eb 31 3a  |TNF..P..6..Z..1:|
000000c0  ef 32 33 2c 31 2c 30 3b  30 3b 30 3b 30 3b 3a 47  |.23,1,0;0;0;0;:G|
000000d0  3d b3 28 2d 91 29 0d 00  64 38 de 20 4e 25 28 34  |=.(-.)..d8. N%(4|
000000e0  38 29 2c 63 25 28 34 38  29 2c 73 25 28 34 38 29  |8),c%(48),s%(48)|
000000f0  2c 43 25 28 38 2c 31 36  29 2c 53 25 28 38 2c 31  |,C%(8,16),S%(8,1|
00000100  36 29 2c 41 25 28 34 29  2c 44 25 28 38 29 0d 00  |6),A%(4),D%(8)..|
00000110  6e 28 f5 3a ef 32 36 2c  34 3a db 3a f2 72 61 6e  |n(.:.26,4:.:.ran|
00000120  64 6f 6d 3a f2 69 6e 69  74 3a f2 64 65 61 6c 3a  |dom:.init:.deal:|
00000130  77 69 6e 25 3d a3 0d 00  78 0b f5 3a ef 32 36 2c  |win%=...x..:.26,|
00000140  34 0d 00 82 14 ef 32 38  2c 30 2c 33 31 2c 33 39  |4.....28,0,31,39|
00000150  2c 32 38 3a db 0d 00 8c  0a f2 65 6e 74 65 72 0d  |,28:......enter.|
00000160  00 96 0f e7 a6 2d 37 34  20 e5 8d 64 48 40 0d 00  |.....-74 ..dH@..|
00000170  a0 0a f2 63 68 65 63 6b  0d 00 aa 40 e7 6d 76 25  |...check...@.mv%|
00000180  3d a3 20 8c 20 ef 37 3a  f1 27 8a 31 30 29 22 59  |=. . .7:.'.10)"Y|
00000190  6f 75 20 63 61 6e 27 74  20 6d 6f 76 65 20 74 68  |ou can't move th|
000001a0  65 72 65 21 22 3b 3a d1  3d 30 3a f5 fd 91 3e 35  |ere!";:.=0:...>5|
000001b0  30 30 3a e5 8d 74 42 40  0d 00 b4 09 f2 6d 6f 76  |00:..tB@.....mov|
000001c0  65 0d 00 be 33 e7 41 25  28 31 29 3d 31 33 20 80  |e...3.A%(1)=13 .|
000001d0  41 25 28 32 29 3d 31 33  20 80 41 25 28 33 29 3d  |A%(2)=13 .A%(3)=|
000001e0  31 33 20 80 41 25 28 34  29 3d 31 33 20 8c 77 69  |13 .A%(4)=13 .wi|
000001f0  6e 25 3d b9 0d 00 c8 11  fd a6 2d 37 34 20 84 77  |n%=.......-74 .w|
00000200  69 6e 25 3d b9 0d 00 d2  15 e7 77 69 6e 25 3d b9  |in%=......win%=.|
00000210  20 8c 20 eb 31 3a f2 77  69 6e 0d 00 dc 0e fd 30  | . .1:.win.....0|
00000220  20 84 4b 24 3d 22 4e 22  0d 00 e6 05 e0 0d 00 f0  | .K$="N"........|
00000230  0c dd f2 72 61 6e 64 6f  6d 0d 00 fa 54 e3 49 25  |...random...T.I%|
00000240  3d 31 b8 34 38 3a 4e 25  28 49 25 29 3d 49 25 3a  |=1.48:N%(I%)=I%:|
00000250  ed 3a e3 49 25 3d 34 38  20 b8 32 88 2d 31 3a 44  |.:.I%=48 .2.-1:D|
00000260  25 3d b3 28 49 25 29 3a  54 25 3d 4e 25 28 44 25  |%=.(I%):T%=N%(D%|
00000270  29 3a 4e 25 28 44 25 29  3d 4e 25 28 49 25 29 3a  |):N%(D%)=N%(I%):|
00000280  4e 25 28 49 25 29 3d 54  25 3a ed 49 25 0d 01 04  |N%(I%)=T%:.I%...|
00000290  1f f7 3a e3 69 25 3d 31  b8 34 38 3a f3 63 25 28  |..:.i%=1.48:.c%(|
000002a0  69 25 29 2c 73 25 28 69  25 29 3a ed 0d 01 0e 05  |i%),s%(i%):.....|
000002b0  e1 0d 01 18 6c dc 38 2c  31 2c 33 2c 32 2c 31 31  |....l.8,1,3,2,11|
000002c0  2c 34 2c 31 32 2c 31 2c  34 2c 32 2c 39 2c 31 2c  |,4,12,1,4,2,9,1,|
000002d0  36 2c 32 2c 32 2c 33 2c  37 2c 33 2c 31 30 2c 33  |6,2,2,3,7,3,10,3|
000002e0  2c 35 2c 32 2c 31 33 2c  32 2c 35 2c 31 2c 32 2c  |,5,2,13,2,5,1,2,|
000002f0  34 2c 31 30 2c 32 2c 38  2c 32 2c 36 2c 31 2c 33  |4,10,2,8,2,6,1,3|
00000300  2c 31 2c 39 2c 34 2c 31  31 2c 33 2c 37 2c 32 2c  |,1,9,4,11,3,7,2,|
00000310  31 33 2c 34 2c 34 2c 33  2c 31 32 2c 32 0d 01 22  |13,4,4,3,12,2.."|
00000320  6c dc 31 30 2c 31 2c 31  32 2c 34 2c 34 2c 31 2c  |l.10,1,12,4,4,1,|
00000330  31 33 2c 31 2c 38 2c 33  2c 32 2c 31 2c 37 2c 31  |13,1,8,3,2,1,7,1|
00000340  2c 31 31 2c 32 2c 33 2c  34 2c 39 2c 32 2c 36 2c  |,11,2,3,4,9,2,6,|
00000350  34 2c 31 33 2c 33 2c 37  2c 34 2c 32 2c 32 2c 31  |4,13,3,7,4,2,2,1|
00000360  31 2c 31 2c 35 2c 33 2c  39 2c 33 2c 36 2c 33 2c  |1,1,5,3,9,3,6,3,|
00000370  34 2c 34 2c 31 30 2c 34  2c 33 2c 33 2c 38 2c 34  |4,4,10,4,3,3,8,4|
00000380  2c 35 2c 34 2c 31 32 2c  33 0d 01 2c 47 dd f2 63  |,5,4,12,3..,G..c|
00000390  61 72 64 3a 73 75 69 74  25 3d 53 25 2b 32 32 33  |ard:suit%=S%+223|
000003a0  3a e7 53 25 3d 31 84 53  25 3d 33 63 6f 6c 6f 75  |:.S%=1.S%=3colou|
000003b0  72 3d 31 3a 47 43 3d 30  8b e7 53 25 3d 32 84 53  |r=1:GC=0..S%=2.S|
000003c0  25 3d 34 63 6f 6c 6f 75  72 3d 30 3a 47 43 3d 31  |%=4colour=0:GC=1|
000003d0  0d 01 36 4a e6 30 2c 30  3a ec 58 25 2d 34 2c 59  |..6J.0,0:.X%-4,Y|
000003e0  25 2b 31 34 3a df 58 25  2b 31 36 34 2c 59 25 2b  |%+14:.X%+164,Y%+|
000003f0  31 34 3a df 58 25 2b 31  36 34 2c 59 25 2d 32 30  |14:.X%+164,Y%-20|
00000400  31 3a df 58 25 2d 34 2c  59 25 2d 32 30 31 3a df  |1:.X%-4,Y%-201:.|
00000410  58 25 2d 34 2c 59 25 2b  31 34 0d 01 40 2a ef 35  |X%-4,Y%+14..@*.5|
00000420  2c 32 34 2c 58 25 3b 59  25 2d 31 39 37 3b 58 25  |,24,X%;Y%-197;X%|
00000430  2b 31 36 30 3b 59 25 2b  31 30 3b 3a e6 30 2c 31  |+160;Y%+10;:.0,1|
00000440  33 31 3a da 0d 01 4a 4b  e6 30 2c 63 6f 6c 6f 75  |31:...JK.0,colou|
00000450  72 3a d4 30 2c 2d 31 35  2c 34 2c 31 3a ec 58 25  |r:.0,-15,4,1:.X%|
00000460  2b 35 2c 59 25 2d 33 32  3a ef 73 75 69 74 25 3a  |+5,Y%-32:.suit%:|
00000470  ec 58 25 2b 31 32 38 2c  59 25 2d 31 33 34 3a f2  |.X%+128,Y%-134:.|
00000480  69 6e 76 28 73 75 69 74  25 29 3a ef 32 35 35 0d  |inv(suit%):.255.|
00000490  01 54 4f ee 20 43 25 20  e4 8d 44 68 41 2c 8d 44  |.TO. C% ..DhA,.D|
000004a0  72 41 2c 8d 44 7c 41 2c  8d 74 46 41 2c 8d 74 50  |rA,.D|A,.tFA,.tP|
000004b0  41 2c 8d 74 5a 41 2c 8d  74 64 41 2c 8d 74 6e 41  |A,.tZA,.tdA,.tnA|
000004c0  2c 8d 74 78 41 2c 8d 64  42 41 2c 8d 64 56 41 2c  |,.txA,.dBA,.dVA,|
000004d0  8d 64 60 41 2c 8d 64 6a  41 2c 8d 64 74 41 0d 01  |.d`A,.djA,.dtA..|
000004e0  5e 05 e1 0d 01 68 38 ec  58 25 2b 31 32 38 2c 59  |^....h8.X%+128,Y|
000004f0  25 2d 31 36 38 3a f2 69  6e 76 28 36 35 29 3a ef  |%-168:.inv(65):.|
00000500  32 35 35 3a f2 31 28 38  30 2c 30 29 3a ec 58 25  |255:.1(80,0):.X%|
00000510  2b 35 2c 59 25 3a ef 36  35 3a f8 0d 01 72 1b f2  |+5,Y%:.65:...r..|
00000520  63 3a f2 31 28 32 38 2c  30 29 3a f2 31 28 31 33  |c:.1(28,0):.1(13|
00000530  32 2c 31 29 3a f8 0d 01  7c 24 f2 63 3a f2 31 28  |2,1):...|$.c:.1(|
00000540  32 38 2c 30 29 3a f2 31  28 38 30 2c 30 29 3a f2  |28,0):.1(80,0):.|
00000550  31 28 31 33 32 2c 31 29  3a f8 0d 01 86 1b f2 63  |1(132,1):......c|
00000560  3a f2 32 28 32 38 2c 30  29 3a f2 32 28 31 33 32  |:.2(28,0):.2(132|
00000570  2c 31 29 3a f8 0d 01 90  24 f2 63 3a f2 32 28 32  |,1):....$.c:.2(2|
00000580  38 2c 30 29 3a f2 31 28  38 30 2c 30 29 3a f2 32  |8,0):.1(80,0):.2|
00000590  28 31 33 32 2c 31 29 3a  f8 0d 01 9a 24 f2 63 3a  |(132,1):....$.c:|
000005a0  f2 32 28 32 38 2c 30 29  3a f2 32 28 38 30 2c 30  |.2(28,0):.2(80,0|
000005b0  29 3a f2 32 28 31 33 32  2c 31 29 3a f8 0d 01 a4  |):.2(132,1):....|
000005c0  2d f2 63 3a f2 32 28 32  38 2c 30 29 3a f2 32 28  |-.c:.2(28,0):.2(|
000005d0  38 30 2c 30 29 3a f2 32  28 31 33 32 2c 31 29 3a  |80,0):.2(132,1):|
000005e0  f2 31 28 35 34 2c 30 29  3a f8 0d 01 ae 37 f2 63  |.1(54,0):....7.c|
000005f0  3a f2 32 28 32 38 2c 30  29 3a f2 32 28 38 30 2c  |:.2(28,0):.2(80,|
00000600  30 29 3a f2 32 28 31 33  32 2c 31 29 3a f2 31 28  |0):.2(132,1):.1(|
00000610  35 34 2c 30 29 3a f2 31  28 31 30 34 2c 31 29 3a  |54,0):.1(104,1):|
00000620  f8 0d 01 b8 36 f2 63 3a  f2 32 28 32 38 2c 30 29  |....6.c:.2(28,0)|
00000630  3a f2 32 28 36 32 2c 30  29 3a f2 32 28 39 34 2c  |:.2(62,0):.2(94,|
00000640  31 29 3a f2 32 28 31 33  32 2c 31 29 3a f2 31 28  |1):.2(132,1):.1(|
00000650  38 30 2c 30 29 3a f8 0d  01 c2 69 ec 58 25 2b 31  |80,0):....i.X%+1|
00000660  32 38 2c 59 25 2d 31 36  38 3a f2 69 6e 76 28 32  |28,Y%-168:.inv(2|
00000670  32 39 29 3a ef 32 35 35  3a ec 58 25 2b 35 2c 59  |29):.255:.X%+5,Y|
00000680  25 3a ef 32 32 39 3a f2  32 28 32 38 2c 30 29 3a  |%:.229:.2(28,0):|
00000690  f2 32 28 36 32 2c 30 29  3a f2 32 28 39 34 2c 31  |.2(62,0):.2(94,1|
000006a0  29 3a f2 32 28 31 33 32  2c 31 29 3a f2 31 28 34  |):.2(132,1):.1(4|
000006b0  34 2c 30 29 3a f2 31 28  31 31 36 2c 31 29 3a f8  |4,0):.1(116,1):.|
000006c0  0d 01 cc 3d f2 32 28 32  38 2c 30 29 3a f2 32 28  |...=.2(28,0):.2(|
000006d0  36 32 2c 30 29 3a f2 32  28 39 34 2c 31 29 3a f2  |62,0):.2(94,1):.|
000006e0  32 28 31 33 32 2c 31 29  3a f2 31 28 34 34 2c 30  |2(132,1):.1(44,0|
000006f0  29 3a f2 31 28 31 31 36  2c 31 29 3a f8 0d 01 d6  |):.1(116,1):....|
00000700  08 f2 6a 3a f8 0d 01 e0  08 f2 71 3a f8 0d 01 ea  |..j:......q:....|
00000710  08 f2 6b 3a f8 0d 01 f4  05 f8 0d 01 fe 39 dd f2  |..k:.........9..|
00000720  63 3a ec 58 25 2b 35 2c  59 25 3a ef 34 38 2b 43  |c:.X%+5,Y%:.48+C|
00000730  25 3a ec 58 25 2b 31 32  38 2c 59 25 2d 31 36 38  |%:.X%+128,Y%-168|
00000740  3a f2 69 6e 76 28 34 38  2b 43 25 29 3a ef 32 35  |:.inv(48+C%):.25|
00000750  35 3a e1 0d 02 08 38 dd  f2 31 28 5a 25 2c 46 25  |5:....8..1(Z%,F%|
00000760  29 3a ec 58 25 2b 36 34  2c 59 25 2d 5a 25 3a e7  |):.X%+64,Y%-Z%:.|
00000770  46 25 20 f2 69 6e 76 28  73 75 69 74 25 29 3a ef  |F% .inv(suit%):.|
00000780  32 35 35 20 8b ef 73 75  69 74 25 0d 02 12 05 e1  |255 ..suit%.....|
00000790  0d 02 1c 38 dd f2 32 28  5a 25 2c 46 25 29 3a ec  |...8..2(Z%,F%):.|
000007a0  58 25 2b 33 32 2c 59 25  2d 5a 25 3a e7 46 25 20  |X%+32,Y%-Z%:.F% |
000007b0  f2 69 6e 76 28 73 75 69  74 25 29 3a ef 32 35 35  |.inv(suit%):.255|
000007c0  20 8b ef 73 75 69 74 25  0d 02 26 2d ec 58 25 2b  | ..suit%..&-.X%+|
000007d0  39 36 2c 59 25 2d 5a 25  3a e7 46 25 20 f2 69 6e  |96,Y%-Z%:.F% .in|
000007e0  76 28 73 75 69 74 25 29  3a ef 32 35 35 20 8b ef  |v(suit%):.255 ..|
000007f0  73 75 69 74 25 0d 02 30  05 e1 0d 02 3a 1d dd f2  |suit%..0....:...|
00000800  35 3a ec 58 25 2b 36 34  2c 59 25 2d 34 38 3a ef  |5:.X%+64,Y%-48:.|
00000810  73 75 69 74 25 3a e1 0d  02 44 32 dd f2 36 3a ec  |suit%:...D2..6:.|
00000820  58 25 2b 36 34 2c 59 25  2d 34 38 3a ef 73 75 69  |X%+64,Y%-48:.sui|
00000830  74 25 3a ec 58 25 2b 36  34 2c 59 25 2d 31 30 38  |t%:.X%+64,Y%-108|
00000840  3a ef 73 75 69 74 25 3a  e1 0d 02 4e 47 dd f2 37  |:.suit%:...NG..7|
00000850  3a 54 24 3d bd 73 75 69  74 25 2b bd 38 2b bd 31  |:T$=.suit%+.8+.1|
00000860  30 3a 74 24 3d c4 34 2c  54 24 29 3a ec 58 25 2b  |0:t$=.4,T$):.X%+|
00000870  32 38 2c 59 25 2d 32 36  3a f1 74 24 3a ec 58 25  |28,Y%-26:.t$:.X%|
00000880  2b 31 30 30 2c 59 25 2d  32 36 3a f1 74 24 3a e1  |+100,Y%-26:.t$:.|
00000890  0d 02 58 32 dd f2 38 3a  ec 58 25 2b 36 34 2c 59  |..X2..8:.X%+64,Y|
000008a0  25 2d 34 38 3a ef 73 75  69 74 25 3a ec 58 25 2b  |%-48:.suit%:.X%+|
000008b0  36 34 2c 59 25 2d 31 31  30 3a ef 73 75 69 74 25  |64,Y%-110:.suit%|
000008c0  3a e1 0d 02 62 31 dd f2  6a 3a ec 58 25 2b 31 2c  |:...b1..j:.X%+1,|
000008d0  59 25 3a ef 37 34 3a ec  58 25 2b 31 32 38 2c 59  |Y%:.74:.X%+128,Y|
000008e0  25 2d 31 36 38 3a f2 69  6e 76 28 37 34 29 3a ef  |%-168:.inv(74):.|
000008f0  32 35 35 0d 02 6c 8b ec  58 25 2b 36 35 2c 59 25  |255..l..X%+65,Y%|
00000900  2d 31 34 3a ef 31 38 2c  30 2c 47 43 2c 32 35 33  |-14:.18,0,GC,253|
00000910  2c 32 33 31 2c 38 2c 38  2c 31 30 2c 32 33 39 2c  |,231,8,8,10,239,|
00000920  32 34 30 2c 38 2c 38 2c  38 2c 31 30 2c 31 38 2c  |240,8,8,8,10,18,|
00000930  30 2c 32 2c 32 34 31 2c  31 38 2c 30 2c 47 43 2c  |0,2,241,18,0,GC,|
00000940  32 35 32 2c 31 38 2c 30  2c 32 2c 32 34 32 2c 38  |252,18,0,2,242,8|
00000950  2c 38 2c 38 2c 31 30 2c  31 38 2c 30 2c 47 43 2c  |,8,8,10,18,0,GC,|
00000960  32 34 33 2c 32 34 34 2c  38 2c 38 2c 31 30 2c 32  |243,244,8,8,10,2|
00000970  34 35 2c 32 34 36 3a f2  64 72 61 77 3a e1 0d 02  |45,246:.draw:...|
00000980  76 31 dd f2 71 3a ec 58  25 2b 31 2c 59 25 3a ef  |v1..q:.X%+1,Y%:.|
00000990  38 31 3a ec 58 25 2b 31  32 38 2c 59 25 2d 31 36  |81:.X%+128,Y%-16|
000009a0  38 3a f2 69 6e 76 28 38  31 29 3a ef 32 35 35 0d  |8:.inv(81):.255.|
000009b0  02 80 8c ec 58 25 2b 36  35 2c 59 25 2d 31 34 3a  |....X%+65,Y%-14:|
000009c0  ef 31 38 2c 30 2c 47 43  2c 32 34 37 2c 32 34 38  |.18,0,GC,247,248|
000009d0  2c 38 2c 38 2c 31 30 2c  32 34 39 2c 32 35 30 2c  |,8,8,10,249,250,|
000009e0  38 2c 38 2c 38 2c 31 30  2c 31 38 2c 30 2c 32 2c  |8,8,8,10,18,0,2,|
000009f0  32 34 31 2c 31 38 2c 30  2c 47 43 2c 32 35 32 2c  |241,18,0,GC,252,|
00000a00  31 38 2c 30 2c 32 2c 32  34 32 2c 38 2c 38 2c 38  |18,0,2,242,8,8,8|
00000a10  2c 31 30 2c 31 38 2c 30  2c 47 43 2c 32 33 33 2c  |,10,18,0,GC,233,|
00000a20  32 33 34 2c 38 2c 38 2c  31 30 2c 32 33 35 2c 32  |234,8,8,10,235,2|
00000a30  33 36 3a f2 64 72 61 77  3a e1 20 0d 02 8a 37 dd  |36:.draw:. ...7.|
00000a40  f2 6b 3a ec 58 25 2b 31  2c 59 25 3a ef 37 35 3a  |.k:.X%+1,Y%:.75:|
00000a50  ec 58 25 2b 31 32 38 2c  59 25 2d 31 36 38 3a f2  |.X%+128,Y%-168:.|
00000a60  69 6e 76 28 37 35 29 3a  ef 32 35 35 3a e5 8d 44  |inv(75):.255:..D|
00000a70  6c 42 0d 02 94 54 dd f2  64 72 61 77 3a ec 58 25  |lB...T..draw:.X%|
00000a80  2b 33 32 2c 59 25 2d 31  34 3a e6 30 2c 30 3a df  |+32,Y%-14:.0,0:.|
00000a90  58 25 2b 31 33 30 2c 59  25 2d 31 34 3a df 58 25  |X%+130,Y%-14:.X%|
00000aa0  2b 31 33 30 2c 59 25 2d  31 37 31 3a df 58 25 2b  |+130,Y%-171:.X%+|
00000ab0  33 32 2c 59 25 2d 31 37  31 3a df 58 25 2b 33 32  |32,Y%-171:.X%+32|
00000ac0  2c 59 25 2d 31 34 0d 02  9e 42 e6 30 2c 63 6f 6c  |,Y%-14...B.0,col|
00000ad0  6f 75 72 3a ec 58 25 2b  33 36 2c 59 25 2d 33 35  |our:.X%+36,Y%-35|
00000ae0  3a ef 73 75 69 74 25 3a  ec 58 25 2b 39 36 2c 59  |:.suit%:.X%+96,Y|
00000af0  25 2d 31 33 30 3a f2 69  6e 76 28 73 75 69 74 25  |%-130:.inv(suit%|
00000b00  29 3a ef 32 35 35 3a e1  0d 02 a8 0a dd f2 69 6e  |):.255:.......in|
00000b10  69 74 0d 02 b2 29 e3 6e  25 3d 31 b8 34 3a 41 25  |it...).n%=1.4:A%|
00000b20  28 6e 25 29 3d 31 3a ed  3a e3 6e 25 3d 31 b8 38  |(n%)=1:.:.n%=1.8|
00000b30  3a 44 25 28 6e 25 29 3d  36 3a ed 0d 02 bc 21 58  |:D%(n%)=6:....!X|
00000b40  25 3d 35 36 30 3a e3 6e  25 3d 31 b8 34 3a 59 25  |%=560:.n%=1.4:Y%|
00000b50  3d 31 32 32 34 2d 32 32  34 2a 6e 25 0d 02 c6 14  |=1224-224*n%....|
00000b60  43 25 3d 31 3a 53 25 3d  6e 25 3a f2 63 61 72 64  |C%=1:S%=n%:.card|
00000b70  0d 02 d0 05 ed 0d 02 da  18 6e 25 3d 31 3a e3 49  |.........n%=1:.I|
00000b80  25 3d 31 b8 38 3a e3 4a  25 3d 31 b8 36 0d 02 e4  |%=1.8:.J%=1.6...|
00000b90  35 43 25 28 49 25 2c 4a  25 29 3d 63 25 28 4e 25  |5C%(I%,J%)=c%(N%|
00000ba0  28 6e 25 29 29 3a 53 25  28 49 25 2c 4a 25 29 3d  |(n%)):S%(I%,J%)=|
00000bb0  73 25 28 4e 25 28 6e 25  29 29 3a 6e 25 3d 6e 25  |s%(N%(n%)):n%=n%|
00000bc0  2b 31 0d 02 ee 07 ed 3a  ed 0d 02 f8 05 e1 0d 03  |+1.....:........|
00000bd0  02 0a dd f2 64 65 61 6c  0d 03 0c 13 59 25 3d 31  |....deal....Y%=1|
00000be0  30 30 30 3a e3 49 25 3d  31 b8 38 0d 03 16 18 e7  |000:.I%=1.8.....|
00000bf0  49 25 3e 34 20 8c 4b 25  3d 38 34 34 20 8b 4b 25  |I%>4 .K%=844 .K%|
00000c00  3d 35 36 0d 03 20 1b e3  4a 25 3d 31 b8 36 3a 58  |=56.. ..J%=1.6:X|
00000c10  25 3d 4b 25 2b 34 30 2a  28 4a 25 2d 31 29 0d 03  |%=K%+40*(J%-1)..|
00000c20  2a 1d 43 25 3d 43 25 28  49 25 2c 4a 25 29 3a 53  |*.C%=C%(I%,J%):S|
00000c30  25 3d 53 25 28 49 25 2c  4a 25 29 0d 03 34 09 f2  |%=S%(I%,J%)..4..|
00000c40  63 61 72 64 0d 03 3e 05  ed 0d 03 48 1d e7 49 25  |card..>....H..I%|
00000c50  3d 34 20 8c 59 25 3d 31  30 30 30 20 8b 59 25 3d  |=4 .Y%=1000 .Y%=|
00000c60  59 25 2d 32 32 34 0d 03  52 05 ed 0d 03 5c 23 ef  |Y%-224..R....\#.|
00000c70  32 36 2c 34 3a e3 6e 25  3d 31 b8 34 3a f1 8a 31  |26,4:.n%=1.4:..1|
00000c80  36 2c 6e 25 2a 37 2d 34  29 3b 6e 25 3a ed 0d 03  |6,n%*7-4);n%:...|
00000c90  66 2c e3 6e 25 3d 31 b8  38 3a e7 6e 25 3e 34 20  |f,.n%=1.8:.n%>4 |
00000ca0  8c 78 25 3d 32 35 3a 79  25 3d 6e 25 2d 34 20 8b  |.x%=25:y%=n%-4 .|
00000cb0  78 25 3d 30 3a 79 25 3d  6e 25 0d 03 70 1b f1 8a  |x%=0:y%=n%..p...|
00000cc0  78 25 2c 37 2a 79 25 2d  34 29 bd 28 36 34 2b 6e  |x%,7*y%-4).(64+n|
00000cd0  25 29 3b 3a ed 0d 03 7a  05 e1 0d 03 84 0b dd f2  |%);:...z........|
00000ce0  65 6e 74 65 72 0d 03 8e  19 f1 8a 36 2c 31 29 3b  |enter......6,1);|
00000cf0  22 4d 6f 76 65 20 66 72  6f 6d 3f 20 22 3b 0d 03  |"Move from? ";..|
00000d00  98 10 66 6c 61 67 25 3d  a3 3a f2 6b 65 79 0d 03  |..flag%=.:.key..|
00000d10  a2 0e e7 a6 2d 37 34 20  8c 20 e1 20 0d 03 ac 12  |....-74 . . ....|
00000d20  66 72 6f 6d 25 3d 97 28  4b 24 29 2d 36 34 0d 03  |from%=.(K$)-64..|
00000d30  b6 07 f1 4b 24 0d 03 c0  18 f1 8a 32 36 2c 31 29  |...K$......26,1)|
00000d40  3b 22 4d 6f 76 65 20 74  6f 3f 20 22 3b 0d 03 ca  |;"Move to? ";...|
00000d50  10 66 6c 61 67 25 3d b9  3a f2 6b 65 79 0d 03 d4  |.flag%=.:.key...|
00000d60  0d e7 a6 2d 37 34 20 8c  20 e1 0d 03 de 10 74 6f  |...-74 . .....to|
00000d70  25 3d 97 28 4b 24 29 2d  34 38 0d 03 e8 07 f1 4b  |%=.(K$)-48.....K|
00000d80  24 0d 03 f2 05 e1 0d 03  fc 09 dd f2 6b 65 79 0d  |$...........key.|
00000d90  04 06 40 f5 3a 4b 24 3d  bf 30 3a fd 4b 24 3e 3d  |..@.:K$=.0:.K$>=|
00000da0  22 41 22 20 80 4b 24 3c  3d 22 48 22 20 84 20 66  |"A" .K$<="H" . f|
00000db0  6c 61 67 25 20 80 20 28  4b 24 3e 3d 22 31 22 20  |lag% . (K$>="1" |
00000dc0  80 4b 24 3c 3d 22 34 22  29 20 84 a6 2d 37 34 0d  |.K$<="4") ..-74.|
00000dd0  04 10 05 e1 0d 04 1a 19  dd f2 63 68 65 63 6b 3a  |..........check:|
00000de0  6d 76 25 3d b9 3a 63 68  6b 32 25 3d a3 0d 04 24  |mv%=.:chk2%=...$|
00000df0  18 e7 44 25 28 66 72 6f  6d 25 29 3d 30 20 6d 76  |..D%(from%)=0 mv|
00000e00  25 3d a3 3a e1 0d 04 2e  14 e7 74 6f 25 3e 34 3a  |%=.:......to%>4:|
00000e10  f2 63 68 65 63 6b 32 3a  e1 0d 04 38 25 e7 53 25  |.check2:...8%.S%|
00000e20  28 66 72 6f 6d 25 2c 44  25 28 66 72 6f 6d 25 29  |(from%,D%(from%)|
00000e30  29 3c 3e 74 6f 25 20 6d  76 25 3d a3 3a e1 0d 04  |)<>to% mv%=.:...|
00000e40  42 2b e7 43 25 28 66 72  6f 6d 25 2c 44 25 28 66  |B+.C%(from%,D%(f|
00000e50  72 6f 6d 25 29 29 3c 3e  41 25 28 74 6f 25 29 2b  |rom%))<>A%(to%)+|
00000e60  31 20 6d 76 25 3d a3 3a  e1 0d 04 4c 05 e1 0d 04  |1 mv%=.:...L....|
00000e70  56 0c dd f2 63 68 65 63  6b 32 0d 04 60 0e 74 6f  |V...check2..`.to|
00000e80  25 3d 74 6f 25 2d 31 36  0d 04 6a 17 e7 44 25 28  |%=to%-16..j..D%(|
00000e90  74 6f 25 29 3d 31 36 20  6d 76 25 3d a3 3a e1 0d  |to%)=16 mv%=.:..|
00000ea0  04 74 1e e7 44 25 28 74  6f 25 29 3d 30 20 6d 76  |.t..D%(to%)=0 mv|
00000eb0  25 3d b9 3a 63 68 6b 32  25 3d b9 3a e1 0d 04 7e  |%=.:chk2%=.:...~|
00000ec0  33 e7 43 25 28 66 72 6f  6d 25 2c 44 25 28 66 72  |3.C%(from%,D%(fr|
00000ed0  6f 6d 25 29 29 2b 31 3c  3e 43 25 28 74 6f 25 2c  |om%))+1<>C%(to%,|
00000ee0  44 25 28 74 6f 25 29 29  20 6d 76 25 3d a3 3a e1  |D%(to%)) mv%=.:.|
00000ef0  0d 04 88 0b 63 68 6b 32  25 3d b9 0d 04 92 05 e1  |....chk2%=......|
00000f00  0d 04 9c 0a dd f2 6d 6f  76 65 0d 04 a6 33 43 31  |......move...3C1|
00000f10  25 3d 43 25 28 66 72 6f  6d 25 2c 44 25 28 66 72  |%=C%(from%,D%(fr|
00000f20  6f 6d 25 29 29 3a 53 31  25 3d 53 25 28 66 72 6f  |om%)):S1%=S%(fro|
00000f30  6d 25 2c 44 25 28 66 72  6f 6d 25 29 29 0d 04 b0  |m%,D%(from%))...|
00000f40  2f 43 25 28 66 72 6f 6d  25 2c 44 25 28 66 72 6f  |/C%(from%,D%(fro|
00000f50  6d 25 29 29 3d 30 3a 53  25 28 66 72 6f 6d 25 2c  |m%))=0:S%(from%,|
00000f60  44 25 28 66 72 6f 6d 25  29 29 3d 30 0d 04 ba 1e  |D%(from%))=0....|
00000f70  44 25 28 66 72 6f 6d 25  29 3d 44 25 28 66 72 6f  |D%(from%)=D%(fro|
00000f80  6d 25 29 2d 31 3a 5a 25  3d 31 0d 04 c4 20 e7 44  |m%)-1:Z%=1... .D|
00000f90  25 28 66 72 6f 6d 25 29  3e 36 20 8c 5a 25 3d 44  |%(from%)>6 .Z%=D|
00000fa0  25 28 66 72 6f 6d 25 29  2d 36 0d 04 ce 44 e7 66  |%(from%)-6...D.f|
00000fb0  72 6f 6d 25 3e 34 20 4b  25 3d 38 34 34 3a 59 25  |rom%>4 K%=844:Y%|
00000fc0  3d 31 32 32 34 2d 32 32  34 2a 28 66 72 6f 6d 25  |=1224-224*(from%|
00000fd0  2d 34 29 20 8b 4b 25 3d  35 36 3a 59 25 3d 31 32  |-4) .K%=56:Y%=12|
00000fe0  32 34 2d 32 32 34 2a 28  66 72 6f 6d 25 29 0d 04  |24-224*(from%)..|
00000ff0  d8 28 e6 30 2c 31 32 38  3a ef 32 34 2c 4b 25 3b  |.(.0,128:.24,K%;|
00001000  59 25 2d 31 39 37 3b 4b  25 2b 34 30 30 3b 59 25  |Y%-197;K%+400;Y%|
00001010  2b 31 30 3b 3a da 0d 04  e2 17 e7 20 44 25 28 66  |+10;:...... D%(f|
00001020  72 6f 6d 25 29 3d 30 20  e5 8d 54 54 45 0d 04 ec  |rom%)=0 ..TTE...|
00001030  2f 49 25 3d 66 72 6f 6d  25 3a e3 4a 25 3d 5a 25  |/I%=from%:.J%=Z%|
00001040  b8 20 44 25 28 66 72 6f  6d 25 29 3a 58 25 3d 4b  |. D%(from%):X%=K|
00001050  25 2b 34 30 2a 28 4a 25  2d 5a 25 29 0d 04 f6 1d  |%+40*(J%-Z%)....|
00001060  43 25 3d 43 25 28 49 25  2c 4a 25 29 3a 53 25 3d  |C%=C%(I%,J%):S%=|
00001070  53 25 28 49 25 2c 4a 25  29 0d 05 00 09 f2 63 61  |S%(I%,J%).....ca|
00001080  72 64 0d 05 0a 05 ed 0d  05 14 12 e7 63 68 6b 32  |rd..........chk2|
00001090  25 3d b9 20 e5 8d 44 50  45 0d 05 1e 15 41 25 28  |%=. ..DPE....A%(|
000010a0  74 6f 25 29 3d 41 25 28  74 6f 25 29 2b 31 0d 05  |to%)=A%(to%)+1..|
000010b0  28 1a 58 25 3d 35 36 30  3a 59 25 3d 31 32 32 34  |(.X%=560:Y%=1224|
000010c0  2d 32 32 34 2a 74 6f 25  0d 05 32 15 43 25 3d 41  |-224*to%..2.C%=A|
000010d0  25 28 74 6f 25 29 3a 53  25 3d 74 6f 25 0d 05 3c  |%(to%):S%=to%..<|
000010e0  09 f2 63 61 72 64 0d 05  46 05 e1 0d 05 50 1a 44  |..card..F....P.D|
000010f0  25 28 74 6f 25 29 3d 44  25 28 74 6f 25 29 2b 31  |%(to%)=D%(to%)+1|
00001100  3a 5a 25 3d 31 0d 05 5a  1c e7 20 44 25 28 74 6f  |:Z%=1..Z.. D%(to|
00001110  25 29 3e 37 20 5a 25 3d  44 25 28 74 6f 25 29 2d  |%)>7 Z%=D%(to%)-|
00001120  36 0d 05 64 2b 43 25 28  74 6f 25 2c 44 25 28 74  |6..d+C%(to%,D%(t|
00001130  6f 25 29 29 3d 43 31 25  3a 53 25 28 74 6f 25 2c  |o%))=C1%:S%(to%,|
00001140  44 25 28 74 6f 25 29 29  3d 53 31 25 0d 05 6e 3e  |D%(to%))=S1%..n>|
00001150  e7 74 6f 25 3e 34 20 4b  25 3d 38 34 34 3a 59 25  |.to%>4 K%=844:Y%|
00001160  3d 31 32 32 34 2d 32 32  34 2a 28 74 6f 25 2d 34  |=1224-224*(to%-4|
00001170  29 20 8b 4b 25 3d 35 36  3a 59 25 3d 31 32 32 34  |) .K%=56:Y%=1224|
00001180  2d 32 32 34 2a 28 74 6f  25 29 0d 05 78 28 e6 30  |-224*(to%)..x(.0|
00001190  2c 31 32 38 3a ef 32 34  2c 4b 25 3b 59 25 2d 31  |,128:.24,K%;Y%-1|
000011a0  39 37 3b 4b 25 2b 34 30  30 3b 59 25 2b 31 30 3b  |97;K%+400;Y%+10;|
000011b0  3a da 0d 05 82 2c 49 25  3d 74 6f 25 3a e3 4a 25  |:....,I%=to%:.J%|
000011c0  3d 5a 25 20 b8 20 44 25  28 74 6f 25 29 3a 58 25  |=Z% . D%(to%):X%|
000011d0  3d 4b 25 2b 34 30 2a 28  4a 25 2d 5a 25 29 0d 05  |=K%+40*(J%-Z%)..|
000011e0  8c 1d 43 25 3d 43 25 28  49 25 2c 4a 25 29 3a 53  |..C%=C%(I%,J%):S|
000011f0  25 3d 53 25 28 49 25 2c  4a 25 29 0d 05 96 09 f2  |%=S%(I%,J%).....|
00001200  63 61 72 64 0d 05 a0 05  ed 0d 05 aa 05 e1 0d 05  |card............|
00001210  b4 18 dd f2 77 69 6e 3a  ef 32 33 2c 31 2c 30 3b  |....win:.23,1,0;|
00001220  30 3b 30 3b 30 3b 0d 05  be 1e f1 8a 31 31 2c 34  |0;0;0;......11,4|
00001230  29 22 43 4f 4e 47 52 41  54 55 4c 41 54 49 4f 4e  |)"CONGRATULATION|
00001240  53 21 21 22 0d 05 c8 1e  f1 8a 31 31 2c 35 29 22  |S!!"......11,5)"|
00001250  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001260  2d 22 0d 05 d2 2b f1 8a  34 2c 38 29 22 59 6f 75  |-"...+..4,8)"You|
00001270  20 68 61 76 65 20 63 6f  6d 70 6c 65 74 65 64 20  | have completed |
00001280  74 68 61 74 20 64 65 61  6c 2e 2e 2e 22 0d 05 dc  |that deal..."...|
00001290  22 f1 8a 31 30 2c 31 32  29 22 41 6e 6f 74 68 65  |"..10,12)"Anothe|
000012a0  72 20 64 65 61 6c 3f 20  20 28 59 2f 4e 29 22 0d  |r deal?  (Y/N)".|
000012b0  05 e6 1b f5 3a 4b 24 3d  bf 30 3a fd 4b 24 3d 22  |....:K$=.0:.K$="|
000012c0  59 22 20 84 4b 24 3d 22  4e 22 0d 05 f0 05 e1 0d  |Y" .K$="N"......|
000012d0  05 fa 1d dd f2 69 6e 76  28 4c 25 29 3a 3f 26 35  |.....inv(L%):?&5|
000012e0  36 3d 4c 25 3a d6 26 39  30 30 3a e1 0d 06 04 05  |6=L%:.&900:.....|
000012f0  e1 0d 06 0e 07 ef 32 31  0d 06 18 52 2a 4b 2e 30  |......21...R*K.0|
00001300  20 2a 54 2e 7c 4d 46 4f  52 49 25 3d 30 54 4f 20  | *T.|MFORI%=0TO |
00001310  54 4f 50 2d 50 41 47 45  20 53 54 45 50 34 3a 49  |TOP-PAGE STEP4:I|
00001320  25 21 26 45 30 30 3d 49  25 21 50 41 47 45 3a 4e  |%!&E00=I%!PAGE:N|
00001330  45 58 54 7c 4d 50 41 47  45 3d 26 45 30 30 7c 4d  |EXT|MPAGE=&E00|M|
00001340  4f 4c 44 7c 4d 52 55 4e  7c 4d 0d 06 22 10 2a 46  |OLD|MRUN|M..".*F|
00001350  58 31 33 38 2c 30 2c 31  32 38 0d ff              |X138,0,128..|
0000135c
GAMES/CASTLE2.m0
GAMES/CASTLE2.m1
GAMES/CASTLE2.m2
GAMES/CASTLE2.m4
GAMES/CASTLE2.m5