Home » CEEFAX disks » telesoftware4.adl » 25-12-87/SQUARE2

25-12-87/SQUARE2

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 » telesoftware4.adl
Filename: 25-12-87/SQUARE2
Read OK:
File size: 1672 bytes
Load address: FFFF1900
Exec address: FFFF8023
Duplicates

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

File contents
   10REM**POKER SQUARE PART 2***
   20ON ERROR PROCerror
   30MODE7
   40PROCinit
   50PROCplayers
   60FORround=1TO3
   70FORgame=1TOplyrs
   80MODE2:VDU23;8202;0;0;0;:COLOUR130:CLS
   90PROCsort
  100PROCboard
  110FOR dc=1TO25:PROCtrans:PROCplace(13)
  120IF J=TRUE THEN PROCjoys ELSE PROCkeys
  130NEXT
  140PROCscore
  150PROCclear1
  160NEXT game
  170MODE7:VDU23;8202;0;0;0;:PROCscoreboard
  180NEXTround
  190*FX12
  200*FX210,0
  210END
  220DEFPROCplayers
  230FORa=5TO6:PRINTTAB(7,a)CHR$131CHR$141"One or two players ? ":NEXT:REPEAT:plyrs=GET-48:UNTIL plyrs=1OR plyrs=2
  240PRINT':FORa=1TOplyrs:PRINTCHR$(128+a)TAB(4)"Please enter name of player ";a:PRINTTAB(8)CHR$(128+a)"Up to ten letters"
  250INPUTTAB(12)name$(a)
  260IF LEN(name$(a))<1 OR LEN(name$(a))>10 VDU7:GOTO250
  270NEXT
  280PRINT''TAB(2)CHR$134"Cursor 'K'eys or 'J'oysticks ?":REPEAT:A=GET:UNTIL A=74 OR A=75:IF A=74 THEN J=TRUE ELSE J=FALSE
  290PRINTCHR$134"Press ";:IF J=TRUE PRINT"trigger ";:ELSE PRINT"return ";
  300PRINT"when card is positioned."
  310PRINT''TAB(6)CHR$133"'Q' to switch off sound"TAB(7)CHR$133"any other key to begin":A=GET
  320IF A=81 THEN *FX210,1
  330ENDPROC
  340DEFPROCinit
  350DIM pack%(52),card$(25),suit$(5,5),number$(5,5),number%(5),suit%(5),same(1),flag%(13),score%(2,3),total(2),name$(2),scr$(2),tt$(2):X=RND(-TIME)
  360score$="":cur$=CHR$255+CHR$255:A%=9:B%=20:FLAG=0:twopr%=0:trio%=0:flhse%=0:pair%=0:*FX11,0
  370fs$=CHR$132+CHR$157+CHR$141+CHR$131+"          FINAL SCORE    "+CHR$10+STRING$(29,CHR$8)+CHR$132+CHR$157+CHR$141+CHR$131+"          FINAL SCORE    ":FORa=1TO2:total(a)=0:scr$(a)="":tt$(a)="":NEXT:*FX212,8
  380*FX213,150
  390*FX214,5
  400ENDPROC
  410DEFPROCsort
  420FORcrd=1TO52:pack%(crd)=crd:NEXT
  430ENDPROC
  440DEFPROCtrans
  450No=pack%(RND(52))
  460IF No=0 THEN 450
  470number=(No-1)MOD13+1
  480suit=(No-1)DIV13
  490IFsuit=2ORsuit=1COLOUR1ELSECOLOUR0
  500suit$=CHR$(suit+224):number$=STR$(number)
  510IFnumber$="10"number$=CHR$228
  520IFnumber$="11"number$="J"
  530IFnumber$="12"number$="Q"
  540IFnumber$="13"number$="K"
  550IFnumber$="1"number$="A"
  560card$(dc)=number$+suit$
  570pack%(No)=FALSE
  580VDU28,1,9,18,1:COLOUR131:CLS
  590PRINTTAB((9-LEN(name$(game))/2),3)name$(game)
  600PRINTTAB(1,5)"Card No.";dc;" is "card$(dc)
  610VDU26:COLOUR130
  620ENDPROC
  630DEFPROCboard:CLS
  640FORL=128TO608STEP96:MOVE160,L:DRAW1120,L:NEXT
  650FORL=160TO1120STEP192:MOVEL,128:DRAWL,608:NEXT
  660ENDPROC
  670DEFPROCplace(col%):PROCwait(.15):COLOURcol%:PRINTTAB(A%,B%-1)cur$:SOUND1,1,1,1:ENDPROC
  680DEFPROCjoys
  690REPEAT:IFgame=2game=3
  700IF ADVAL(game)/16>3500 AND A%>3 PROCplace(2): A%=A%-3:PROCplace(13)
  710IF ADVAL(game)/16<1500 AND A%<15 PROCplace(2):A%=A%+3:PROCplace(13)
  720IF ADVAL(game+1)/16>3500 AND B%>14 PROCplace(2):B%=B%-3:PROCplace(13)
  730IF ADVAL(game+1)/16<1500 AND B%<26 PROCplace(2):B%=B%+3:PROCplace(13)
  740IFgame=3 game=2
  750UNTILADVAL(0)ANDgame:PROCcheck(A%/3,(B% DIV3)-3)
  760IF FLAG=1 GOTO690 ELSECOLOUR2:PRINTTAB(A%,B%-1)cur$
  770IFsuit=2ORsuit=1 THENCOLOUR1 ELSE COLOUR0
  780PRINTTAB(A%,B%)card$(dc):A%=9:B%=20:ENDPROC
  790DEFPROCkeys
  800REPEAT
  810IF INKEY-26 AND A%>3 PROCplace(2): A%=A%-3:PROCplace(13)
  820IF INKEY-122 AND A%<15 PROCplace(2):A%=A%+3:PROCplace(13)
  830IF INKEY-58 AND B%>14 PROCplace(2):B%=B%-3:PROCplace(13)
  840IF INKEY-42 AND B%<26 PROCplace(2):B%=B%+3:PROCplace(13)
  850UNTIL INKEY-74:PROCcheck(A%/3,(B% DIV3)-3):IF FLAG=1 GOTO800 ELSECOLOUR2:PRINTTAB(A%,B%-1)cur$
  860IFsuit=2ORsuit=1 THENCOLOUR1 ELSE COLOUR0
  870PRINTTAB(A%,B%)card$(dc):A%=9:B%=20:ENDPROC 
  880DEFPROCwait(sec):*FX15
  890now=TIME:REPEAT:UNTIL TIME>now+sec*100:ENDPROC
  900DEFPROCcheck(a%,b%)
  910IF suit$(a%,b%)<>""PROCno:FLAG=1:ENDPROC
  920suit$(a%,b%)=suit$:number$(a%,b%)=number$:FLAG=0:ENDPROC
  930DEFPROCno:FORs%=1TO6:SOUND1,1,s%,2:NEXT:ENDPROC
  940DEFPROCscore:g=11
  950FORrow=1TO5:COLOUR11:g=g+3:PRINTTAB(1,g)CHR$229TAB(18,g)CHR$230:VDU7:PROCcalc(1):COLOUR2:COLOUR130:PRINTTAB(1,g)CHR$229TAB(18,g)CHR$230:NEXT
  960g=0:FORcol=1TO5:COLOUR11:g=g+3:PRINTTAB(g,11)CHR$231CHR$232TAB(g,29)CHR$233CHR$234:VDU7:PROCcalc(0):COLOUR2:COLOUR130:PRINTTAB(g,11)CHR$231CHR$232TAB(g,29)CHR$233CHR$234:NEXT
  970ENDPROC
  980DEFPROCcalc(t)
  990IF t=0THEN1010
 1000FORcol=1TO5:number%(col)=ASC(number$(col,row)):suit%(col)=ASC(suit$(col,row)):NEXT:GOTO1020
 1010FORrow=1TO5:number%(row)=ASC(number$(col,row)):suit%(row)=ASC(suit$(col,row)):NEXT
 1020PROCsub:PROCsort1:PROCcount:PROCrun:PROCwait(3):ENDPROC
 1030DEFPROCsort1
 1040FORpass=1TO4
 1050FORloop=pass+1TO5
 1060IFnumber%(pass)>number%(loop)THEN1080
 1070Temp=number%(pass):number%(pass)=number%(loop):number%(loop)=Temp
 1080NEXT:NEXT:ENDPROC
 1090DEFPROCrun
 1100IF same(0)=3ORsame(0)=2 PROCclear:PROCtrio
 1110IFflhse%=TRUE:PROCtot(500,"Full House"):flhse%=FALSE:ENDPROC
 1120IFtwopr%=TRUE PROCtot(100,"Two Pair"):twopr%=FALSE:ENDPROC
 1130IFright=4ANDsame(1)=4 PROCtot(1000,"Running Flush"):ENDPROC
 1140IFright=3 AND number%(5)=1 AND number%(4)=10 ANDsame(1)=4 PROCtot(1000,"Running Flush"):ENDPROC
 1150IFright=3 AND number%(5)=1 AND number%(4)=10 PROCtot(350,"Run"):ENDPROC
 1160IFright=4 PROCtot(350,"Run"):ENDPROC
 1170IFsame(0)=3 PROCtot(750,"Four of a kind"):ENDPROC
 1180IFsame(0)=2 PROCtot(200,"Three of a kind"):ENDPROC
 1190IFsame(0)=1 PROCtot(20,"One Pair"):ENDPROC
 1200IF same(1)=4 PROCtot(300,"Flush"):ENDPROC
 1210PROCtot(0,"NOTHING"):ENDPROC
 1220DEFPROCsub
 1230RESTORE1280:FOR L=1TO5:READ P,D
 1240FOR U=1TO5:IFnumber%(U)=P number%(U)=D
 1250NEXT:NEXT
 1260FORL=1TO5:number%(L)=number%(L)-48:NEXT
 1270ENDPROC
 1280DATA65,49,228,58,74,59,81,60,75,61
 1290DEFPROCcount:same(0)=0:same(1)=0:right=0
 1300FOR check=2TO5
 1310IFnumber%(check)=number%(check-1)THENsame(0)=same(0)+1
 1320IFsuit%(check)=suit%(check-1)THENsame(1)=same(1)+1
 1330IF number%(check)=number%(check-1)-1 right=right+1
 1340NEXT:ENDPROC
 1350DEFPROCtrio:FORn%=1TO13
 1360FORc%=1TO5
 1370IF number%(c%)=n% flag%(n%)=flag%(n%)+1
 1380NEXT:NEXT
 1390FORn%=1TO13
 1400IF flag%(n%)=2 pair%=TRUE
 1410IF flag%(n%)=3 trio%=TRUE
 1420NEXT
 1430IFpair%=TRUE AND trio%=TRUE flhse%=TRUE:GOTO1450
 1440IFpair%=TRUE twopr%=TRUE
 1450pair%=FALSE:trio%=FALSE
 1460ENDPROC
 1470DEFPROCclear:FORL=1TO13:flag%(L)=0:NEXT:ENDPROC
 1480DEFPROCclear1:FORk=1TO5
 1490FORp=1TO5:suit$(k,p)="":number$(k,p)=""
 1500NEXT:NEXT:ENDPROC
 1510DEFPROCtot(F%,rep$)
 1520score%(game,round)=score%(game,round)+F%:score$=rep$:VDU28,1,9,18,1:COLOUR134:CLS:COLOUR4:PRINTTAB(9-LEN(score$)/2,2)score$:COLOUR5:PRINTTAB(4,4)"scores:";F%:COLOUR3:PRINTTAB(4,6)"Total=";score%(game,round):VDU26:ENDPROC
 1530DEFPROCscoreboard:FORa=1TO2:total(a)=total(a)+score%(a,round):NEXT::IFround=3 PRINTTAB(0,1)fs$
 1540FORa=4TO5:PRINTTAB(6-LEN(name$(1))/2,a)CHR$130CHR$141name$(1)TAB(30-LEN(name$(2))/2,a)CHR$131CHR$141name$(2):NEXT
 1550FORrnd=1TOround:rnd$=CHR$129+CHR$157+CHR$141+CHR$135+"Round "+STR$(rnd)+"   "+CHR$156
 1560FORa=1TO2:PRINTTAB(12,rnd*5+a)rnd$:NEXT
 1570FORa=1TO2:scr$(a)=CHR$141+CHR$(132+a)+STR$(score%(a,rnd)):tt$(a)=CHR$135+CHR$157+CHR$141+CHR$132+STR$(total(a))+"    "+CHR$156:NEXT
 1580IF total(2)=0 tt$(2)="":scr$(2)=""
 1590FORx=1TO2:PRINTTAB(10-LEN(scr$(1)),rnd*5+x)scr$(1)TAB(34-LEN(scr$(2)),rnd*5+x)scr$(2):NEXT
 1600NEXT
 1610FORh=21TO22:PRINTTAB(2,h)tt$(1)TAB(26,h)tt$(2):NEXT
 1620IF round=3PROCwin
 1630IF J=TRUE PROCbut:ENDPROC
 1640A=GET:ENDPROC
 1650DEFPROCwin
 1660IF total(1)>total(2)THENPRINTTAB(0,4)CHR$136TAB(0,5)CHR$136TAB(22,4)CHR$137TAB(22,5)CHR$137 ELSE PRINTTAB(22,4)CHR$136TAB(22,5)CHR$136
 1670IF total(1)>total(2)THENPRINTTAB(0,21)CHR$136TAB(0,22)CHR$136TAB(22,21)CHR$137TAB(22,22)CHR$137 ELSE PRINTTAB(22,21)CHR$136TAB(22,22)CHR$136
 1680FORs%=0TO60:SOUND1,3,s%*2,1:NEXT
 1690SOUND0,4,4,5
 1700ENDPROC
 1710DEFPROCbut:REPEAT UNTIL ADVAL(0)AND 3:ENDPROC
 1720DEFPROCerror:*FX12
 1730*FX210
 1740VDU22,7:REPORT:PRINT" @ ";ERL
 1750STOP

