Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_51.ADF » G/CASTLE

G/CASTLE

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_51.ADF
Filename: G/CASTLE
Read OK:
File size: 13DD bytes
Load address: FFFF0E00
Exec address: FFFF802B
Duplicates

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

File contents
   10REM **************************
   20REM Beleaguered Castle
   30REM By R.A.Dimond
   40REM (c) October 1992
   50REM Version 3, May 2000
   60REM **************************
   70ONERROR IF ERR=17 RUN ELSE MODE6:REPORT:PRINT" at line ";ERL:END
   80*FX21,0
   85*FX200,0
   90IF PAGE>&E00 GOTO1890
  100MODE1:VDU23,1,0;0;0;0;
  110VDU19,0,4;0;19,2,0;0;
  120DIM N%(48),c%(48),s%(48),C%(8,16),S%(8,16),A%(4),D%(8)
  130m$="":move%=0
  140REPEAT:VDU26,4:CLS:PROCrandom:PROCinit:PROCdeal:win%=FALSE
  150REPEAT:VDU26,4
  160PROCenter
  170IFINKEY-74 GOTO230
  180PROCcheck
  190IFmv%=FALSE THEN VDU7:m$=LEFT$(m$,LENm$-2):PRINTTAB(10,30)"You can't move there!";:TIME=0:REPEATUNTILTIME>300:PRINTTAB(4,30)SPC35:OSCLI"FX15":GOTO160
  200move%=move%+1:PROCfrom:PROCto
  210IFA%(1)=13 ANDA%(2)=13 ANDA%(3)=13 ANDA%(4)=13 THENwin%=TRUE
  220UNTILINKEY-74 ORwin%=TRUE
  230IFwin%=TRUE THEN TIME=0:REPEATUNTILTIME=500:MODE6:PROCwin
  240UNTIL0 ORK$="N"
  250END
  260:
  270DEFPROCtitle
  280VDU5:MOVE368,1000:PRINT"BELEAGUERED CASTLE"
  290MOVE368,968:PRINTSTRING$(18,"~")
  300ENDPROC
  310:
  320DEFPROCrandom
  330*FX15
  340PROCtitle
  350INPUT''"Enter Deal No. "M%
  360IFM%=0 M%=ABS(RND(-TIME))
  370G=RND(-M%)
  380FORI%=1TO48:N%(I%)=I%:NEXT:FORI%=48 TO2STEP-1:D%=RND(I%):T%=N%(D%):N%(D%)=N%(I%):N%(I%)=T%:NEXTI%
  390RESTORE:FORi%=1TO48:READc%(i%),s%(i%):NEXT
  400CLS
  410ENDPROC
  420DATA8,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
  430DATA10,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
  440:
  450DEFPROCinit
  460VDU5:PROCtitle
  470MOVE400,944:PRINT"Deal No. ";M%
  480FORn%=1TO4:A%(n%)=1:NEXT:FORn%=1TO8:D%(n%)=6:NEXT
  490X%=560:FORn%=1TO4:Y%=848-160*n%
  500C%=1:S%=n%:PROCcard(C%,S%)
  510NEXT
  520n%=1:FORI%=1TO8:FORJ%=1TO6
  530C%(I%,J%)=c%(N%(n%)):S%(I%,J%)=s%(N%(n%)):n%=n%+1
  540NEXT:NEXT
  550ENDPROC
  560:
  570DEFPROCfive
  580PRINT;CHR$241;CHR$8;CHR$10;CHR$240;CHR$8;CHR$10;
  590ENDPROC
  600:
  610DEFPROCcard(card%,suit%)
  620VDU5
  630IF(suit%=1 ORsuit%=3) col%=1 ELSEIF(suit%=2 ORsuit%=4) col%=2
  640suit%=suit%+223
  650VDU24,X%-4;Y%-4;X%+100;Y%+132;:GCOL0,131:CLG
  660GCOL0,2:MOVEX%-4,Y%-4:DRAWX%-4,Y%+132:DRAWX%+100,Y%+132:DRAWX%+100,Y%-4:DRAWX%-4,Y%-4
  670IFcard%=1 cd%=65
  680IFcard%=11 cd%=ASC"J"
  690IFcard%=12 cd%=ASC"Q"
  700IFcard%=13 cd%=ASC"K"
  710IFcard%>1 ANDcard%<10 cd%=card%+48
  720IFcard%=10 cd%=229
  730PROCp
  740PROCpp
  750ENDPROC
  760:
  770DEFPROCp
  780MOVEX%,Y%+28:GCOL0,col%:PRINT;CHR$suit%:MOVEX%,Y%+128:PRINT;CHR$cd%
  790MOVEX%+64,Y%+28:PRINT;CHR$cd%:MOVEX%+64,Y%+128:PRINT;CHR$suit%
  800ENDPROC
  810:
  820DEFPROCpp
  830IFcard%=1 MOVEX%+32,Y%+80:PRINT;CHR$suit%:ENDPROC
  840IFcard%=2 MOVEX%+32,Y%+120:PRINT;CHR$239;:MOVEX%+32,Y%+56:PRINT;CHR$239:ENDPROC
  850IFcard%=3 MOVEX%+32,Y%+120:PRINT;CHR$239;:MOVEX%+32,Y%+88:PRINT;CHR$239;:MOVEX%+32,Y%+56:PRINT;CHR$239:ENDPROC
  860IFcard%=4 MOVEX%+32,Y%+104:PRINT;CHR$240;:MOVEX%+32,Y%+40:PRINT;CHR$240:ENDPROC
  870IFcard%=5 MOVEX%+32,Y%+104:PRINT;CHR$240;:MOVEX%+32,Y%+88:PRINT;CHR$239;:MOVEX%+32,Y%+40:PRINT;CHR$240:ENDPROC
  880IFcard%=6 MOVEX%+32,Y%+104:PRINT;CHR$240;:MOVEX%+32,Y%+72:PRINT;CHR$240;:MOVEX%+32,Y%+40:PRINT;CHR$240:ENDPROC
  890IFcard%=7 MOVEX%+32,Y%+104:PROCfive:MOVEX%+32,Y%+40:PRINT;CHR$240:ENDPROC
  900IFcard%=8 MOVEX%+32,Y%+104:PRINT;CHR$241;:MOVEX%+32,Y%+72:PROCfive:ENDPROC
  910IFcard%=9 MOVEX%+32,Y%+112:PRINT;CHR$240;:MOVEX%+32,Y%+88:PROCfive:MOVEX%+32,Y%+32:PRINT;CHR$240:ENDPROC
  920IFcard%=10 MOVEX%+32,Y%+112:PROCfive:MOVEX%+32,Y%+66:PROCfive:ENDPROC
  930IFcard%=11 C$=CHR$242 ELSEIFcard%=12 C$=CHR$243 ELSEIFcard%=13 C$=CHR$244
  940IFcard%=11 D$=CHR$248+CHR$249+CHR$252 ELSEIFcard%=12 D$=CHR$248+CHR$250+CHR$252 ELSEIFcard%=13 D$=CHR$248+CHR$251+CHR$252
  950MOVEX%+32,Y%+128:PRINTC$
  960MOVEX%,Y%+96:PRINTCHR$245+CHR$246+CHR$247
  970GCOL0,0:MOVEX%,Y%+64:PRINTD$:GCOL0,col%
  980MOVEX%+32,Y%+32:PRINTCHR$253:ENDPROC
  990:
 1000DEFPROCdeal
 1010Y%=688:FORI%=1TO8
 1020IFI%>4 THENK%=848 ELSEK%=80
 1030FORJ%=1TO6:X%=K%+40*(J%-1)
 1040C%=C%(I%,J%):S%=S%(I%,J%)
 1050PROCcard(C%,S%)
 1060NEXT
 1070IFI%=4 THENY%=688 ELSEY%=Y%-160
 1080NEXT
 1090VDU4:FORn%=1TO4:PRINTTAB(16,n%*5+3);n%:NEXT
 1100FORn%=1TO8:IFn%>4 THENx%=25:y%=n%-4 ELSEx%=1:y%=n%
 1110PRINTTAB(x%,5*y%+3)CHR$(64+n%);:NEXT
 1120ENDPROC
 1130:
 1140DEFPROCenter
 1150PRINTTAB(14,28);"Move No. ";move%
 1160PRINTTAB(6,30);"Move from? ";
 1170flag%=FALSE:PROCkey
 1180IFK$="U" ENDPROC
 1190chk=TRUE
 1200from%=a%
 1210PRINTK$
 1220PRINTTAB(26,30);"Move to? ";
 1230flag%=TRUE:PROCkey
 1240to%=a%
 1250PRINTK$
 1260FORz%=1TO100:NEXT:PRINTTAB(4,30);SPC35
 1270ENDPROC
 1280:
 1290DEFPROCkey
 1300IFflag% A$="ABCDEFGH1234" ELSE A$="ABCDEFGHU"
 1310REPEAT:a%=INSTR(A$,GET$):UNTILa%
 1320K$=MID$(A$,a%,1)
 1330ENDPROC
 1340:
 1350DEFPROCcheck:mv%=TRUE
 1360IFD%(from%)=0 mv%=FALSE:ENDPROC
 1370IFto%<9:PROCcheck2:ENDPROC
 1380IFS%(from%,D%(from%))<>(to%-8) mv%=FALSE:ENDPROC
 1390IFC%(from%,D%(from%))<>A%(to%-8)+1 mv%=FALSE:ENDPROC
 1400ENDPROC
 1410:
 1420DEFPROCcheck2
 1430IFD%(to%)=16 mv%=FALSE:ENDPROC
 1440IFD%(to%)=0 mv%=TRUE:ENDPROC
 1450IFC%(from%,D%(from%))+1<>C%(to%,D%(to%)) mv%=FALSE:ENDPROC
 1460ENDPROC
 1470:
 1480DEFPROCfrom
 1490IFfrom%>8 GOTO1620
 1500C1%=C%(from%,D%(from%)):S1%=S%(from%,D%(from%))
 1510C%(from%,D%(from%))=0:S%(from%,D%(from%))=0
 1520D%(from%)=D%(from%)-1:Z%=1
 1530IFD%(from%)>6 THENZ%=D%(from%)-6
 1540IFfrom%>4 K%=848:Y%=848-160*(from%-4) ELSEK%=80:Y%=848-160*(from%)
 1550GCOL0,128:VDU24,K%-8;Y%-8;K%+400;Y%+150;:CLG
 1560IF D%(from%)=0 GOTO1610
 1570I%=from%:FORJ%=Z%TO D%(from%):X%=K%+40*(J%-Z%)
 1580C%=C%(I%,J%):S%=S%(I%,J%)
 1590PROCcard(C%,S%)
 1600NEXT
 1610ENDPROC
 1620from%=from%-8
 1630C1%=A%(from%):S1%=from%
 1640A%(from%)=A%(from%)-1
 1650X%=560:Y%=848-160*from%
 1660C%=A%(from%):S%=from%
 1670PROCcard(C%,S%)
 1680ENDPROC
 1690:
 1700DEFPROCto
 1710IFto%>8 GOTO1820
 1720D%(to%)=D%(to%)+1:Z%=1
 1730IF D%(to%)>7 Z%=D%(to%)-6
 1740C%(to%,D%(to%))=C1%:S%(to%,D%(to%))=S1%
 1750IFto%>4 K%=848:Y%=848-160*(to%-4) ELSEK%=80:Y%=848-160*(to%)
 1760GCOL0,128:VDU24,K%-8;Y%-8;K%+400;Y%+150;:CLG
 1770I%=to%:FORJ%=Z% TO D%(to%):X%=K%+40*(J%-Z%)
 1780C%=C%(I%,J%):S%=S%(I%,J%)
 1790PROCcard(C%,S%)
 1800NEXT
 1810ENDPROC
 1820to%=to%-8
 1830A%(to%)=A%(to%)+1
 1840X%=560:Y%=848-160*to%
 1850C%=A%(to%):S%=to%
 1860PROCcard(C%,S%)
 1870ENDPROC
 1880:
 1890*K.0 *T.|MFORI%=0TO TOP-PAGE STEP4:I%!&E00=I%!PAGE:NEXT|MPAGE=&E00|MOLD|MRUN|M
 1900*FX138,0,128
 1910END
 1920:
 1930DEFPROCwin:VDU23,1,0;0;0;0;
 1940PRINTTAB(11,4)"CONGRATULATIONS!!"
 1950PRINTTAB(11,5)"-----------------"
 1960PRINTTAB(4,8)"You have completed Deal no. ";M%
 1970PRINTTAB(13,10)"in ";move%;" moves"
 1980PRINTTAB(10,14)"Another deal?  (Y/N)"
 1990REPEAT:K$=INKEY$0:UNTILK$="Y" ORK$="N"
 2000move%=0:ENDPROC

 � **************************