�**POKER SQUARE PART 2***
� � �error
�7
(	�init
2�players
<�round=1�3
F�game=1�plyrs
P�2:�23;8202;0;0;0;:�130:�
Z	�sort
d
�board
n� dc=1�25:�trans:�place(13)
x� J=� � �joys � �keys
��
�
�score
��clear1
�
� game
�"�7:�23;8202;0;0;0;:�scoreboard
�
�round
�	*FX12
�*FX210,0
��
�
��players
�R�a=5�6:�7,a)�131�141"One or two players ? ":�:�:plyrs=�-48:� plyrs=1� plyrs=2
�^�':�a=1�plyrs:�(128+a)�4)"Please enter name of player ";a:�8)�(128+a)"Up to ten letters"
��12)name$(a)
-� �(name$(a))<1 � �(name$(a))>10 �7:�dz@
�
U�''�2)�134"Cursor 'K'eys or 'J'oysticks ?":�:A=�:� A=74 � A=75:� A=74 � J=� � J=�
"3�134"Press ";:� J=� �"trigger ";:� �"return ";
,�"when card is positioned."
6J�''�6)�133"'Q' to switch off sound"�7)�133"any other key to begin":A=�
@� A=81 � *FX210,1
J�
T
��init
^�� pack%(52),card$(25),suit$(5,5),number$(5,5),number%(5),suit%(5),same(1),flag%(13),score%(2,3),total(2),name$(2),scr$(2),tt$(2):X=�(-�)
hXscore$="":cur$=�255+�255:A%=9:B%=20:FLAG=0:twopr%=0:trio%=0:flhse%=0:pair%=0:*FX11,0
r�fs$=�132+�157+�141+�131+"          FINAL SCORE    "+�10+�29,�8)+�132+�157+�141+�131+"          FINAL SCORE    ":�a=1�2:total(a)=0:scr$(a)="":tt$(a)="":�:*FX212,8
|*FX213,150
�*FX214,5
��
�
��sort
��crd=1�52:pack%(crd)=crd:�
��
���trans
�No=pack%(�(52))
�� No=0 � �dBA
�number=(No-1)�13+1
�suit=(No-1)�13
��suit=2�suit=1�1��0
�'suit$=�(suit+224):number$=�(number)
��number$="10"number$=�228
�number$="11"number$="J"
�number$="12"number$="Q"
�number$="13"number$="K"
&�number$="1"number$="A"
0card$(dc)=number$+suit$
:pack%(No)=�
D�28,1,9,18,1:�131:�
N(�(9-�(name$(game))/2),3)name$(game)
X'�1,5)"Card No.";dc;" is "card$(dc)
b�26:�130
l�
v
��board:�
�"�L=128�608�96:�160,L:�1120,L:�
�#�L=160�1120�192:�L,128:�L,608:�
��
�<��place(col%):�wait(.15):�col%:�A%,B%-1)cur$:�1,1,1,1:�
�
��joys
��:�game=2game=3
�:� �(game)/16>3500 � A%>3 �place(2): A%=A%-3:�place(13)
�:� �(game)/16<1500 � A%<15 �place(2):A%=A%+3:�place(13)
�<� �(game+1)/16>3500 � B%>14 �place(2):B%=B%-3:�place(13)
�<� �(game+1)/16<1500 � B%<26 �place(2):B%=B%+3:�place(13)
��game=3 game=2
�%��(0)�game:�check(A%/3,(B% �3)-3)
�%� FLAG=1 �trB ��2:�A%,B%-1)cur$
�suit=2�suit=1 ��1 � �0
"�A%,B%)card$(dc):A%=9:B%=20:�

��keys
 �
*/� �-26 � A%>3 �place(2): A%=A%-3:�place(13)
40� �-122 � A%<15 �place(2):A%=A%+3:�place(13)
>/� �-58 � B%>14 �place(2):B%=B%-3:�place(13)
H/� �-42 � B%<26 �place(2):B%=B%+3:�place(13)
RC� �-74:�check(A%/3,(B% �3)-3):� FLAG=1 �T`C ��2:�A%,B%-1)cur$
\�suit=2�suit=1 ��1 � �0
f#�A%,B%)card$(dc):A%=9:B%=20:� 
p��wait(sec):*FX15
znow=�:�:� �>now+sec*100:�
���check(a%,b%)
�"� suit$(a%,b%)<>""�no:FLAG=1:�
�6suit$(a%,b%)=suit$:number$(a%,b%)=number$:FLAG=0:�
���no:�s%=1�6:�1,1,s%,2:�:�
���score:g=11
�V�row=1�5:�11:g=g+3:�1,g)�229�18,g)�230:�7:�calc(1):�2:�130:�1,g)�229�18,g)�230:�
�lg=0:�col=1�5:�11:g=g+3:�g,11)�231�232�g,29)�233�234:�7:�calc(0):�2:�130:�g,11)�231�232�g,29)�233�234:�
��
�
��calc(t)
�� t=0��drC
�R�col=1�5:number%(col)=�(number$(col,row)):suit%(col)=�(suit$(col,row)):�:�d|C
�L�row=1�5:number%(row)=�(number$(col,row)):suit%(row)=�(suit$(col,row)):�
�&�sub:�sort1:�count:�run:�wait(3):�
��sort1

�pass=1�4
�loop=pass+1�5
$%�number%(pass)>number%(loop)��TxD
.ETemp=number%(pass):number%(pass)=number%(loop):number%(loop)=Temp
8	�:�:�
B	��run
L&� same(0)=3�same(0)=2 �clear:�trio
V/�flhse%=�:�tot(500,"Full House"):flhse%=�:�
`-�twopr%=� �tot(100,"Two Pair"):twopr%=�:�
j3�right=4�same(1)=4 �tot(1000,"Running Flush"):�
tS�right=3 � number%(5)=1 � number%(4)=10 �same(1)=4 �tot(1000,"Running Flush"):�
~=�right=3 � number%(5)=1 � number%(4)=10 �tot(350,"Run"):�
��right=4 �tot(350,"Run"):�
�+�same(0)=3 �tot(750,"Four of a kind"):�
�,�same(0)=2 �tot(200,"Three of a kind"):�
�$�same(0)=1 �tot(20,"One Pair"):�
�#� same(1)=4 �tot(300,"Flush"):�
��tot(0,"NOTHING"):�
�	��sub
���T@E:� L=1�5:� P,D
�&� U=1�5:�number%(U)=P number%(U)=D
��:�
�%�L=1�5:number%(L)=number%(L)-48:�
��
#�65,49,228,58,74,59,81,60,75,61