� Beleaguered Castle
� By R.A.Dimond
(� (c) October 1992
2� Version 3, May 2000
< � **************************
F'� � �=17 � � �6:�:�" at line ";�:�
P*FX21,0
U*FX200,0
Z� �>&E00 �DbG
d�1:�23,1,0;0;0;0;
n�19,0,4;0;19,2,0;0;
x8� N%(48),c%(48),s%(48),C%(8,16),S%(8,16),A%(4),D%(8)
�m$="":move%=0
�(�:�26,4:�:�random:�init:�deal:win%=�
��:�26,4
�
�enter
��-74 �df@
�
�check
�c�mv%=� � �7:m$=�m$,�m$-2):�10,30)"You can't move there!";:�=0:���>300:�4,30)�35:�"FX15":�t`@
�move%=move%+1:�from:�to
�3�A%(1)=13 �A%(2)=13 �A%(3)=13 �A%(4)=13 �win%=�
���-74 �win%=�
�!�win%=� � �=0:���=500:�6:�win
��0 �K$="N"
��
:
��title
&�5:�368,1000:�"BELEAGUERED CASTLE"
"�368,968:��18,"~")
,�
6:
@��random
J	*FX15
T
�title
^�''"Enter Deal No. "M%
h�M%=0 M%=�(�(-�))
rG=�(-M%)
|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
�:
�
��init
�
�5:�title
��400,944:�"Deal No. ";M%
�)�n%=1�4:A%(n%)=1:�:�n%=1�8:D%(n%)=6:�
� X%=560:�n%=1�4:Y%=848-160*n%
�C%=1:S%=n%:�card(C%,S%)
��
n%=1:�I%=1�8:�J%=1�6
5C%(I%,J%)=c%(N%(n%)):S%(I%,J%)=s%(N%(n%)):n%=n%+1
�:�
&�
0:
:
��five
D�;�241;�8;�10;�240;�8;�10;
N�
X:
b��card(card%,suit%)
l�5
v:�(suit%=1 �suit%=3) col%=1 ��(suit%=2 �suit%=4) col%=2
�suit%=suit%+223
�)�24,X%-4;Y%-4;X%+100;Y%+132;:�0,131:�
�G�0,2:�X%-4,Y%-4:�X%-4,Y%+132:�X%+100,Y%+132:�X%+100,Y%-4:�X%-4,Y%-4
��card%=1 cd%=65
��card%=11 cd%=�"J"
��card%=12 cd%=�"Q"
��card%=13 cd%=�"K"
�#�card%>1 �card%<10 cd%=card%+48
��card%=10 cd%=229
��p
��pp
��
�:
��p
0�X%,Y%+28:�0,col%:�;�suit%:�X%,Y%+128:�;�cd%
.�X%+64,Y%+28:�;�cd%:�X%+64,Y%+128:�;�suit%
 �
*:
4��pp
>$�card%=1 �X%+32,Y%+80:�;�suit%:�
H8�card%=2 �X%+32,Y%+120:�;�239;:�X%+32,Y%+56:�;�239:�
RM�card%=3 �X%+32,Y%+120:�;�239;:�X%+32,Y%+88:�;�239;:�X%+32,Y%+56:�;�239:�
\8�card%=4 �X%+32,Y%+104:�;�240;:�X%+32,Y%+40:�;�240:�
fM�card%=5 �X%+32,Y%+104:�;�240;:�X%+32,Y%+88:�;�239;:�X%+32,Y%+40:�;�240:�
pM�card%=6 �X%+32,Y%+104:�;�240;:�X%+32,Y%+72:�;�240;:�X%+32,Y%+40:�;�240:�
z6�card%=7 �X%+32,Y%+104:�five:�X%+32,Y%+40:�;�240:�
�7�card%=8 �X%+32,Y%+104:�;�241;:�X%+32,Y%+72:�five:�
�K�card%=9 �X%+32,Y%+112:�;�240;:�X%+32,Y%+88:�five:�X%+32,Y%+32:�;�240:�
�6�card%=10 �X%+32,Y%+112:�five:�X%+32,Y%+66:�five:�
�;�card%=11 C$=�242 ��card%=12 C$=�243 ��card%=13 C$=�244
�Y�card%=11 D$=�248+�249+�252 ��card%=12 D$=�248+�250+�252 ��card%=13 D$=�248+�251+�252
��X%+32,Y%+128:�C$
��X%,Y%+96:�245+�246+�247
��0,0:�X%,Y%+64:�D$:�0,col%
��X%+32,Y%+32:�253:�
�:
�
��deal
�Y%=688:�I%=1�8
��I%>4 �K%=848 �K%=80
�J%=1�6:X%=K%+40*(J%-1)
C%=C%(I%,J%):S%=S%(I%,J%)
�card(C%,S%)
$�
.�I%=4 �Y%=688 �Y%=Y%-160
8�
B �4:�n%=1�4:�16,n%*5+3);n%:�
L,�n%=1�8:�n%>4 �x%=25:y%=n%-4 �x%=1:y%=n%
V�x%,5*y%+3)�(64+n%);:�
`�
j:
t��enter
~�14,28);"Move No. ";move%
��6,30);"Move from? ";
�flag%=�:�key
�
�K$="U" �
�	chk=�
�from%=a%
��K$
��26,30);"Move to? ";
�flag%=�:�key
�
to%=a%
��K$
��z%=1�100:�:�4,30);�35
��
:

	��key
-�flag% A$="ABCDEFGH1234" � A$="ABCDEFGHU"
�:a%=�A$,�):�a%
(K$=�A$,a%,1)
2�
<:
F��check:mv%=�
P�D%(from%)=0 mv%=�:�
Z�to%<9:�check2:�
d)�S%(from%,D%(from%))<>(to%-8) mv%=�:�
n-�C%(from%,D%(from%))<>A%(to%-8)+1 mv%=�:�
x�
�:
���check2
��D%(to%)=16 mv%=�:�
��D%(to%)=0 mv%=�:�
�3�C%(from%,D%(from%))+1<>C%(to%,D%(to%)) mv%=�:�
��
�:
�
��from
��from%>8 �DTF
�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
B�from%>4 K%=848:Y%=848-160*(from%-4) �K%=80:Y%=848-160*(from%)
)�0,128:�24,K%-8;Y%-8;K%+400;Y%+150;:�
� D%(from%)=0 �DJF
"/I%=from%:�J%=Z%� D%(from%):X%=K%+40*(J%-Z%)
,C%=C%(I%,J%):S%=S%(I%,J%)
6�card(C%,S%)
@�
J�
Tfrom%=from%-8
^C1%=A%(from%):S1%=from%
hA%(from%)=A%(from%)-1
rX%=560:Y%=848-160*from%
|C%=A%(from%):S%=from%
��card(C%,S%)
��
�:
���to
��to%>8 �T\G
�D%(to%)=D%(to%)+1:Z%=1
�� D%(to%)>7 Z%=D%(to%)-6
�+C%(to%,D%(to%))=C1%:S%(to%,D%(to%))=S1%
�<�to%>4 K%=848:Y%=848-160*(to%-4) �K%=80:Y%=848-160*(to%)
�)�0,128:�24,K%-8;Y%-8;K%+400;Y%+150;:�
�,I%=to%:�J%=Z% � D%(to%):X%=K%+40*(J%-Z%)
�C%=C%(I%,J%):S%=S%(I%,J%)
��card(C%,S%)
�
�

to%=to%-8
&A%(to%)=A%(to%)+1
0X%=560:Y%=848-160*to%
:C%=A%(to%):S%=to%
D�card(C%,S%)
N�
X:
bR*K.0 *T.|MFORI%=0TO TOP-PAGE STEP4:I%!&E00=I%!PAGE:NEXT|MPAGE=&E00|MOLD|MRUN|M
l*FX138,0,128
v�
�:
���win:�23,1,0;0;0;0;
��11,4)"CONGRATULATIONS!!"
��11,5)"-----------------"
�+�4,8)"You have completed Deal no. ";M%
� �13,10)"in ";move%;" moves"
�"�10,14)"Another deal?  (Y/N)"
��:K$=�0:�K$="Y" �K$="N"
�
move%=0:�
�
00000000  0d 00 0a 20 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  0d 00 14 18 f4 20 42 65  6c 65 61 67 75 65 72 65  |..... Beleaguere|
00000030  64 20 43 61 73 74 6c 65  0d 00 1e 13 f4 20 42 79  |d Castle..... By|
00000040  20 52 2e 41 2e 44 69 6d  6f 6e 64 0d 00 28 16 f4  | R.A.Dimond..(..|
00000050  20 28 63 29 20 4f 63 74  6f 62 65 72 20 31 39 39  | (c) October 199|
00000060  32 0d 00 32 19 f4 20 56  65 72 73 69 6f 6e 20 33  |2..2.. Version 3|
00000070  2c 20 4d 61 79 20 32 30  30 30 0d 00 3c 20 f4 20  |, May 2000..< . |
00000080  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00000090  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 0d 00 46 27 ee 85  |**********..F'..|
000000a0  20 e7 20 9f 3d 31 37 20  f9 20 8b 20 eb 36 3a f6  | . .=17 . . .6:.|
000000b0  3a f1 22 20 61 74 20 6c  69 6e 65 20 22 3b 9e 3a  |:." at line ";.:|
000000c0  e0 0d 00 50 0b 2a 46 58  32 31 2c 30 0d 00 55 0c  |...P.*FX21,0..U.|
000000d0  2a 46 58 32 30 30 2c 30  0d 00 5a 12 e7 20 90 3e  |*FX200,0..Z.. .>|
000000e0  26 45 30 30 20 e5 8d 44  62 47 0d 00 64 15 eb 31  |&E00 ..DbG..d..1|
000000f0  3a ef 32 33 2c 31 2c 30  3b 30 3b 30 3b 30 3b 0d  |:.23,1,0;0;0;0;.|
00000100  00 6e 17 ef 31 39 2c 30  2c 34 3b 30 3b 31 39 2c  |.n..19,0,4;0;19,|
00000110  32 2c 30 3b 30 3b 0d 00  78 38 de 20 4e 25 28 34  |2,0;0;..x8. N%(4|
00000120  38 29 2c 63 25 28 34 38  29 2c 73 25 28 34 38 29  |8),c%(48),s%(48)|
00000130  2c 43 25 28 38 2c 31 36  29 2c 53 25 28 38 2c 31  |,C%(8,16),S%(8,1|
00000140  36 29 2c 41 25 28 34 29  2c 44 25 28 38 29 0d 00  |6),A%(4),D%(8)..|
00000150  82 11 6d 24 3d 22 22 3a  6d 6f 76 65 25 3d 30 0d  |..m$="":move%=0.|
00000160  00 8c 28 f5 3a ef 32 36  2c 34 3a db 3a f2 72 61  |..(.:.26,4:.:.ra|
00000170  6e 64 6f 6d 3a f2 69 6e  69 74 3a f2 64 65 61 6c  |ndom:.init:.deal|
00000180  3a 77 69 6e 25 3d a3 0d  00 96 0b f5 3a ef 32 36  |:win%=......:.26|
00000190  2c 34 0d 00 a0 0a f2 65  6e 74 65 72 0d 00 aa 0f  |,4.....enter....|
000001a0  e7 a6 2d 37 34 20 e5 8d  64 66 40 0d 00 b4 0a f2  |..-74 ..df@.....|
000001b0  63 68 65 63 6b 0d 00 be  63 e7 6d 76 25 3d a3 20  |check...c.mv%=. |
000001c0  8c 20 ef 37 3a 6d 24 3d  c0 6d 24 2c a9 6d 24 2d  |. .7:m$=.m$,.m$-|
000001d0  32 29 3a f1 8a 31 30 2c  33 30 29 22 59 6f 75 20  |2):..10,30)"You |
000001e0  63 61 6e 27 74 20 6d 6f  76 65 20 74 68 65 72 65  |can't move there|
000001f0  21 22 3b 3a d1 3d 30 3a  f5 fd 91 3e 33 30 30 3a  |!";:.=0:...>300:|
00000200  f1 8a 34 2c 33 30 29 89  33 35 3a ff 22 46 58 31  |..4,30).35:."FX1|
00000210  35 22 3a e5 8d 74 60 40  0d 00 c8 1b 6d 6f 76 65  |5":..t`@....move|
00000220  25 3d 6d 6f 76 65 25 2b  31 3a f2 66 72 6f 6d 3a  |%=move%+1:.from:|
00000230  f2 74 6f 0d 00 d2 33 e7  41 25 28 31 29 3d 31 33  |.to...3.A%(1)=13|
00000240  20 80 41 25 28 32 29 3d  31 33 20 80 41 25 28 33  | .A%(2)=13 .A%(3|
00000250  29 3d 31 33 20 80 41 25  28 34 29 3d 31 33 20 8c  |)=13 .A%(4)=13 .|
00000260  77 69 6e 25 3d b9 0d 00  dc 11 fd a6 2d 37 34 20  |win%=.......-74 |
00000270  84 77 69 6e 25 3d b9 0d  00 e6 21 e7 77 69 6e 25  |.win%=....!.win%|
00000280  3d b9 20 8c 20 d1 3d 30  3a f5 fd 91 3d 35 30 30  |=. . .=0:...=500|
00000290  3a eb 36 3a f2 77 69 6e  0d 00 f0 0e fd 30 20 84  |:.6:.win.....0 .|
000002a0  4b 24 3d 22 4e 22 0d 00  fa 05 e0 0d 01 04 05 3a  |K$="N".........:|
000002b0  0d 01 0e 0b dd f2 74 69  74 6c 65 0d 01 18 26 ef  |......title...&.|
000002c0  35 3a ec 33 36 38 2c 31  30 30 30 3a f1 22 42 45  |5:.368,1000:."BE|
000002d0  4c 45 41 47 55 45 52 45  44 20 43 41 53 54 4c 45  |LEAGUERED CASTLE|
000002e0  22 0d 01 22 16 ec 33 36  38 2c 39 36 38 3a f1 c4  |".."..368,968:..|
000002f0  31 38 2c 22 7e 22 29 0d  01 2c 05 e1 0d 01 36 05  |18,"~")..,....6.|
00000300  3a 0d 01 40 0c dd f2 72  61 6e 64 6f 6d 0d 01 4a  |:..@...random..J|
00000310  09 2a 46 58 31 35 0d 01  54 0a f2 74 69 74 6c 65  |.*FX15..T..title|
00000320  0d 01 5e 1a e8 27 27 22  45 6e 74 65 72 20 44 65  |..^..''"Enter De|
00000330  61 6c 20 4e 6f 2e 20 22  4d 25 0d 01 68 15 e7 4d  |al No. "M%..h..M|
00000340  25 3d 30 20 4d 25 3d 94  28 b3 28 2d 91 29 29 0d  |%=0 M%=.(.(-.)).|
00000350  01 72 0c 47 3d b3 28 2d  4d 25 29 0d 01 7c 54 e3  |.r.G=.(-M%)..|T.|
00000360  49 25 3d 31 b8 34 38 3a  4e 25 28 49 25 29 3d 49  |I%=1.48:N%(I%)=I|
00000370  25 3a ed 3a e3 49 25 3d  34 38 20 b8 32 88 2d 31  |%:.:.I%=48 .2.-1|
00000380  3a 44 25 3d b3 28 49 25  29 3a 54 25 3d 4e 25 28  |:D%=.(I%):T%=N%(|
00000390  44 25 29 3a 4e 25 28 44  25 29 3d 4e 25 28 49 25  |D%):N%(D%)=N%(I%|
000003a0  29 3a 4e 25 28 49 25 29  3d 54 25 3a ed 49 25 0d  |):N%(I%)=T%:.I%.|
000003b0  01 86 1f f7 3a e3 69 25  3d 31 b8 34 38 3a f3 63  |....:.i%=1.48:.c|
000003c0  25 28 69 25 29 2c 73 25  28 69 25 29 3a ed 0d 01  |%(i%),s%(i%):...|
000003d0  90 05 db 0d 01 9a 05 e1  0d 01 a4 6c dc 38 2c 31  |...........l.8,1|
000003e0  2c 33 2c 32 2c 31 31 2c  34 2c 31 32 2c 31 2c 34  |,3,2,11,4,12,1,4|
000003f0  2c 32 2c 39 2c 31 2c 36  2c 32 2c 32 2c 33 2c 37  |,2,9,1,6,2,2,3,7|
00000400  2c 33 2c 31 30 2c 33 2c  35 2c 32 2c 31 33 2c 32  |,3,10,3,5,2,13,2|
00000410  2c 35 2c 31 2c 32 2c 34  2c 31 30 2c 32 2c 38 2c  |,5,1,2,4,10,2,8,|
00000420  32 2c 36 2c 31 2c 33 2c  31 2c 39 2c 34 2c 31 31  |2,6,1,3,1,9,4,11|
00000430  2c 33 2c 37 2c 32 2c 31  33 2c 34 2c 34 2c 33 2c  |,3,7,2,13,4,4,3,|
00000440  31 32 2c 32 0d 01 ae 6c  dc 31 30 2c 31 2c 31 32  |12,2...l.10,1,12|
00000450  2c 34 2c 34 2c 31 2c 31  33 2c 31 2c 38 2c 33 2c  |,4,4,1,13,1,8,3,|
00000460  32 2c 31 2c 37 2c 31 2c  31 31 2c 32 2c 33 2c 34  |2,1,7,1,11,2,3,4|
00000470  2c 39 2c 32 2c 36 2c 34  2c 31 33 2c 33 2c 37 2c  |,9,2,6,4,13,3,7,|
00000480  34 2c 32 2c 32 2c 31 31  2c 31 2c 35 2c 33 2c 39  |4,2,2,11,1,5,3,9|
00000490  2c 33 2c 36 2c 33 2c 34  2c 34 2c 31 30 2c 34 2c  |,3,6,3,4,4,10,4,|
000004a0  33 2c 33 2c 38 2c 34 2c  35 2c 34 2c 31 32 2c 33  |3,3,8,4,5,4,12,3|
000004b0  0d 01 b8 05 3a 0d 01 c2  0a dd f2 69 6e 69 74 0d  |....:......init.|
000004c0  01 cc 0d ef 35 3a f2 74  69 74 6c 65 0d 01 d6 1c  |....5:.title....|
000004d0  ec 34 30 30 2c 39 34 34  3a f1 22 44 65 61 6c 20  |.400,944:."Deal |
000004e0  4e 6f 2e 20 22 3b 4d 25  0d 01 e0 29 e3 6e 25 3d  |No. ";M%...).n%=|
000004f0  31 b8 34 3a 41 25 28 6e  25 29 3d 31 3a ed 3a e3  |1.4:A%(n%)=1:.:.|
00000500  6e 25 3d 31 b8 38 3a 44  25 28 6e 25 29 3d 36 3a  |n%=1.8:D%(n%)=6:|
00000510  ed 0d 01 ea 20 58 25 3d  35 36 30 3a e3 6e 25 3d  |.... X%=560:.n%=|
00000520  31 b8 34 3a 59 25 3d 38  34 38 2d 31 36 30 2a 6e  |1.4:Y%=848-160*n|
00000530  25 0d 01 f4 1b 43 25 3d  31 3a 53 25 3d 6e 25 3a  |%....C%=1:S%=n%:|
00000540  f2 63 61 72 64 28 43 25  2c 53 25 29 0d 01 fe 05  |.card(C%,S%)....|
00000550  ed 0d 02 08 18 6e 25 3d  31 3a e3 49 25 3d 31 b8  |.....n%=1:.I%=1.|
00000560  38 3a e3 4a 25 3d 31 b8  36 0d 02 12 35 43 25 28  |8:.J%=1.6...5C%(|
00000570  49 25 2c 4a 25 29 3d 63  25 28 4e 25 28 6e 25 29  |I%,J%)=c%(N%(n%)|
00000580  29 3a 53 25 28 49 25 2c  4a 25 29 3d 73 25 28 4e  |):S%(I%,J%)=s%(N|
00000590  25 28 6e 25 29 29 3a 6e  25 3d 6e 25 2b 31 0d 02  |%(n%)):n%=n%+1..|
000005a0  1c 07 ed 3a ed 0d 02 26  05 e1 0d 02 30 05 3a 0d  |...:...&....0.:.|
000005b0  02 3a 0a dd f2 66 69 76  65 0d 02 44 1e f1 3b bd  |.:...five..D..;.|
000005c0  32 34 31 3b bd 38 3b bd  31 30 3b bd 32 34 30 3b  |241;.8;.10;.240;|
000005d0  bd 38 3b bd 31 30 3b 0d  02 4e 05 e1 0d 02 58 05  |.8;.10;..N....X.|
000005e0  3a 0d 02 62 17 dd f2 63  61 72 64 28 63 61 72 64  |:..b...card(card|
000005f0  25 2c 73 75 69 74 25 29  0d 02 6c 06 ef 35 0d 02  |%,suit%)..l..5..|
00000600  76 3a e7 28 73 75 69 74  25 3d 31 20 84 73 75 69  |v:.(suit%=1 .sui|
00000610  74 25 3d 33 29 20 63 6f  6c 25 3d 31 20 8b e7 28  |t%=3) col%=1 ..(|
00000620  73 75 69 74 25 3d 32 20  84 73 75 69 74 25 3d 34  |suit%=2 .suit%=4|
00000630  29 20 63 6f 6c 25 3d 32  0d 02 80 13 73 75 69 74  |) col%=2....suit|
00000640  25 3d 73 75 69 74 25 2b  32 32 33 0d 02 8a 29 ef  |%=suit%+223...).|
00000650  32 34 2c 58 25 2d 34 3b  59 25 2d 34 3b 58 25 2b  |24,X%-4;Y%-4;X%+|
00000660  31 30 30 3b 59 25 2b 31  33 32 3b 3a e6 30 2c 31  |100;Y%+132;:.0,1|
00000670  33 31 3a da 0d 02 94 47  e6 30 2c 32 3a ec 58 25  |31:....G.0,2:.X%|
00000680  2d 34 2c 59 25 2d 34 3a  df 58 25 2d 34 2c 59 25  |-4,Y%-4:.X%-4,Y%|
00000690  2b 31 33 32 3a df 58 25  2b 31 30 30 2c 59 25 2b  |+132:.X%+100,Y%+|
000006a0  31 33 32 3a df 58 25 2b  31 30 30 2c 59 25 2d 34  |132:.X%+100,Y%-4|
000006b0  3a df 58 25 2d 34 2c 59  25 2d 34 0d 02 9e 13 e7  |:.X%-4,Y%-4.....|
000006c0  63 61 72 64 25 3d 31 20  63 64 25 3d 36 35 0d 02  |card%=1 cd%=65..|
000006d0  a8 16 e7 63 61 72 64 25  3d 31 31 20 63 64 25 3d  |...card%=11 cd%=|
000006e0  97 22 4a 22 0d 02 b2 16  e7 63 61 72 64 25 3d 31  |."J".....card%=1|
000006f0  32 20 63 64 25 3d 97 22  51 22 0d 02 bc 16 e7 63  |2 cd%=."Q".....c|
00000700  61 72 64 25 3d 31 33 20  63 64 25 3d 97 22 4b 22  |ard%=13 cd%=."K"|
00000710  0d 02 c6 23 e7 63 61 72  64 25 3e 31 20 80 63 61  |...#.card%>1 .ca|
00000720  72 64 25 3c 31 30 20 63  64 25 3d 63 61 72 64 25  |rd%<10 cd%=card%|
00000730  2b 34 38 0d 02 d0 15 e7  63 61 72 64 25 3d 31 30  |+48.....card%=10|
00000740  20 63 64 25 3d 32 32 39  0d 02 da 06 f2 70 0d 02  | cd%=229.....p..|
00000750  e4 07 f2 70 70 0d 02 ee  05 e1 0d 02 f8 05 3a 0d  |...pp.........:.|
00000760  03 02 07 dd f2 70 0d 03  0c 30 ec 58 25 2c 59 25  |.....p...0.X%,Y%|
00000770  2b 32 38 3a e6 30 2c 63  6f 6c 25 3a f1 3b bd 73  |+28:.0,col%:.;.s|
00000780  75 69 74 25 3a ec 58 25  2c 59 25 2b 31 32 38 3a  |uit%:.X%,Y%+128:|
00000790  f1 3b bd 63 64 25 0d 03  16 2e ec 58 25 2b 36 34  |.;.cd%.....X%+64|
000007a0  2c 59 25 2b 32 38 3a f1  3b bd 63 64 25 3a ec 58  |,Y%+28:.;.cd%:.X|
000007b0  25 2b 36 34 2c 59 25 2b  31 32 38 3a f1 3b bd 73  |%+64,Y%+128:.;.s|
000007c0  75 69 74 25 0d 03 20 05  e1 0d 03 2a 05 3a 0d 03  |uit%.. ....*.:..|
000007d0  34 08 dd f2 70 70 0d 03  3e 24 e7 63 61 72 64 25  |4...pp..>$.card%|
000007e0  3d 31 20 ec 58 25 2b 33  32 2c 59 25 2b 38 30 3a  |=1 .X%+32,Y%+80:|
000007f0  f1 3b bd 73 75 69 74 25  3a e1 0d 03 48 38 e7 63  |.;.suit%:...H8.c|
00000800  61 72 64 25 3d 32 20 ec  58 25 2b 33 32 2c 59 25  |ard%=2 .X%+32,Y%|
00000810  2b 31 32 30 3a f1 3b bd  32 33 39 3b 3a ec 58 25  |+120:.;.239;:.X%|
00000820  2b 33 32 2c 59 25 2b 35  36 3a f1 3b bd 32 33 39  |+32,Y%+56:.;.239|
00000830  3a e1 0d 03 52 4d e7 63  61 72 64 25 3d 33 20 ec  |:...RM.card%=3 .|
00000840  58 25 2b 33 32 2c 59 25  2b 31 32 30 3a f1 3b bd  |X%+32,Y%+120:.;.|
00000850  32 33 39 3b 3a ec 58 25  2b 33 32 2c 59 25 2b 38  |239;:.X%+32,Y%+8|
00000860  38 3a f1 3b bd 32 33 39  3b 3a ec 58 25 2b 33 32  |8:.;.239;:.X%+32|
00000870  2c 59 25 2b 35 36 3a f1  3b bd 32 33 39 3a e1 0d  |,Y%+56:.;.239:..|
00000880  03 5c 38 e7 63 61 72 64  25 3d 34 20 ec 58 25 2b  |.\8.card%=4 .X%+|
00000890  33 32 2c 59 25 2b 31 30  34 3a f1 3b bd 32 34 30  |32,Y%+104:.;.240|
000008a0  3b 3a ec 58 25 2b 33 32  2c 59 25 2b 34 30 3a f1  |;:.X%+32,Y%+40:.|
000008b0  3b bd 32 34 30 3a e1 0d  03 66 4d e7 63 61 72 64  |;.240:...fM.card|
000008c0  25 3d 35 20 ec 58 25 2b  33 32 2c 59 25 2b 31 30  |%=5 .X%+32,Y%+10|
000008d0  34 3a f1 3b bd 32 34 30  3b 3a ec 58 25 2b 33 32  |4:.;.240;:.X%+32|
000008e0  2c 59 25 2b 38 38 3a f1  3b bd 32 33 39 3b 3a ec  |,Y%+88:.;.239;:.|
000008f0  58 25 2b 33 32 2c 59 25  2b 34 30 3a f1 3b bd 32  |X%+32,Y%+40:.;.2|
00000900  34 30 3a e1 0d 03 70 4d  e7 63 61 72 64 25 3d 36  |40:...pM.card%=6|
00000910  20 ec 58 25 2b 33 32 2c  59 25 2b 31 30 34 3a f1  | .X%+32,Y%+104:.|
00000920  3b bd 32 34 30 3b 3a ec  58 25 2b 33 32 2c 59 25  |;.240;:.X%+32,Y%|
00000930  2b 37 32 3a f1 3b bd 32  34 30 3b 3a ec 58 25 2b  |+72:.;.240;:.X%+|
00000940  33 32 2c 59 25 2b 34 30  3a f1 3b bd 32 34 30 3a  |32,Y%+40:.;.240:|
00000950  e1 0d 03 7a 36 e7 63 61  72 64 25 3d 37 20 ec 58  |...z6.card%=7 .X|
00000960  25 2b 33 32 2c 59 25 2b  31 30 34 3a f2 66 69 76  |%+32,Y%+104:.fiv|
00000970  65 3a ec 58 25 2b 33 32  2c 59 25 2b 34 30 3a f1  |e:.X%+32,Y%+40:.|
00000980  3b bd 32 34 30 3a e1 0d  03 84 37 e7 63 61 72 64  |;.240:....7.card|
00000990  25 3d 38 20 ec 58 25 2b  33 32 2c 59 25 2b 31 30  |%=8 .X%+32,Y%+10|
000009a0  34 3a f1 3b bd 32 34 31  3b 3a ec 58 25 2b 33 32  |4:.;.241;:.X%+32|
000009b0  2c 59 25 2b 37 32 3a f2  66 69 76 65 3a e1 0d 03  |,Y%+72:.five:...|
000009c0  8e 4b e7 63 61 72 64 25  3d 39 20 ec 58 25 2b 33  |.K.card%=9 .X%+3|
000009d0  32 2c 59 25 2b 31 31 32  3a f1 3b bd 32 34 30 3b  |2,Y%+112:.;.240;|
000009e0  3a ec 58 25 2b 33 32 2c  59 25 2b 38 38 3a f2 66  |:.X%+32,Y%+88:.f|
000009f0  69 76 65 3a ec 58 25 2b  33 32 2c 59 25 2b 33 32  |ive:.X%+32,Y%+32|
00000a00  3a f1 3b bd 32 34 30 3a  e1 0d 03 98 36 e7 63 61  |:.;.240:....6.ca|
00000a10  72 64 25 3d 31 30 20 ec  58 25 2b 33 32 2c 59 25  |rd%=10 .X%+32,Y%|
00000a20  2b 31 31 32 3a f2 66 69  76 65 3a ec 58 25 2b 33  |+112:.five:.X%+3|
00000a30  32 2c 59 25 2b 36 36 3a  f2 66 69 76 65 3a e1 0d  |2,Y%+66:.five:..|
00000a40  03 a2 3b e7 63 61 72 64  25 3d 31 31 20 43 24 3d  |..;.card%=11 C$=|
00000a50  bd 32 34 32 20 8b e7 63  61 72 64 25 3d 31 32 20  |.242 ..card%=12 |
00000a60  43 24 3d bd 32 34 33 20  8b e7 63 61 72 64 25 3d  |C$=.243 ..card%=|
00000a70  31 33 20 43 24 3d bd 32  34 34 0d 03 ac 59 e7 63  |13 C$=.244...Y.c|
00000a80  61 72 64 25 3d 31 31 20  44 24 3d bd 32 34 38 2b  |ard%=11 D$=.248+|
00000a90  bd 32 34 39 2b bd 32 35  32 20 8b e7 63 61 72 64  |.249+.252 ..card|
00000aa0  25 3d 31 32 20 44 24 3d  bd 32 34 38 2b bd 32 35  |%=12 D$=.248+.25|
00000ab0  30 2b bd 32 35 32 20 8b  e7 63 61 72 64 25 3d 31  |0+.252 ..card%=1|
00000ac0  33 20 44 24 3d bd 32 34  38 2b bd 32 35 31 2b bd  |3 D$=.248+.251+.|
00000ad0  32 35 32 0d 03 b6 15 ec  58 25 2b 33 32 2c 59 25  |252.....X%+32,Y%|
00000ae0  2b 31 32 38 3a f1 43 24  0d 03 c0 1d ec 58 25 2c  |+128:.C$.....X%,|
00000af0  59 25 2b 39 36 3a f1 bd  32 34 35 2b bd 32 34 36  |Y%+96:..245+.246|
00000b00  2b bd 32 34 37 0d 03 ca  1e e6 30 2c 30 3a ec 58  |+.247.....0,0:.X|
00000b10  25 2c 59 25 2b 36 34 3a  f1 44 24 3a e6 30 2c 63  |%,Y%+64:.D$:.0,c|
00000b20  6f 6c 25 0d 03 d4 18 ec  58 25 2b 33 32 2c 59 25  |ol%.....X%+32,Y%|
00000b30  2b 33 32 3a f1 bd 32 35  33 3a e1 0d 03 de 05 3a  |+32:..253:.....:|
00000b40  0d 03 e8 0a dd f2 64 65  61 6c 0d 03 f2 12 59 25  |......deal....Y%|
00000b50  3d 36 38 38 3a e3 49 25  3d 31 b8 38 0d 03 fc 18  |=688:.I%=1.8....|
00000b60  e7 49 25 3e 34 20 8c 4b  25 3d 38 34 38 20 8b 4b  |.I%>4 .K%=848 .K|
00000b70  25 3d 38 30 0d 04 06 1b  e3 4a 25 3d 31 b8 36 3a  |%=80.....J%=1.6:|
00000b80  58 25 3d 4b 25 2b 34 30  2a 28 4a 25 2d 31 29 0d  |X%=K%+40*(J%-1).|
00000b90  04 10 1d 43 25 3d 43 25  28 49 25 2c 4a 25 29 3a  |...C%=C%(I%,J%):|
00000ba0  53 25 3d 53 25 28 49 25  2c 4a 25 29 0d 04 1a 10  |S%=S%(I%,J%)....|
00000bb0  f2 63 61 72 64 28 43 25  2c 53 25 29 0d 04 24 05  |.card(C%,S%)..$.|
00000bc0  ed 0d 04 2e 1c e7 49 25  3d 34 20 8c 59 25 3d 36  |......I%=4 .Y%=6|
00000bd0  38 38 20 8b 59 25 3d 59  25 2d 31 36 30 0d 04 38  |88 .Y%=Y%-160..8|
00000be0  05 ed 0d 04 42 20 ef 34  3a e3 6e 25 3d 31 b8 34  |....B .4:.n%=1.4|
00000bf0  3a f1 8a 31 36 2c 6e 25  2a 35 2b 33 29 3b 6e 25  |:..16,n%*5+3);n%|
00000c00  3a ed 0d 04 4c 2c e3 6e  25 3d 31 b8 38 3a e7 6e  |:...L,.n%=1.8:.n|
00000c10  25 3e 34 20 8c 78 25 3d  32 35 3a 79 25 3d 6e 25  |%>4 .x%=25:y%=n%|
00000c20  2d 34 20 8b 78 25 3d 31  3a 79 25 3d 6e 25 0d 04  |-4 .x%=1:y%=n%..|
00000c30  56 1b f1 8a 78 25 2c 35  2a 79 25 2b 33 29 bd 28  |V...x%,5*y%+3).(|
00000c40  36 34 2b 6e 25 29 3b 3a  ed 0d 04 60 05 e1 0d 04  |64+n%);:...`....|
00000c50  6a 05 3a 0d 04 74 0b dd  f2 65 6e 74 65 72 0d 04  |j.:..t...enter..|
00000c60  7e 1e f1 8a 31 34 2c 32  38 29 3b 22 4d 6f 76 65  |~...14,28);"Move|
00000c70  20 4e 6f 2e 20 22 3b 6d  6f 76 65 25 0d 04 88 1a  | No. ";move%....|
00000c80  f1 8a 36 2c 33 30 29 3b  22 4d 6f 76 65 20 66 72  |..6,30);"Move fr|
00000c90  6f 6d 3f 20 22 3b 0d 04  92 10 66 6c 61 67 25 3d  |om? ";....flag%=|
00000ca0  a3 3a f2 6b 65 79 0d 04  9c 0d e7 4b 24 3d 22 55  |.:.key.....K$="U|
00000cb0  22 20 e1 0d 04 a6 09 63  68 6b 3d b9 0d 04 b0 0c  |" .....chk=.....|
00000cc0  66 72 6f 6d 25 3d 61 25  0d 04 ba 07 f1 4b 24 0d  |from%=a%.....K$.|
00000cd0  04 c4 19 f1 8a 32 36 2c  33 30 29 3b 22 4d 6f 76  |.....26,30);"Mov|
00000ce0  65 20 74 6f 3f 20 22 3b  0d 04 ce 10 66 6c 61 67  |e to? ";....flag|
00000cf0  25 3d b9 3a f2 6b 65 79  0d 04 d8 0a 74 6f 25 3d  |%=.:.key....to%=|
00000d00  61 25 0d 04 e2 07 f1 4b  24 0d 04 ec 1b e3 7a 25  |a%.....K$.....z%|
00000d10  3d 31 b8 31 30 30 3a ed  3a f1 8a 34 2c 33 30 29  |=1.100:.:..4,30)|
00000d20  3b 89 33 35 0d 04 f6 05  e1 0d 05 00 05 3a 0d 05  |;.35.........:..|
00000d30  0a 09 dd f2 6b 65 79 0d  05 14 2d e7 66 6c 61 67  |....key...-.flag|
00000d40  25 20 41 24 3d 22 41 42  43 44 45 46 47 48 31 32  |% A$="ABCDEFGH12|
00000d50  33 34 22 20 8b 20 41 24  3d 22 41 42 43 44 45 46  |34" . A$="ABCDEF|
00000d60  47 48 55 22 0d 05 1e 13  f5 3a 61 25 3d a7 41 24  |GHU".....:a%=.A$|
00000d70  2c be 29 3a fd 61 25 0d  05 28 10 4b 24 3d c1 41  |,.):.a%..(.K$=.A|
00000d80  24 2c 61 25 2c 31 29 0d  05 32 05 e1 0d 05 3c 05  |$,a%,1)..2....<.|
00000d90  3a 0d 05 46 11 dd f2 63  68 65 63 6b 3a 6d 76 25  |:..F...check:mv%|
00000da0  3d b9 0d 05 50 18 e7 44  25 28 66 72 6f 6d 25 29  |=...P..D%(from%)|
00000db0  3d 30 20 6d 76 25 3d a3  3a e1 0d 05 5a 14 e7 74  |=0 mv%=.:...Z..t|
00000dc0  6f 25 3c 39 3a f2 63 68  65 63 6b 32 3a e1 0d 05  |o%<9:.check2:...|
00000dd0  64 29 e7 53 25 28 66 72  6f 6d 25 2c 44 25 28 66  |d).S%(from%,D%(f|
00000de0  72 6f 6d 25 29 29 3c 3e  28 74 6f 25 2d 38 29 20  |rom%))<>(to%-8) |
00000df0  6d 76 25 3d a3 3a e1 0d  05 6e 2d e7 43 25 28 66  |mv%=.:...n-.C%(f|
00000e00  72 6f 6d 25 2c 44 25 28  66 72 6f 6d 25 29 29 3c  |rom%,D%(from%))<|
00000e10  3e 41 25 28 74 6f 25 2d  38 29 2b 31 20 6d 76 25  |>A%(to%-8)+1 mv%|
00000e20  3d a3 3a e1 0d 05 78 05  e1 0d 05 82 05 3a 0d 05  |=.:...x......:..|
00000e30  8c 0c dd f2 63 68 65 63  6b 32 0d 05 96 17 e7 44  |....check2.....D|
00000e40  25 28 74 6f 25 29 3d 31  36 20 6d 76 25 3d a3 3a  |%(to%)=16 mv%=.:|
00000e50  e1 0d 05 a0 16 e7 44 25  28 74 6f 25 29 3d 30 20  |......D%(to%)=0 |
00000e60  6d 76 25 3d b9 3a e1 0d  05 aa 33 e7 43 25 28 66  |mv%=.:....3.C%(f|
00000e70  72 6f 6d 25 2c 44 25 28  66 72 6f 6d 25 29 29 2b  |rom%,D%(from%))+|
00000e80  31 3c 3e 43 25 28 74 6f  25 2c 44 25 28 74 6f 25  |1<>C%(to%,D%(to%|
00000e90  29 29 20 6d 76 25 3d a3  3a e1 0d 05 b4 05 e1 0d  |)) mv%=.:.......|
00000ea0  05 be 05 3a 0d 05 c8 0a  dd f2 66 72 6f 6d 0d 05  |...:......from..|
00000eb0  d2 12 e7 66 72 6f 6d 25  3e 38 20 e5 8d 44 54 46  |...from%>8 ..DTF|
00000ec0  0d 05 dc 33 43 31 25 3d  43 25 28 66 72 6f 6d 25  |...3C1%=C%(from%|
00000ed0  2c 44 25 28 66 72 6f 6d  25 29 29 3a 53 31 25 3d  |,D%(from%)):S1%=|
00000ee0  53 25 28 66 72 6f 6d 25  2c 44 25 28 66 72 6f 6d  |S%(from%,D%(from|
00000ef0  25 29 29 0d 05 e6 2f 43  25 28 66 72 6f 6d 25 2c  |%)).../C%(from%,|
00000f00  44 25 28 66 72 6f 6d 25  29 29 3d 30 3a 53 25 28  |D%(from%))=0:S%(|
00000f10  66 72 6f 6d 25 2c 44 25  28 66 72 6f 6d 25 29 29  |from%,D%(from%))|
00000f20  3d 30 0d 05 f0 1e 44 25  28 66 72 6f 6d 25 29 3d  |=0....D%(from%)=|
00000f30  44 25 28 66 72 6f 6d 25  29 2d 31 3a 5a 25 3d 31  |D%(from%)-1:Z%=1|
00000f40  0d 05 fa 20 e7 44 25 28  66 72 6f 6d 25 29 3e 36  |... .D%(from%)>6|
00000f50  20 8c 5a 25 3d 44 25 28  66 72 6f 6d 25 29 2d 36  | .Z%=D%(from%)-6|
00000f60  0d 06 04 42 e7 66 72 6f  6d 25 3e 34 20 4b 25 3d  |...B.from%>4 K%=|
00000f70  38 34 38 3a 59 25 3d 38  34 38 2d 31 36 30 2a 28  |848:Y%=848-160*(|
00000f80  66 72 6f 6d 25 2d 34 29  20 8b 4b 25 3d 38 30 3a  |from%-4) .K%=80:|
00000f90  59 25 3d 38 34 38 2d 31  36 30 2a 28 66 72 6f 6d  |Y%=848-160*(from|
00000fa0  25 29 0d 06 0e 29 e6 30  2c 31 32 38 3a ef 32 34  |%)...).0,128:.24|
00000fb0  2c 4b 25 2d 38 3b 59 25  2d 38 3b 4b 25 2b 34 30  |,K%-8;Y%-8;K%+40|
00000fc0  30 3b 59 25 2b 31 35 30  3b 3a da 0d 06 18 17 e7  |0;Y%+150;:......|
00000fd0  20 44 25 28 66 72 6f 6d  25 29 3d 30 20 e5 8d 44  | D%(from%)=0 ..D|
00000fe0  4a 46 0d 06 22 2f 49 25  3d 66 72 6f 6d 25 3a e3  |JF.."/I%=from%:.|
00000ff0  4a 25 3d 5a 25 b8 20 44  25 28 66 72 6f 6d 25 29  |J%=Z%. D%(from%)|
00001000  3a 58 25 3d 4b 25 2b 34  30 2a 28 4a 25 2d 5a 25  |:X%=K%+40*(J%-Z%|
00001010  29 0d 06 2c 1d 43 25 3d  43 25 28 49 25 2c 4a 25  |)..,.C%=C%(I%,J%|
00001020  29 3a 53 25 3d 53 25 28  49 25 2c 4a 25 29 0d 06  |):S%=S%(I%,J%)..|
00001030  36 10 f2 63 61 72 64 28  43 25 2c 53 25 29 0d 06  |6..card(C%,S%)..|
00001040  40 05 ed 0d 06 4a 05 e1  0d 06 54 11 66 72 6f 6d  |@....J....T.from|
00001050  25 3d 66 72 6f 6d 25 2d  38 0d 06 5e 1b 43 31 25  |%=from%-8..^.C1%|
00001060  3d 41 25 28 66 72 6f 6d  25 29 3a 53 31 25 3d 66  |=A%(from%):S1%=f|
00001070  72 6f 6d 25 0d 06 68 19  41 25 28 66 72 6f 6d 25  |rom%..h.A%(from%|
00001080  29 3d 41 25 28 66 72 6f  6d 25 29 2d 31 0d 06 72  |)=A%(from%)-1..r|
00001090  1b 58 25 3d 35 36 30 3a  59 25 3d 38 34 38 2d 31  |.X%=560:Y%=848-1|
000010a0  36 30 2a 66 72 6f 6d 25  0d 06 7c 19 43 25 3d 41  |60*from%..|.C%=A|
000010b0  25 28 66 72 6f 6d 25 29  3a 53 25 3d 66 72 6f 6d  |%(from%):S%=from|
000010c0  25 0d 06 86 10 f2 63 61  72 64 28 43 25 2c 53 25  |%.....card(C%,S%|
000010d0  29 0d 06 90 05 e1 0d 06  9a 05 3a 0d 06 a4 08 dd  |).........:.....|
000010e0  f2 74 6f 0d 06 ae 10 e7  74 6f 25 3e 38 20 e5 8d  |.to.....to%>8 ..|
000010f0  54 5c 47 0d 06 b8 1a 44  25 28 74 6f 25 29 3d 44  |T\G....D%(to%)=D|
00001100  25 28 74 6f 25 29 2b 31  3a 5a 25 3d 31 0d 06 c2  |%(to%)+1:Z%=1...|
00001110  1c e7 20 44 25 28 74 6f  25 29 3e 37 20 5a 25 3d  |.. D%(to%)>7 Z%=|
00001120  44 25 28 74 6f 25 29 2d  36 0d 06 cc 2b 43 25 28  |D%(to%)-6...+C%(|
00001130  74 6f 25 2c 44 25 28 74  6f 25 29 29 3d 43 31 25  |to%,D%(to%))=C1%|
00001140  3a 53 25 28 74 6f 25 2c  44 25 28 74 6f 25 29 29  |:S%(to%,D%(to%))|
00001150  3d 53 31 25 0d 06 d6 3c  e7 74 6f 25 3e 34 20 4b  |=S1%...<.to%>4 K|
00001160  25 3d 38 34 38 3a 59 25  3d 38 34 38 2d 31 36 30  |%=848:Y%=848-160|
00001170  2a 28 74 6f 25 2d 34 29  20 8b 4b 25 3d 38 30 3a  |*(to%-4) .K%=80:|
00001180  59 25 3d 38 34 38 2d 31  36 30 2a 28 74 6f 25 29  |Y%=848-160*(to%)|
00001190  0d 06 e0 29 e6 30 2c 31  32 38 3a ef 32 34 2c 4b  |...).0,128:.24,K|
000011a0  25 2d 38 3b 59 25 2d 38  3b 4b 25 2b 34 30 30 3b  |%-8;Y%-8;K%+400;|
000011b0  59 25 2b 31 35 30 3b 3a  da 0d 06 ea 2c 49 25 3d  |Y%+150;:....,I%=|
000011c0  74 6f 25 3a e3 4a 25 3d  5a 25 20 b8 20 44 25 28  |to%:.J%=Z% . D%(|
000011d0  74 6f 25 29 3a 58 25 3d  4b 25 2b 34 30 2a 28 4a  |to%):X%=K%+40*(J|
000011e0  25 2d 5a 25 29 0d 06 f4  1d 43 25 3d 43 25 28 49  |%-Z%)....C%=C%(I|
000011f0  25 2c 4a 25 29 3a 53 25  3d 53 25 28 49 25 2c 4a  |%,J%):S%=S%(I%,J|
00001200  25 29 0d 06 fe 10 f2 63  61 72 64 28 43 25 2c 53  |%).....card(C%,S|
00001210  25 29 0d 07 08 05 ed 0d  07 12 05 e1 0d 07 1c 0d  |%)..............|
00001220  74 6f 25 3d 74 6f 25 2d  38 0d 07 26 15 41 25 28  |to%=to%-8..&.A%(|
00001230  74 6f 25 29 3d 41 25 28  74 6f 25 29 2b 31 0d 07  |to%)=A%(to%)+1..|
00001240  30 19 58 25 3d 35 36 30  3a 59 25 3d 38 34 38 2d  |0.X%=560:Y%=848-|
00001250  31 36 30 2a 74 6f 25 0d  07 3a 15 43 25 3d 41 25  |160*to%..:.C%=A%|
00001260  28 74 6f 25 29 3a 53 25  3d 74 6f 25 0d 07 44 10  |(to%):S%=to%..D.|
00001270  f2 63 61 72 64 28 43 25  2c 53 25 29 0d 07 4e 05  |.card(C%,S%)..N.|
00001280  e1 0d 07 58 05 3a 0d 07  62 52 2a 4b 2e 30 20 2a  |...X.:..bR*K.0 *|
00001290  54 2e 7c 4d 46 4f 52 49  25 3d 30 54 4f 20 54 4f  |T.|MFORI%=0TO TO|
000012a0  50 2d 50 41 47 45 20 53  54 45 50 34 3a 49 25 21  |P-PAGE STEP4:I%!|
000012b0  26 45 30 30 3d 49 25 21  50 41 47 45 3a 4e 45 58  |&E00=I%!PAGE:NEX|
000012c0  54 7c 4d 50 41 47 45 3d  26 45 30 30 7c 4d 4f 4c  |T|MPAGE=&E00|MOL|
000012d0  44 7c 4d 52 55 4e 7c 4d  0d 07 6c 10 2a 46 58 31  |D|MRUN|M..l.*FX1|
000012e0  33 38 2c 30 2c 31 32 38  0d 07 76 05 e0 0d 07 80  |38,0,128..v.....|
000012f0  05 3a 0d 07 8a 18 dd f2  77 69 6e 3a ef 32 33 2c  |.:......win:.23,|
00001300  31 2c 30 3b 30 3b 30 3b  30 3b 0d 07 94 1e f1 8a  |1,0;0;0;0;......|
00001310  31 31 2c 34 29 22 43 4f  4e 47 52 41 54 55 4c 41  |11,4)"CONGRATULA|
00001320  54 49 4f 4e 53 21 21 22  0d 07 9e 1e f1 8a 31 31  |TIONS!!"......11|
00001330  2c 35 29 22 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |,5)"------------|
00001340  2d 2d 2d 2d 2d 22 0d 07  a8 2b f1 8a 34 2c 38 29  |-----"...+..4,8)|
00001350  22 59 6f 75 20 68 61 76  65 20 63 6f 6d 70 6c 65  |"You have comple|
00001360  74 65 64 20 44 65 61 6c  20 6e 6f 2e 20 22 3b 4d  |ted Deal no. ";M|
00001370  25 0d 07 b2 20 f1 8a 31  33 2c 31 30 29 22 69 6e  |%... ..13,10)"in|
00001380  20 22 3b 6d 6f 76 65 25  3b 22 20 6d 6f 76 65 73  | ";move%;" moves|
00001390  22 0d 07 bc 22 f1 8a 31  30 2c 31 34 29 22 41 6e  |"..."..10,14)"An|
000013a0  6f 74 68 65 72 20 64 65  61 6c 3f 20 20 28 59 2f  |other deal?  (Y/|
000013b0  4e 29 22 0d 07 c6 1b f5  3a 4b 24 3d bf 30 3a fd  |N)".....:K$=.0:.|
000013c0  4b 24 3d 22 59 22 20 84  4b 24 3d 22 4e 22 0d 07  |K$="Y" .K$="N"..|
000013d0  d0 0d 6d 6f 76 65 25 3d  30 3a e1 0d ff           |..move%=0:...|
000013dd
G/CASTLE.m0
G/CASTLE.m1
G/CASTLE.m2
G/CASTLE.m4
G/CASTLE.m5