'��count:same(0)=0:same(1)=0:right=0
� check=2�5
6�number%(check)=number%(check-1)�same(0)=same(0)+1
(2�suit%(check)=suit%(check-1)�same(1)=same(1)+1
25� number%(check)=number%(check-1)-1 right=right+1
<�:�
F��trio:�n%=1�13
P�c%=1�5
Z*� number%(c%)=n% flag%(n%)=flag%(n%)+1
d�:�
n�n%=1�13
x� flag%(n%)=2 pair%=�
�� flag%(n%)=3 trio%=�
��
�%�pair%=� � trio%=� flhse%=�:�tjE
��pair%=� twopr%=�
�pair%=�:trio%=�
��
�"��clear:�L=1�13:flag%(L)=0:�:�
���clear1:�k=1�5
�(�p=1�5:suit$(k,p)="":number$(k,p)=""
�	�:�:�
���tot(F%,rep$)
�score%(game,round)=score%(game,round)+F%:score$=rep$:�28,1,9,18,1:�134:�:�4:�9-�(score$)/2,2)score$:�5:�4,4)"scores:";F%:�3:�4,6)"Total=";score%(game,round):�26:�
�O��scoreboard:�a=1�2:total(a)=total(a)+score%(a,round):�::�round=3 �0,1)fs$
U�a=4�5:�6-�(name$(1))/2,a)�130�141name$(1)�30-�(name$(2))/2,a)�131�141name$(2):�
D�rnd=1�round:rnd$=�129+�157+�141+�135+"Round "+�(rnd)+"   "+�156
�a=1�2:�12,rnd*5+a)rnd$:�
"f�a=1�2:scr$(a)=�141+�(132+a)+�(score%(a,rnd)):tt$(a)=�135+�157+�141+�132+�(total(a))+"    "+�156:�
,%� total(2)=0 tt$(2)="":scr$(2)=""
6J�x=1�2:�10-�(scr$(1)),rnd*5+x)scr$(1)�34-�(scr$(2)),rnd*5+x)scr$(2):�
@�
J'�h=21�22:�2,h)tt$(1)�26,h)tt$(2):�
T� round=3�win
^� J=� �but:�
h	A=�:�
r	��win
|W� total(1)>total(2)��0,4)�136�0,5)�136�22,4)�137�22,5)�137 � �22,4)�136�22,5)�136
�]� total(1)>total(2)��0,21)�136�0,22)�136�22,21)�137�22,22)�137 � �22,21)�136�22,22)�136
��s%=0�60:�1,3,s%*2,1:�
��0,4,4,5
��
���but:� � �(0)� 3:�
���error:*FX12
�
*FX210
��22,7:�:�" @ ";�
��
�
00000000  0d 00 0a 1d f4 2a 2a 50  4f 4b 45 52 20 53 51 55  |.....**POKER SQU|
00000010  41 52 45 20 50 41 52 54  20 32 2a 2a 2a 0d 00 14  |ARE PART 2***...|
00000020  0e ee 20 85 20 f2 65 72  72 6f 72 0d 00 1e 06 eb  |.. . .error.....|
00000030  37 0d 00 28 09 f2 69 6e  69 74 0d 00 32 0c f2 70  |7..(..init..2..p|
00000040  6c 61 79 65 72 73 0d 00  3c 0e e3 72 6f 75 6e 64  |layers..<..round|
00000050  3d 31 b8 33 0d 00 46 11  e3 67 61 6d 65 3d 31 b8  |=1.3..F..game=1.|
00000060  70 6c 79 72 73 0d 00 50  1d eb 32 3a ef 32 33 3b  |plyrs..P..2:.23;|
00000070  38 32 30 32 3b 30 3b 30  3b 30 3b 3a fb 31 33 30  |8202;0;0;0;:.130|
00000080  3a db 0d 00 5a 09 f2 73  6f 72 74 0d 00 64 0a f2  |:...Z..sort..d..|
00000090  62 6f 61 72 64 0d 00 6e  1f e3 20 64 63 3d 31 b8  |board..n.. dc=1.|
000000a0  32 35 3a f2 74 72 61 6e  73 3a f2 70 6c 61 63 65  |25:.trans:.place|
000000b0  28 31 33 29 0d 00 78 19  e7 20 4a 3d b9 20 8c 20  |(13)..x.. J=. . |
000000c0  f2 6a 6f 79 73 20 8b 20  f2 6b 65 79 73 0d 00 82  |.joys . .keys...|
000000d0  05 ed 0d 00 8c 0a f2 73  63 6f 72 65 0d 00 96 0b  |.......score....|
000000e0  f2 63 6c 65 61 72 31 0d  00 a0 0a ed 20 67 61 6d  |.clear1..... gam|
000000f0  65 0d 00 aa 22 eb 37 3a  ef 32 33 3b 38 32 30 32  |e...".7:.23;8202|
00000100  3b 30 3b 30 3b 30 3b 3a  f2 73 63 6f 72 65 62 6f  |;0;0;0;:.scorebo|
00000110  61 72 64 0d 00 b4 0a ed  72 6f 75 6e 64 0d 00 be  |ard.....round...|
00000120  09 2a 46 58 31 32 0d 00  c8 0c 2a 46 58 32 31 30  |.*FX12....*FX210|
00000130  2c 30 0d 00 d2 05 e0 0d  00 dc 0d dd f2 70 6c 61  |,0...........pla|
00000140  79 65 72 73 0d 00 e6 52  e3 61 3d 35 b8 36 3a f1  |yers...R.a=5.6:.|
00000150  8a 37 2c 61 29 bd 31 33  31 bd 31 34 31 22 4f 6e  |.7,a).131.141"On|
00000160  65 20 6f 72 20 74 77 6f  20 70 6c 61 79 65 72 73  |e or two players|
00000170  20 3f 20 22 3a ed 3a f5  3a 70 6c 79 72 73 3d a5  | ? ":.:.:plyrs=.|
00000180  2d 34 38 3a fd 20 70 6c  79 72 73 3d 31 84 20 70  |-48:. plyrs=1. p|
00000190  6c 79 72 73 3d 32 0d 00  f0 5e f1 27 3a e3 61 3d  |lyrs=2...^.':.a=|
000001a0  31 b8 70 6c 79 72 73 3a  f1 bd 28 31 32 38 2b 61  |1.plyrs:..(128+a|
000001b0  29 8a 34 29 22 50 6c 65  61 73 65 20 65 6e 74 65  |).4)"Please ente|
000001c0  72 20 6e 61 6d 65 20 6f  66 20 70 6c 61 79 65 72  |r name of player|
000001d0  20 22 3b 61 3a f1 8a 38  29 bd 28 31 32 38 2b 61  | ";a:..8).(128+a|
000001e0  29 22 55 70 20 74 6f 20  74 65 6e 20 6c 65 74 74  |)"Up to ten lett|
000001f0  65 72 73 22 0d 00 fa 11  e8 8a 31 32 29 6e 61 6d  |ers"......12)nam|
00000200  65 24 28 61 29 0d 01 04  2d e7 20 a9 28 6e 61 6d  |e$(a)...-. .(nam|
00000210  65 24 28 61 29 29 3c 31  20 84 20 a9 28 6e 61 6d  |e$(a))<1 . .(nam|
00000220  65 24 28 61 29 29 3e 31  30 20 ef 37 3a e5 8d 64  |e$(a))>10 .7:..d|
00000230  7a 40 0d 01 0e 05 ed 0d  01 18 55 f1 27 27 8a 32  |z@........U.''.2|
00000240  29 bd 31 33 34 22 43 75  72 73 6f 72 20 27 4b 27  |).134"Cursor 'K'|
00000250  65 79 73 20 6f 72 20 27  4a 27 6f 79 73 74 69 63  |eys or 'J'oystic|
00000260  6b 73 20 3f 22 3a f5 3a  41 3d a5 3a fd 20 41 3d  |ks ?":.:A=.:. A=|
00000270  37 34 20 84 20 41 3d 37  35 3a e7 20 41 3d 37 34  |74 . A=75:. A=74|
00000280  20 8c 20 4a 3d b9 20 8b  20 4a 3d a3 0d 01 22 33  | . J=. . J=..."3|
00000290  f1 bd 31 33 34 22 50 72  65 73 73 20 22 3b 3a e7  |..134"Press ";:.|
000002a0  20 4a 3d b9 20 f1 22 74  72 69 67 67 65 72 20 22  | J=. ."trigger "|
000002b0  3b 3a 8b 20 f1 22 72 65  74 75 72 6e 20 22 3b 0d  |;:. ."return ";.|
000002c0  01 2c 1f f1 22 77 68 65  6e 20 63 61 72 64 20 69  |.,.."when card i|
000002d0  73 20 70 6f 73 69 74 69  6f 6e 65 64 2e 22 0d 01  |s positioned."..|
000002e0  36 4a f1 27 27 8a 36 29  bd 31 33 33 22 27 51 27  |6J.''.6).133"'Q'|
000002f0  20 74 6f 20 73 77 69 74  63 68 20 6f 66 66 20 73  | to switch off s|
00000300  6f 75 6e 64 22 8a 37 29  bd 31 33 33 22 61 6e 79  |ound".7).133"any|
00000310  20 6f 74 68 65 72 20 6b  65 79 20 74 6f 20 62 65  | other key to be|
00000320  67 69 6e 22 3a 41 3d a5  0d 01 40 15 e7 20 41 3d  |gin":A=...@.. A=|
00000330  38 31 20 8c 20 2a 46 58  32 31 30 2c 31 0d 01 4a  |81 . *FX210,1..J|
00000340  05 e1 0d 01 54 0a dd f2  69 6e 69 74 0d 01 5e 8c  |....T...init..^.|
00000350  de 20 70 61 63 6b 25 28  35 32 29 2c 63 61 72 64  |. pack%(52),card|
00000360  24 28 32 35 29 2c 73 75  69 74 24 28 35 2c 35 29  |$(25),suit$(5,5)|
00000370  2c 6e 75 6d 62 65 72 24  28 35 2c 35 29 2c 6e 75  |,number$(5,5),nu|
00000380  6d 62 65 72 25 28 35 29  2c 73 75 69 74 25 28 35  |mber%(5),suit%(5|
00000390  29 2c 73 61 6d 65 28 31  29 2c 66 6c 61 67 25 28  |),same(1),flag%(|
000003a0  31 33 29 2c 73 63 6f 72  65 25 28 32 2c 33 29 2c  |13),score%(2,3),|
000003b0  74 6f 74 61 6c 28 32 29  2c 6e 61 6d 65 24 28 32  |total(2),name$(2|
000003c0  29 2c 73 63 72 24 28 32  29 2c 74 74 24 28 32 29  |),scr$(2),tt$(2)|
000003d0  3a 58 3d b3 28 2d 91 29  0d 01 68 58 73 63 6f 72  |:X=.(-.)..hXscor|
000003e0  65 24 3d 22 22 3a 63 75  72 24 3d bd 32 35 35 2b  |e$="":cur$=.255+|
000003f0  bd 32 35 35 3a 41 25 3d  39 3a 42 25 3d 32 30 3a  |.255:A%=9:B%=20:|
00000400  46 4c 41 47 3d 30 3a 74  77 6f 70 72 25 3d 30 3a  |FLAG=0:twopr%=0:|
00000410  74 72 69 6f 25 3d 30 3a  66 6c 68 73 65 25 3d 30  |trio%=0:flhse%=0|
00000420  3a 70 61 69 72 25 3d 30  3a 2a 46 58 31 31 2c 30  |:pair%=0:*FX11,0|
00000430  0d 01 72 a5 66 73 24 3d  bd 31 33 32 2b bd 31 35  |..r.fs$=.132+.15|
00000440  37 2b bd 31 34 31 2b bd  31 33 31 2b 22 20 20 20  |7+.141+.131+"   |
00000450  20 20 20 20 20 20 20 46  49 4e 41 4c 20 53 43 4f  |       FINAL SCO|
00000460  52 45 20 20 20 20 22 2b  bd 31 30 2b c4 32 39 2c  |RE    "+.10+.29,|
00000470  bd 38 29 2b bd 31 33 32  2b bd 31 35 37 2b bd 31  |.8)+.132+.157+.1|
00000480  34 31 2b bd 31 33 31 2b  22 20 20 20 20 20 20 20  |41+.131+"       |
00000490  20 20 20 46 49 4e 41 4c  20 53 43 4f 52 45 20 20  |   FINAL SCORE  |
000004a0  20 20 22 3a e3 61 3d 31  b8 32 3a 74 6f 74 61 6c  |  ":.a=1.2:total|
000004b0  28 61 29 3d 30 3a 73 63  72 24 28 61 29 3d 22 22  |(a)=0:scr$(a)=""|
000004c0  3a 74 74 24 28 61 29 3d  22 22 3a ed 3a 2a 46 58  |:tt$(a)="":.:*FX|
000004d0  32 31 32 2c 38 0d 01 7c  0e 2a 46 58 32 31 33 2c  |212,8..|.*FX213,|
000004e0  31 35 30 0d 01 86 0c 2a  46 58 32 31 34 2c 35 0d  |150....*FX214,5.|
000004f0  01 90 05 e1 0d 01 9a 0a  dd f2 73 6f 72 74 0d 01  |..........sort..|
00000500  a4 1e e3 63 72 64 3d 31  b8 35 32 3a 70 61 63 6b  |...crd=1.52:pack|
00000510  25 28 63 72 64 29 3d 63  72 64 3a ed 0d 01 ae 05  |%(crd)=crd:.....|
00000520  e1 0d 01 b8 0b dd f2 74  72 61 6e 73 0d 01 c2 13  |.......trans....|
00000530  4e 6f 3d 70 61 63 6b 25  28 b3 28 35 32 29 29 0d  |No=pack%(.(52)).|
00000540  01 cc 11 e7 20 4e 6f 3d  30 20 8c 20 8d 64 42 41  |.... No=0 . .dBA|
00000550  0d 01 d6 16 6e 75 6d 62  65 72 3d 28 4e 6f 2d 31  |....number=(No-1|
00000560  29 83 31 33 2b 31 0d 01  e0 12 73 75 69 74 3d 28  |).13+1....suit=(|
00000570  4e 6f 2d 31 29 81 31 33  0d 01 ea 17 e7 73 75 69  |No-1).13.....sui|
00000580  74 3d 32 84 73 75 69 74  3d 31 fb 31 8b fb 30 0d  |t=2.suit=1.1..0.|
00000590  01 f4 27 73 75 69 74 24  3d bd 28 73 75 69 74 2b  |..'suit$=.(suit+|
000005a0  32 32 34 29 3a 6e 75 6d  62 65 72 24 3d c3 28 6e  |224):number$=.(n|
000005b0  75 6d 62 65 72 29 0d 01  fe 1d e7 6e 75 6d 62 65  |umber).....numbe|
000005c0  72 24 3d 22 31 30 22 6e  75 6d 62 65 72 24 3d bd  |r$="10"number$=.|
000005d0  32 32 38 0d 02 08 1c e7  6e 75 6d 62 65 72 24 3d  |228.....number$=|
000005e0  22 31 31 22 6e 75 6d 62  65 72 24 3d 22 4a 22 0d  |"11"number$="J".|
000005f0  02 12 1c e7 6e 75 6d 62  65 72 24 3d 22 31 32 22  |....number$="12"|
00000600  6e 75 6d 62 65 72 24 3d  22 51 22 0d 02 1c 1c e7  |number$="Q".....|
00000610  6e 75 6d 62 65 72 24 3d  22 31 33 22 6e 75 6d 62  |number$="13"numb|
00000620  65 72 24 3d 22 4b 22 0d  02 26 1b e7 6e 75 6d 62  |er$="K"..&..numb|
00000630  65 72 24 3d 22 31 22 6e  75 6d 62 65 72 24 3d 22  |er$="1"number$="|
00000640  41 22 0d 02 30 1b 63 61  72 64 24 28 64 63 29 3d  |A"..0.card$(dc)=|
00000650  6e 75 6d 62 65 72 24 2b  73 75 69 74 24 0d 02 3a  |number$+suit$..:|
00000660  0f 70 61 63 6b 25 28 4e  6f 29 3d a3 0d 02 44 17  |.pack%(No)=...D.|
00000670  ef 32 38 2c 31 2c 39 2c  31 38 2c 31 3a fb 31 33  |.28,1,9,18,1:.13|
00000680  31 3a db 0d 02 4e 28 f1  8a 28 39 2d a9 28 6e 61  |1:...N(..(9-.(na|
00000690  6d 65 24 28 67 61 6d 65  29 29 2f 32 29 2c 33 29  |me$(game))/2),3)|
000006a0  6e 61 6d 65 24 28 67 61  6d 65 29 0d 02 58 27 f1  |name$(game)..X'.|
000006b0  8a 31 2c 35 29 22 43 61  72 64 20 4e 6f 2e 22 3b  |.1,5)"Card No.";|
000006c0  64 63 3b 22 20 69 73 20  22 63 61 72 64 24 28 64  |dc;" is "card$(d|
000006d0  63 29 0d 02 62 0c ef 32  36 3a fb 31 33 30 0d 02  |c)..b..26:.130..|
000006e0  6c 05 e1 0d 02 76 0d dd  f2 62 6f 61 72 64 3a db  |l....v...board:.|
000006f0  0d 02 80 22 e3 4c 3d 31  32 38 b8 36 30 38 88 39  |...".L=128.608.9|
00000700  36 3a ec 31 36 30 2c 4c  3a df 31 31 32 30 2c 4c  |6:.160,L:.1120,L|
00000710  3a ed 0d 02 8a 23 e3 4c  3d 31 36 30 b8 31 31 32  |:....#.L=160.112|
00000720  30 88 31 39 32 3a ec 4c  2c 31 32 38 3a df 4c 2c  |0.192:.L,128:.L,|
00000730  36 30 38 3a ed 0d 02 94  05 e1 0d 02 9e 3c dd f2  |608:.........<..|
00000740  70 6c 61 63 65 28 63 6f  6c 25 29 3a f2 77 61 69  |place(col%):.wai|
00000750  74 28 2e 31 35 29 3a fb  63 6f 6c 25 3a f1 8a 41  |t(.15):.col%:..A|
00000760  25 2c 42 25 2d 31 29 63  75 72 24 3a d4 31 2c 31  |%,B%-1)cur$:.1,1|
00000770  2c 31 2c 31 3a e1 0d 02  a8 0a dd f2 6a 6f 79 73  |,1,1:.......joys|
00000780  0d 02 b2 13 f5 3a e7 67  61 6d 65 3d 32 67 61 6d  |.....:.game=2gam|
00000790  65 3d 33 0d 02 bc 3a e7  20 96 28 67 61 6d 65 29  |e=3...:. .(game)|
000007a0  2f 31 36 3e 33 35 30 30  20 80 20 41 25 3e 33 20  |/16>3500 . A%>3 |
000007b0  f2 70 6c 61 63 65 28 32  29 3a 20 41 25 3d 41 25  |.place(2): A%=A%|
000007c0  2d 33 3a f2 70 6c 61 63  65 28 31 33 29 0d 02 c6  |-3:.place(13)...|
000007d0  3a e7 20 96 28 67 61 6d  65 29 2f 31 36 3c 31 35  |:. .(game)/16<15|
000007e0  30 30 20 80 20 41 25 3c  31 35 20 f2 70 6c 61 63  |00 . A%<15 .plac|
000007f0  65 28 32 29 3a 41 25 3d  41 25 2b 33 3a f2 70 6c  |e(2):A%=A%+3:.pl|
00000800  61 63 65 28 31 33 29 0d  02 d0 3c e7 20 96 28 67  |ace(13)...<. .(g|
00000810  61 6d 65 2b 31 29 2f 31  36 3e 33 35 30 30 20 80  |ame+1)/16>3500 .|
00000820  20 42 25 3e 31 34 20 f2  70 6c 61 63 65 28 32 29  | B%>14 .place(2)|
00000830  3a 42 25 3d 42 25 2d 33  3a f2 70 6c 61 63 65 28  |:B%=B%-3:.place(|
00000840  31 33 29 0d 02 da 3c e7  20 96 28 67 61 6d 65 2b  |13)...<. .(game+|
00000850  31 29 2f 31 36 3c 31 35  30 30 20 80 20 42 25 3c  |1)/16<1500 . B%<|
00000860  32 36 20 f2 70 6c 61 63  65 28 32 29 3a 42 25 3d  |26 .place(2):B%=|
00000870  42 25 2b 33 3a f2 70 6c  61 63 65 28 31 33 29 0d  |B%+3:.place(13).|
00000880  02 e4 12 e7 67 61 6d 65  3d 33 20 67 61 6d 65 3d  |....game=3 game=|
00000890  32 0d 02 ee 25 fd 96 28  30 29 80 67 61 6d 65 3a  |2...%..(0).game:|
000008a0  f2 63 68 65 63 6b 28 41  25 2f 33 2c 28 42 25 20  |.check(A%/3,(B% |
000008b0  81 33 29 2d 33 29 0d 02  f8 25 e7 20 46 4c 41 47  |.3)-3)...%. FLAG|
000008c0  3d 31 20 e5 8d 74 72 42  20 8b fb 32 3a f1 8a 41  |=1 ..trB ..2:..A|
000008d0  25 2c 42 25 2d 31 29 63  75 72 24 0d 03 02 1b e7  |%,B%-1)cur$.....|
000008e0  73 75 69 74 3d 32 84 73  75 69 74 3d 31 20 8c fb  |suit=2.suit=1 ..|
000008f0  31 20 8b 20 fb 30 0d 03  0c 22 f1 8a 41 25 2c 42  |1 . .0..."..A%,B|
00000900  25 29 63 61 72 64 24 28  64 63 29 3a 41 25 3d 39  |%)card$(dc):A%=9|
00000910  3a 42 25 3d 32 30 3a e1  0d 03 16 0a dd f2 6b 65  |:B%=20:.......ke|
00000920  79 73 0d 03 20 05 f5 0d  03 2a 2f e7 20 a6 2d 32  |ys.. ....*/. .-2|
00000930  36 20 80 20 41 25 3e 33  20 f2 70 6c 61 63 65 28  |6 . A%>3 .place(|
00000940  32 29 3a 20 41 25 3d 41  25 2d 33 3a f2 70 6c 61  |2): A%=A%-3:.pla|
00000950  63 65 28 31 33 29 0d 03  34 30 e7 20 a6 2d 31 32  |ce(13)..40. .-12|
00000960  32 20 80 20 41 25 3c 31  35 20 f2 70 6c 61 63 65  |2 . A%<15 .place|
00000970  28 32 29 3a 41 25 3d 41  25 2b 33 3a f2 70 6c 61  |(2):A%=A%+3:.pla|
00000980  63 65 28 31 33 29 0d 03  3e 2f e7 20 a6 2d 35 38  |ce(13)..>/. .-58|
00000990  20 80 20 42 25 3e 31 34  20 f2 70 6c 61 63 65 28  | . B%>14 .place(|
000009a0  32 29 3a 42 25 3d 42 25  2d 33 3a f2 70 6c 61 63  |2):B%=B%-3:.plac|
000009b0  65 28 31 33 29 0d 03 48  2f e7 20 a6 2d 34 32 20  |e(13)..H/. .-42 |
000009c0  80 20 42 25 3c 32 36 20  f2 70 6c 61 63 65 28 32  |. B%<26 .place(2|
000009d0  29 3a 42 25 3d 42 25 2b  33 3a f2 70 6c 61 63 65  |):B%=B%+3:.place|
000009e0  28 31 33 29 0d 03 52 43  fd 20 a6 2d 37 34 3a f2  |(13)..RC. .-74:.|
000009f0  63 68 65 63 6b 28 41 25  2f 33 2c 28 42 25 20 81  |check(A%/3,(B% .|
00000a00  33 29 2d 33 29 3a e7 20  46 4c 41 47 3d 31 20 e5  |3)-3):. FLAG=1 .|
00000a10  8d 54 60 43 20 8b fb 32  3a f1 8a 41 25 2c 42 25  |.T`C ..2:..A%,B%|
00000a20  2d 31 29 63 75 72 24 0d  03 5c 1b e7 73 75 69 74  |-1)cur$..\..suit|
00000a30  3d 32 84 73 75 69 74 3d  31 20 8c fb 31 20 8b 20  |=2.suit=1 ..1 . |
00000a40  fb 30 0d 03 66 23 f1 8a  41 25 2c 42 25 29 63 61  |.0..f#..A%,B%)ca|
00000a50  72 64 24 28 64 63 29 3a  41 25 3d 39 3a 42 25 3d  |rd$(dc):A%=9:B%=|
00000a60  32 30 3a e1 20 0d 03 70  15 dd f2 77 61 69 74 28  |20:. ..p...wait(|
00000a70  73 65 63 29 3a 2a 46 58  31 35 0d 03 7a 1d 6e 6f  |sec):*FX15..z.no|
00000a80  77 3d 91 3a f5 3a fd 20  91 3e 6e 6f 77 2b 73 65  |w=.:.:. .>now+se|
00000a90  63 2a 31 30 30 3a e1 0d  03 84 12 dd f2 63 68 65  |c*100:.......che|
00000aa0  63 6b 28 61 25 2c 62 25  29 0d 03 8e 22 e7 20 73  |ck(a%,b%)...". s|
00000ab0  75 69 74 24 28 61 25 2c  62 25 29 3c 3e 22 22 f2  |uit$(a%,b%)<>"".|
00000ac0  6e 6f 3a 46 4c 41 47 3d  31 3a e1 0d 03 98 36 73  |no:FLAG=1:....6s|
00000ad0  75 69 74 24 28 61 25 2c  62 25 29 3d 73 75 69 74  |uit$(a%,b%)=suit|
00000ae0  24 3a 6e 75 6d 62 65 72  24 28 61 25 2c 62 25 29  |$:number$(a%,b%)|
00000af0  3d 6e 75 6d 62 65 72 24  3a 46 4c 41 47 3d 30 3a  |=number$:FLAG=0:|
00000b00  e1 0d 03 a2 1e dd f2 6e  6f 3a e3 73 25 3d 31 b8  |.......no:.s%=1.|
00000b10  36 3a d4 31 2c 31 2c 73  25 2c 32 3a ed 3a e1 0d  |6:.1,1,s%,2:.:..|
00000b20  03 ac 10 dd f2 73 63 6f  72 65 3a 67 3d 31 31 0d  |.....score:g=11.|
00000b30  03 b6 56 e3 72 6f 77 3d  31 b8 35 3a fb 31 31 3a  |..V.row=1.5:.11:|
00000b40  67 3d 67 2b 33 3a f1 8a  31 2c 67 29 bd 32 32 39  |g=g+3:..1,g).229|
00000b50  8a 31 38 2c 67 29 bd 32  33 30 3a ef 37 3a f2 63  |.18,g).230:.7:.c|
00000b60  61 6c 63 28 31 29 3a fb  32 3a fb 31 33 30 3a f1  |alc(1):.2:.130:.|
00000b70  8a 31 2c 67 29 bd 32 32  39 8a 31 38 2c 67 29 bd  |.1,g).229.18,g).|
00000b80  32 33 30 3a ed 0d 03 c0  6c 67 3d 30 3a e3 63 6f  |230:....lg=0:.co|
00000b90  6c 3d 31 b8 35 3a fb 31  31 3a 67 3d 67 2b 33 3a  |l=1.5:.11:g=g+3:|
00000ba0  f1 8a 67 2c 31 31 29 bd  32 33 31 bd 32 33 32 8a  |..g,11).231.232.|
00000bb0  67 2c 32 39 29 bd 32 33  33 bd 32 33 34 3a ef 37  |g,29).233.234:.7|
00000bc0  3a f2 63 61 6c 63 28 30  29 3a fb 32 3a fb 31 33  |:.calc(0):.2:.13|
00000bd0  30 3a f1 8a 67 2c 31 31  29 bd 32 33 31 bd 32 33  |0:..g,11).231.23|
00000be0  32 8a 67 2c 32 39 29 bd  32 33 33 bd 32 33 34 3a  |2.g,29).233.234:|
00000bf0  ed 0d 03 ca 05 e1 0d 03  d4 0d dd f2 63 61 6c 63  |............calc|
00000c00  28 74 29 0d 03 de 0e e7  20 74 3d 30 8c 8d 64 72  |(t)..... t=0..dr|
00000c10  43 0d 03 e8 52 e3 63 6f  6c 3d 31 b8 35 3a 6e 75  |C...R.col=1.5:nu|
00000c20  6d 62 65 72 25 28 63 6f  6c 29 3d 97 28 6e 75 6d  |mber%(col)=.(num|
00000c30  62 65 72 24 28 63 6f 6c  2c 72 6f 77 29 29 3a 73  |ber$(col,row)):s|
00000c40  75 69 74 25 28 63 6f 6c  29 3d 97 28 73 75 69 74  |uit%(col)=.(suit|
00000c50  24 28 63 6f 6c 2c 72 6f  77 29 29 3a ed 3a e5 8d  |$(col,row)):.:..|
00000c60  64 7c 43 0d 03 f2 4c e3  72 6f 77 3d 31 b8 35 3a  |d|C...L.row=1.5:|
00000c70  6e 75 6d 62 65 72 25 28  72 6f 77 29 3d 97 28 6e  |number%(row)=.(n|
00000c80  75 6d 62 65 72 24 28 63  6f 6c 2c 72 6f 77 29 29  |umber$(col,row))|
00000c90  3a 73 75 69 74 25 28 72  6f 77 29 3d 97 28 73 75  |:suit%(row)=.(su|
00000ca0  69 74 24 28 63 6f 6c 2c  72 6f 77 29 29 3a ed 0d  |it$(col,row)):..|
00000cb0  03 fc 26 f2 73 75 62 3a  f2 73 6f 72 74 31 3a f2  |..&.sub:.sort1:.|
00000cc0  63 6f 75 6e 74 3a f2 72  75 6e 3a f2 77 61 69 74  |count:.run:.wait|
00000cd0  28 33 29 3a e1 0d 04 06  0b dd f2 73 6f 72 74 31  |(3):.......sort1|
00000ce0  0d 04 10 0d e3 70 61 73  73 3d 31 b8 34 0d 04 1a  |.....pass=1.4...|
00000cf0  12 e3 6c 6f 6f 70 3d 70  61 73 73 2b 31 b8 35 0d  |..loop=pass+1.5.|
00000d00  04 24 25 e7 6e 75 6d 62  65 72 25 28 70 61 73 73  |.$%.number%(pass|
00000d10  29 3e 6e 75 6d 62 65 72  25 28 6c 6f 6f 70 29 8c  |)>number%(loop).|
00000d20  8d 54 78 44 0d 04 2e 45  54 65 6d 70 3d 6e 75 6d  |.TxD...ETemp=num|
00000d30  62 65 72 25 28 70 61 73  73 29 3a 6e 75 6d 62 65  |ber%(pass):numbe|
00000d40  72 25 28 70 61 73 73 29  3d 6e 75 6d 62 65 72 25  |r%(pass)=number%|
00000d50  28 6c 6f 6f 70 29 3a 6e  75 6d 62 65 72 25 28 6c  |(loop):number%(l|
00000d60  6f 6f 70 29 3d 54 65 6d  70 0d 04 38 09 ed 3a ed  |oop)=Temp..8..:.|
00000d70  3a e1 0d 04 42 09 dd f2  72 75 6e 0d 04 4c 26 e7  |:...B...run..L&.|
00000d80  20 73 61 6d 65 28 30 29  3d 33 84 73 61 6d 65 28  | same(0)=3.same(|
00000d90  30 29 3d 32 20 f2 63 6c  65 61 72 3a f2 74 72 69  |0)=2 .clear:.tri|
00000da0  6f 0d 04 56 2f e7 66 6c  68 73 65 25 3d b9 3a f2  |o..V/.flhse%=.:.|
00000db0  74 6f 74 28 35 30 30 2c  22 46 75 6c 6c 20 48 6f  |tot(500,"Full Ho|
00000dc0  75 73 65 22 29 3a 66 6c  68 73 65 25 3d a3 3a e1  |use"):flhse%=.:.|
00000dd0  0d 04 60 2d e7 74 77 6f  70 72 25 3d b9 20 f2 74  |..`-.twopr%=. .t|
00000de0  6f 74 28 31 30 30 2c 22  54 77 6f 20 50 61 69 72  |ot(100,"Two Pair|
00000df0  22 29 3a 74 77 6f 70 72  25 3d a3 3a e1 0d 04 6a  |"):twopr%=.:...j|
00000e00  33 e7 72 69 67 68 74 3d  34 80 73 61 6d 65 28 31  |3.right=4.same(1|
00000e10  29 3d 34 20 f2 74 6f 74  28 31 30 30 30 2c 22 52  |)=4 .tot(1000,"R|
00000e20  75 6e 6e 69 6e 67 20 46  6c 75 73 68 22 29 3a e1  |unning Flush"):.|
00000e30  0d 04 74 53 e7 72 69 67  68 74 3d 33 20 80 20 6e  |..tS.right=3 . n|
00000e40  75 6d 62 65 72 25 28 35  29 3d 31 20 80 20 6e 75  |umber%(5)=1 . nu|
00000e50  6d 62 65 72 25 28 34 29  3d 31 30 20 80 73 61 6d  |mber%(4)=10 .sam|
00000e60  65 28 31 29 3d 34 20 f2  74 6f 74 28 31 30 30 30  |e(1)=4 .tot(1000|
00000e70  2c 22 52 75 6e 6e 69 6e  67 20 46 6c 75 73 68 22  |,"Running Flush"|
00000e80  29 3a e1 0d 04 7e 3d e7  72 69 67 68 74 3d 33 20  |):...~=.right=3 |
00000e90  80 20 6e 75 6d 62 65 72  25 28 35 29 3d 31 20 80  |. number%(5)=1 .|
00000ea0  20 6e 75 6d 62 65 72 25  28 34 29 3d 31 30 20 f2  | number%(4)=10 .|
00000eb0  74 6f 74 28 33 35 30 2c  22 52 75 6e 22 29 3a e1  |tot(350,"Run"):.|
00000ec0  0d 04 88 1e e7 72 69 67  68 74 3d 34 20 f2 74 6f  |.....right=4 .to|
00000ed0  74 28 33 35 30 2c 22 52  75 6e 22 29 3a e1 0d 04  |t(350,"Run"):...|
00000ee0  92 2b e7 73 61 6d 65 28  30 29 3d 33 20 f2 74 6f  |.+.same(0)=3 .to|
00000ef0  74 28 37 35 30 2c 22 46  6f 75 72 20 6f 66 20 61  |t(750,"Four of a|
00000f00  20 6b 69 6e 64 22 29 3a  e1 0d 04 9c 2c e7 73 61  | kind"):....,.sa|
00000f10  6d 65 28 30 29 3d 32 20  f2 74 6f 74 28 32 30 30  |me(0)=2 .tot(200|
00000f20  2c 22 54 68 72 65 65 20  6f 66 20 61 20 6b 69 6e  |,"Three of a kin|
00000f30  64 22 29 3a e1 0d 04 a6  24 e7 73 61 6d 65 28 30  |d"):....$.same(0|
00000f40  29 3d 31 20 f2 74 6f 74  28 32 30 2c 22 4f 6e 65  |)=1 .tot(20,"One|
00000f50  20 50 61 69 72 22 29 3a  e1 0d 04 b0 23 e7 20 73  | Pair"):....#. s|
00000f60  61 6d 65 28 31 29 3d 34  20 f2 74 6f 74 28 33 30  |ame(1)=4 .tot(30|
00000f70  30 2c 22 46 6c 75 73 68  22 29 3a e1 0d 04 ba 17  |0,"Flush"):.....|
00000f80  f2 74 6f 74 28 30 2c 22  4e 4f 54 48 49 4e 47 22  |.tot(0,"NOTHING"|
00000f90  29 3a e1 0d 04 c4 09 dd  f2 73 75 62 0d 04 ce 17  |):.......sub....|
00000fa0  f7 8d 54 40 45 3a e3 20  4c 3d 31 b8 35 3a f3 20  |..T@E:. L=1.5:. |
00000fb0  50 2c 44 0d 04 d8 26 e3  20 55 3d 31 b8 35 3a e7  |P,D...&. U=1.5:.|
00000fc0  6e 75 6d 62 65 72 25 28  55 29 3d 50 20 6e 75 6d  |number%(U)=P num|
00000fd0  62 65 72 25 28 55 29 3d  44 0d 04 e2 07 ed 3a ed  |ber%(U)=D.....:.|
00000fe0  0d 04 ec 25 e3 4c 3d 31  b8 35 3a 6e 75 6d 62 65  |...%.L=1.5:numbe|
00000ff0  72 25 28 4c 29 3d 6e 75  6d 62 65 72 25 28 4c 29  |r%(L)=number%(L)|
00001000  2d 34 38 3a ed 0d 04 f6  05 e1 0d 05 00 23 dc 36  |-48:.........#.6|
00001010  35 2c 34 39 2c 32 32 38  2c 35 38 2c 37 34 2c 35  |5,49,228,58,74,5|
00001020  39 2c 38 31 2c 36 30 2c  37 35 2c 36 31 0d 05 0a  |9,81,60,75,61...|
00001030  27 dd f2 63 6f 75 6e 74  3a 73 61 6d 65 28 30 29  |'..count:same(0)|
00001040  3d 30 3a 73 61 6d 65 28  31 29 3d 30 3a 72 69 67  |=0:same(1)=0:rig|
00001050  68 74 3d 30 0d 05 14 0f  e3 20 63 68 65 63 6b 3d  |ht=0..... check=|
00001060  32 b8 35 0d 05 1e 36 e7  6e 75 6d 62 65 72 25 28  |2.5...6.number%(|
00001070  63 68 65 63 6b 29 3d 6e  75 6d 62 65 72 25 28 63  |check)=number%(c|
00001080  68 65 63 6b 2d 31 29 8c  73 61 6d 65 28 30 29 3d  |heck-1).same(0)=|
00001090  73 61 6d 65 28 30 29 2b  31 0d 05 28 32 e7 73 75  |same(0)+1..(2.su|
000010a0  69 74 25 28 63 68 65 63  6b 29 3d 73 75 69 74 25  |it%(check)=suit%|
000010b0  28 63 68 65 63 6b 2d 31  29 8c 73 61 6d 65 28 31  |(check-1).same(1|
000010c0  29 3d 73 61 6d 65 28 31  29 2b 31 0d 05 32 35 e7  |)=same(1)+1..25.|
000010d0  20 6e 75 6d 62 65 72 25  28 63 68 65 63 6b 29 3d  | number%(check)=|
000010e0  6e 75 6d 62 65 72 25 28  63 68 65 63 6b 2d 31 29  |number%(check-1)|
000010f0  2d 31 20 72 69 67 68 74  3d 72 69 67 68 74 2b 31  |-1 right=right+1|
00001100  0d 05 3c 07 ed 3a e1 0d  05 46 13 dd f2 74 72 69  |..<..:...F...tri|
00001110  6f 3a e3 6e 25 3d 31 b8  31 33 0d 05 50 0b e3 63  |o:.n%=1.13..P..c|
00001120  25 3d 31 b8 35 0d 05 5a  2a e7 20 6e 75 6d 62 65  |%=1.5..Z*. numbe|
00001130  72 25 28 63 25 29 3d 6e  25 20 66 6c 61 67 25 28  |r%(c%)=n% flag%(|
00001140  6e 25 29 3d 66 6c 61 67  25 28 6e 25 29 2b 31 0d  |n%)=flag%(n%)+1.|
00001150  05 64 07 ed 3a ed 0d 05  6e 0c e3 6e 25 3d 31 b8  |.d..:...n..n%=1.|
00001160  31 33 0d 05 78 19 e7 20  66 6c 61 67 25 28 6e 25  |13..x.. flag%(n%|
00001170  29 3d 32 20 70 61 69 72  25 3d b9 0d 05 82 19 e7  |)=2 pair%=......|
00001180  20 66 6c 61 67 25 28 6e  25 29 3d 33 20 74 72 69  | flag%(n%)=3 tri|
00001190  6f 25 3d b9 0d 05 8c 05  ed 0d 05 96 25 e7 70 61  |o%=.........%.pa|
000011a0  69 72 25 3d b9 20 80 20  74 72 69 6f 25 3d b9 20  |ir%=. . trio%=. |
000011b0  66 6c 68 73 65 25 3d b9  3a e5 8d 74 6a 45 0d 05  |flhse%=.:..tjE..|
000011c0  a0 15 e7 70 61 69 72 25  3d b9 20 74 77 6f 70 72  |...pair%=. twopr|
000011d0  25 3d b9 0d 05 aa 13 70  61 69 72 25 3d a3 3a 74  |%=.....pair%=.:t|
000011e0  72 69 6f 25 3d a3 0d 05  b4 05 e1 0d 05 be 22 dd  |rio%=.........".|
000011f0  f2 63 6c 65 61 72 3a e3  4c 3d 31 b8 31 33 3a 66  |.clear:.L=1.13:f|
00001200  6c 61 67 25 28 4c 29 3d  30 3a ed 3a e1 0d 05 c8  |lag%(L)=0:.:....|
00001210  13 dd f2 63 6c 65 61 72  31 3a e3 6b 3d 31 b8 35  |...clear1:.k=1.5|
00001220  0d 05 d2 28 e3 70 3d 31  b8 35 3a 73 75 69 74 24  |...(.p=1.5:suit$|
00001230  28 6b 2c 70 29 3d 22 22  3a 6e 75 6d 62 65 72 24  |(k,p)="":number$|
00001240  28 6b 2c 70 29 3d 22 22  0d 05 dc 09 ed 3a ed 3a  |(k,p)="".....:.:|
00001250  e1 0d 05 e6 12 dd f2 74  6f 74 28 46 25 2c 72 65  |.......tot(F%,re|
00001260  70 24 29 0d 05 f0 a9 73  63 6f 72 65 25 28 67 61  |p$)....score%(ga|
00001270  6d 65 2c 72 6f 75 6e 64  29 3d 73 63 6f 72 65 25  |me,round)=score%|
00001280  28 67 61 6d 65 2c 72 6f  75 6e 64 29 2b 46 25 3a  |(game,round)+F%:|
00001290  73 63 6f 72 65 24 3d 72  65 70 24 3a ef 32 38 2c  |score$=rep$:.28,|
000012a0  31 2c 39 2c 31 38 2c 31  3a fb 31 33 34 3a db 3a  |1,9,18,1:.134:.:|
000012b0  fb 34 3a f1 8a 39 2d a9  28 73 63 6f 72 65 24 29  |.4:..9-.(score$)|
000012c0  2f 32 2c 32 29 73 63 6f  72 65 24 3a fb 35 3a f1  |/2,2)score$:.5:.|
000012d0  8a 34 2c 34 29 22 73 63  6f 72 65 73 3a 22 3b 46  |.4,4)"scores:";F|
000012e0  25 3a fb 33 3a f1 8a 34  2c 36 29 22 54 6f 74 61  |%:.3:..4,6)"Tota|
000012f0  6c 3d 22 3b 73 63 6f 72  65 25 28 67 61 6d 65 2c  |l=";score%(game,|
00001300  72 6f 75 6e 64 29 3a ef  32 36 3a e1 0d 05 fa 4f  |round):.26:....O|
00001310  dd f2 73 63 6f 72 65 62  6f 61 72 64 3a e3 61 3d  |..scoreboard:.a=|
00001320  31 b8 32 3a 74 6f 74 61  6c 28 61 29 3d 74 6f 74  |1.2:total(a)=tot|
00001330  61 6c 28 61 29 2b 73 63  6f 72 65 25 28 61 2c 72  |al(a)+score%(a,r|
00001340  6f 75 6e 64 29 3a ed 3a  3a e7 72 6f 75 6e 64 3d  |ound):.::.round=|
00001350  33 20 f1 8a 30 2c 31 29  66 73 24 0d 06 04 55 e3  |3 ..0,1)fs$...U.|
00001360  61 3d 34 b8 35 3a f1 8a  36 2d a9 28 6e 61 6d 65  |a=4.5:..6-.(name|
00001370  24 28 31 29 29 2f 32 2c  61 29 bd 31 33 30 bd 31  |$(1))/2,a).130.1|
00001380  34 31 6e 61 6d 65 24 28  31 29 8a 33 30 2d a9 28  |41name$(1).30-.(|
00001390  6e 61 6d 65 24 28 32 29  29 2f 32 2c 61 29 bd 31  |name$(2))/2,a).1|
000013a0  33 31 bd 31 34 31 6e 61  6d 65 24 28 32 29 3a ed  |31.141name$(2):.|
000013b0  0d 06 0e 44 e3 72 6e 64  3d 31 b8 72 6f 75 6e 64  |...D.rnd=1.round|
000013c0  3a 72 6e 64 24 3d bd 31  32 39 2b bd 31 35 37 2b  |:rnd$=.129+.157+|
000013d0  bd 31 34 31 2b bd 31 33  35 2b 22 52 6f 75 6e 64  |.141+.135+"Round|
000013e0  20 22 2b c3 28 72 6e 64  29 2b 22 20 20 20 22 2b  | "+.(rnd)+"   "+|
000013f0  bd 31 35 36 0d 06 18 1e  e3 61 3d 31 b8 32 3a f1  |.156.....a=1.2:.|
00001400  8a 31 32 2c 72 6e 64 2a  35 2b 61 29 72 6e 64 24  |.12,rnd*5+a)rnd$|
00001410  3a ed 0d 06 22 66 e3 61  3d 31 b8 32 3a 73 63 72  |:..."f.a=1.2:scr|
00001420  24 28 61 29 3d bd 31 34  31 2b bd 28 31 33 32 2b  |$(a)=.141+.(132+|
00001430  61 29 2b c3 28 73 63 6f  72 65 25 28 61 2c 72 6e  |a)+.(score%(a,rn|
00001440  64 29 29 3a 74 74 24 28  61 29 3d bd 31 33 35 2b  |d)):tt$(a)=.135+|
00001450  bd 31 35 37 2b bd 31 34  31 2b bd 31 33 32 2b c3  |.157+.141+.132+.|
00001460  28 74 6f 74 61 6c 28 61  29 29 2b 22 20 20 20 20  |(total(a))+"    |
00001470  22 2b bd 31 35 36 3a ed  0d 06 2c 25 e7 20 74 6f  |"+.156:...,%. to|
00001480  74 61 6c 28 32 29 3d 30  20 74 74 24 28 32 29 3d  |tal(2)=0 tt$(2)=|
00001490  22 22 3a 73 63 72 24 28  32 29 3d 22 22 0d 06 36  |"":scr$(2)=""..6|
000014a0  4a e3 78 3d 31 b8 32 3a  f1 8a 31 30 2d a9 28 73  |J.x=1.2:..10-.(s|
000014b0  63 72 24 28 31 29 29 2c  72 6e 64 2a 35 2b 78 29  |cr$(1)),rnd*5+x)|
000014c0  73 63 72 24 28 31 29 8a  33 34 2d a9 28 73 63 72  |scr$(1).34-.(scr|
000014d0  24 28 32 29 29 2c 72 6e  64 2a 35 2b 78 29 73 63  |$(2)),rnd*5+x)sc|
000014e0  72 24 28 32 29 3a ed 0d  06 40 05 ed 0d 06 4a 27  |r$(2):...@....J'|
000014f0  e3 68 3d 32 31 b8 32 32  3a f1 8a 32 2c 68 29 74  |.h=21.22:..2,h)t|
00001500  74 24 28 31 29 8a 32 36  2c 68 29 74 74 24 28 32  |t$(1).26,h)tt$(2|
00001510  29 3a ed 0d 06 54 11 e7  20 72 6f 75 6e 64 3d 33  |):...T.. round=3|
00001520  f2 77 69 6e 0d 06 5e 10  e7 20 4a 3d b9 20 f2 62  |.win..^.. J=. .b|
00001530  75 74 3a e1 0d 06 68 09  41 3d a5 3a e1 0d 06 72  |ut:...h.A=.:...r|
00001540  09 dd f2 77 69 6e 0d 06  7c 57 e7 20 74 6f 74 61  |...win..|W. tota|
00001550  6c 28 31 29 3e 74 6f 74  61 6c 28 32 29 8c f1 8a  |l(1)>total(2)...|
00001560  30 2c 34 29 bd 31 33 36  8a 30 2c 35 29 bd 31 33  |0,4).136.0,5).13|
00001570  36 8a 32 32 2c 34 29 bd  31 33 37 8a 32 32 2c 35  |6.22,4).137.22,5|
00001580  29 bd 31 33 37 20 8b 20  f1 8a 32 32 2c 34 29 bd  |).137 . ..22,4).|
00001590  31 33 36 8a 32 32 2c 35  29 bd 31 33 36 0d 06 86  |136.22,5).136...|
000015a0  5d e7 20 74 6f 74 61 6c  28 31 29 3e 74 6f 74 61  |]. total(1)>tota|
000015b0  6c 28 32 29 8c f1 8a 30  2c 32 31 29 bd 31 33 36  |l(2)...0,21).136|
000015c0  8a 30 2c 32 32 29 bd 31  33 36 8a 32 32 2c 32 31  |.0,22).136.22,21|
000015d0  29 bd 31 33 37 8a 32 32  2c 32 32 29 bd 31 33 37  |).137.22,22).137|
000015e0  20 8b 20 f1 8a 32 32 2c  32 31 29 bd 31 33 36 8a  | . ..22,21).136.|
000015f0  32 32 2c 32 32 29 bd 31  33 36 0d 06 90 1a e3 73  |22,22).136.....s|
00001600  25 3d 30 b8 36 30 3a d4  31 2c 33 2c 73 25 2a 32  |%=0.60:.1,3,s%*2|
00001610  2c 31 3a ed 0d 06 9a 0c  d4 30 2c 34 2c 34 2c 35  |,1:......0,4,4,5|
00001620  0d 06 a4 05 e1 0d 06 ae  17 dd f2 62 75 74 3a f5  |...........but:.|
00001630  20 fd 20 96 28 30 29 80  20 33 3a e1 0d 06 b8 11  | . .(0). 3:.....|
00001640  dd f2 65 72 72 6f 72 3a  2a 46 58 31 32 0d 06 c2  |..error:*FX12...|
00001650  0a 2a 46 58 32 31 30 0d  06 cc 14 ef 32 32 2c 37  |.*FX210.....22,7|
00001660  3a f6 3a f1 22 20 40 20  22 3b 9e 0d 06 d6 05 fa  |:.:." @ ";......|
00001670  0d ff                                             |..|
00001672
25-12-87/SQUARE2.m0
25-12-87/SQUARE2.m1
25-12-87/SQUARE2.m2
25-12-87/SQUARE2.m4
25-12-87/SQUARE2.m5