Home » Personal collection » Acorn tapes » Commercial_Releases » boxed_tape01a_acorn_me_and_my_micro.wav » MATCHEM

MATCHEM

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 tapes » Commercial_Releases » boxed_tape01a_acorn_me_and_my_micro.wav
Filename: MATCHEM
Read OK:
File size: 0D73 bytes
Load address: FFFF1B00
Exec address: FFFF8023
File contents
   10 REM      ...Matchem...
   20 
   30 REM    ...Electron Version 1...
   40 
   50 REM Copyright (c) Acornsoft 1984
   60 
   70 MODE 1
   80 PROCintroduction
   90 REM Initialise routine
  100 ENVELOPE1,1,1,-1,0,5,5,0,126,0,0,-126,126,126
  110 guess=0:score=0
  120 a$="AABBCCDDEEFFGGHHIIJJ":j$=""
  130 lscore=0:kscore=0
  140 
  150 REM Shuffle
  160 FOR k=1 TO 20
  170   l=LEN a$
  180   n=RND(l)
  190   j$=j$+MID$(a$,n,1)
  200   a$=LEFT$(a$,n-1)+RIGHT$(a$,l-n)
  210 NEXT k
  220 
  230 REM Display backs
  240 FOR n=0 TO 4
  250  FOR m=0 TO 3
  260  PRINT TAB(3*n+11,3*m+10); n+5*m+1
  270  NEXT m
  280 NEXT n
  290 
  300 REPEAT
  310 
  320 REM Display scores
  330 IF p=1 THEN PRINTTAB(6,3);"Number of tries = ";guess: PRINTTAB(16,5);"Score = ";score
  340 IF p=2 THEN PROCtwoplayers
  350 IF lscore+kscore=10 THEN 530
  360 
  370 REM Choose first card
  380 PROCchoice
  390 firstguess=i : n1=n : m1=m
  400 
  410 REM Choose second  card
  420 REPEAT PROCchoice
  430 UNTIL i<>firstguess
  440 
  450 guess=guess+1
  460 
  470 IF player=0 THEN score=lscore
  480 IF player=1 THEN score=kscore
  490 TIME=0:REPEAT UNTIL TIME>=80
  500 
  510 IF MID$(j$,firstguess,1)=MID$(j$,i,1) THEN PROCthey_match :ELSE PROCdo_not_match
  520 
  530 UNTILscore=10 OR lscore+kscore=10
  540 
  550 FORi=180 TO 120 STEP -5
  560 SOUND1,1,i,2
  570 NEXT i
  580 PRINTTAB(0,22);SPC(38);TAB(0,25);SPC(38)
  590 IF p=2 AND kscore>lscore THEN PRINT TAB(1,23);k$;" has won."
  600 IF p=2 AND kscore=lscore THEN PRINT TAB(14,23);"A draw!"
  610 IF p=2 AND kscore<lscore THEN PRINT TAB(1,23);l$;" has won."
  620 PRINT TAB(2,26);"........That's all folks."
  630 FOR z=1 TO 25
  640 SOUND 1,-15,7*z,3
  650  NEXT z
  660 PRINT TAB(0,28);"Do you want another game (Y/N) ?";
  670 REPEAT key=INSTR("YyNn",GET$)
  680 UNTIL key<>0
  690 IF key<3 THEN RUN
  700 
  710 MODE 6:PRINT''''
  720 *FX12,0
  730 END
  740 
  750 REM    ********* END *********
  760 
  770 REM ******** SUBROUTINES ********
  780 
  790DEF PROCtwoplayers
  800 IF player=0 THEN lscore=score
  810 IF player=1 THEN kscore=score
  820 player=1-player
  830 REM swap turns
  840 IF p=2 THEN PRINT TAB(6,3);l$;"'s score = ";lscore: PRINT TAB(6,5);k$;"'s score = ";kscore
  850 IF player=0 THEN score=lscore: PRINT TAB(1,22);"*** ";l$;"'s turn ***"
  860 IF player=1 THEN score=kscore: PRINT TAB(1,22);"*** ";k$;"'s turn ***"
  870 VDU19,0,player*3+1,0,0,0
  880 SOUND1,-15,player*150+20,10
  890ENDPROC
  900 
  910DEF PROCchoice
  920 REPEAT
  930  PRINT TAB(0,25)" Which cards ?            "
  940  INPUT TAB(15,25) i
  950  c$=MID$(j$,i,1): REM Find card
  960 UNTIL i>=1 AND i<=20 AND c$<>"-"
  970 PRINT TAB(15,25) "              "
  980 m=(i-1) DIV 5
  990 n=(i-1) MOD 5
 1000 
 1010 REM Show card
 1020 RESTORE 1140
 1030 IF p=1 COLOUR (ASC(c$)MOD 3)+1
 1040 IF p=2 COLOUR (ASC(c$)MOD 2)+2
 1050 IF c$<"A" OR c$>"J" GOTO1090
 1060 REPEAT
 1070  READ letter$,x$,y$
 1080 UNTIL letter$=c$
 1090 PRINT TAB(3*n+11,3*m+10) x$
 1100 PRINT TAB(3*n+11,3*m+11) y$
 1110 COLOUR 3
 1120ENDPROC
 1130 
 1140 DATA A,++,++,B,/\,\/,C,[],[],D,::,::,E,@@,@@,F,XX,XX,G,**,**,H,)(,)(,I,==,==,J,OO,OO
 1150 
 1160DEF PROCthey_match
 1170 j$=LEFT$(j$,firstguess-1)+"-"+RIGHT$(j$,LEN j$-firstguess)
 1180 j$=LEFT$(j$,i-1)+"-"+RIGHT$(j$,LEN j$-i)
 1190 score=score+1
 1200 FOR z=53 TO 63
 1210  SOUND1,1,z*5,2
 1220 NEXT z
 1230 TIME=0:REPEAT UNTIL TIME>=80
 1240ENDPROC
 1250 
 1260DEF PROCdo_not_match
 1270 FORz=50 TO 200 STEP 20
 1280  SOUND1,-15,z,1
 1290 NEXT z
 1300 SOUND1,-15,70,2
 1310 PRINT TAB(3*n1+11,3*m1+10); firstguess " "
 1320 PRINT TAB(3*n1+11,3*m1+11) "  "
 1330 PRINT TAB(3*n+11,3*m+10); i " "
 1340 PRINT TAB(3*n+11,3*m+11) "  "
 1350 TIME=0:REPEAT UNTIL TIME>=80
 1360ENDPROC
 1370 
 1380DEF PROCintroduction
 1390 REM Turn off keyboard repeat
 1400 *FX11,0
 1410 player=100: REM dummy value
 1420 VDU 19,0,4,0,0,0:VDU19,3,6,0,0,0
 1430 PRINT TAB(5,10);"****** M A T C H E M ******"
 1440 PRINT TAB(5,20);"How many players (1 or 2) ?"
 1450 REPEAT p$=GET$
 1460 UNTIL p$="1" OR p$="2"
 1470 p=VAL(p$)
 1480 CLS
 1490 IF p=1 THEN ENDPROC
 1500 INPUT TAB(0,6);"Player 1, please input your name "'' l$
 1510 SOUND1,-15,20,10
 1520 INPUT TAB(0,12);"Player 2, please input your name "'' k$
 1530 SOUND1,-15,170,10
 1540 PRINT TAB(0,20);l$;" and ";k$;","''" press a key when you are ready"
 1550 key=GET
 1560 player=1 :REM player=0 means first player, player=1 means second player
 1570 CLS
 1580ENDPROC

 �      ...Matchem...
 
" �    ...Electron Version 1...
( 
2# � Copyright (c) Acornsoft 1984
< 
F � 1
P �introduction
Z � Initialise routine
d+ �1,1,1,-1,0,5,5,0,126,0,0,-126,126,126
n guess=0:score=0
x$ a$="AABBCCDDEEFFGGHHIIJJ":j$=""
� lscore=0:kscore=0
� 
� � Shuffle
� � k=1 � 20
�
   l=� a$
�
   n=�(l)
�   j$=j$+�a$,n,1)
�   a$=�a$,n-1)+�a$,l-n)
� � k
� 
� � Display backs
� � n=0 � 4
�  � m=0 � 3
   � �3*n+11,3*m+10); n+5*m+1
	  � m
 � n
" 
, �
6 
@ � Display scores
JH � p=1 � �6,3);"Number of tries = ";guess: �16,5);"Score = ";score
T � p=2 � �twoplayers
^ � lscore+kscore=10 � �TRB
h 
r � Choose first card
| �choice
� firstguess=i : n1=n : m1=m
� 
� � Choose second  card
� � �choice
� � i<>firstguess
� 
� guess=guess+1
� 
� � player=0 � score=lscore
� � player=1 � score=kscore
� �=0:� � �>=80
� 
�@ � �j$,firstguess,1)=�j$,i,1) � �they_match :� �do_not_match
 
! �score=10 � lscore+kscore=10
 
& �i=180 � 120 � -5
0
 �1,1,i,2
: � i
D �0,22);�(38);�0,25);�(38)
N4 � p=2 � kscore>lscore � � �1,23);k$;" has won."
X0 � p=2 � kscore=lscore � � �14,23);"A draw!"
b4 � p=2 � kscore<lscore � � �1,23);l$;" has won."
l) � �2,26);"........That's all folks."
v � z=1 � 25
� � 1,-15,7*z,3
�	  � z
�1 � �0,28);"Do you want another game (Y/N) ?";
� � key=�"YyNn",�)
�
 � key<>0
� � key<3 � �
� 
� � 6:�''''
� *FX12,0
� �
� 
�! �    ********* END *********
� 
$ � ******** SUBROUTINES ********
 
� �twoplayers
  � player=0 � lscore=score
* � player=1 � kscore=score
4 player=1-player
> � swap turns
HM � p=2 � � �6,3);l$;"'s score = ";lscore: � �6,5);k$;"'s score = ";kscore
R@ � player=0 � score=lscore: � �1,22);"*** ";l$;"'s turn ***"
\@ � player=1 � score=kscore: � �1,22);"*** ";k$;"'s turn ***"
f �19,0,player*3+1,0,0,0
p �1,-15,player*150+20,10
z�
� 
�
� �choice
� �
�*  � �0,25)" Which cards ?            "
�  � �15,25) i
�  c$=�j$,i,1): � Find card
� � i>=1 � i<=20 � c$<>"-"
� � �15,25) "              "
� m=(i-1) � 5
� n=(i-1) � 5
� 
� � Show card
� � �DtD
 � p=1 � (�(c$)� 3)+1
 � p=2 � (�(c$)� 2)+2
 � c$<"A" � c$>"J" �DBD
$ �
.  � letter$,x$,y$
8 � letter$=c$
B � �3*n+11,3*m+10) x$
L � �3*n+11,3*m+11) y$
V � 3
`�
j 
tV � A,++,++,B,/\,\/,C,[],[],D,::,::,E,@@,@@,F,XX,XX,G,**,**,H,)(,)(,I,==,==,J,OO,OO
~ 
�� �they_match
�2 j$=�j$,firstguess-1)+"-"+�j$,� j$-firstguess)
�  j$=�j$,i-1)+"-"+�j$,� j$-i)
� score=score+1
� � z=53 � 63
�  �1,1,z*5,2
� � z
� �=0:� � �>=80
��
� 
�� �do_not_match
� �z=50 � 200 � 20
  �1,-15,z,1

 � z
 �1,-15,70,2
( � �3*n1+11,3*m1+10); firstguess " "
( � �3*n1+11,3*m1+11) "  "
2 � �3*n+11,3*m+10); i " "
< � �3*n+11,3*m+11) "  "
F �=0:� � �>=80
P�
Z 
d� �introduction
n � Turn off keyboard repeat
x *FX11,0
� player=100: � dummy value
�! � 19,0,4,0,0,0:�19,3,6,0,0,0
�+ � �5,10);"****** M A T C H E M ******"
�+ � �5,20);"How many players (1 or 2) ?"
� � p$=�
� � p$="1" � p$="2"
� p=�(p$)
� �
� � p=1 � �
�5 � �0,6);"Player 1, please input your name "'' l$
� �1,-15,20,10
�6 � �0,12);"Player 2, please input your name "'' k$
� �1,-15,170,10
B � �0,20);l$;" and ";k$;","''" press a key when you are ready"

 key=�
J player=1 :� player=0 means first player, player=1 means second player
" �
,�
�
00000000  0d 00 0a 19 20 f4 20 20  20 20 20 20 2e 2e 2e 4d  |.... .      ...M|
00000010  61 74 63 68 65 6d 2e 2e  2e 0d 00 14 05 20 0d 00  |atchem....... ..|
00000020  1e 22 20 f4 20 20 20 20  2e 2e 2e 45 6c 65 63 74  |." .    ...Elect|
00000030  72 6f 6e 20 56 65 72 73  69 6f 6e 20 31 2e 2e 2e  |ron Version 1...|
00000040  0d 00 28 05 20 0d 00 32  23 20 f4 20 43 6f 70 79  |..(. ..2# . Copy|
00000050  72 69 67 68 74 20 28 63  29 20 41 63 6f 72 6e 73  |right (c) Acorns|
00000060  6f 66 74 20 31 39 38 34  0d 00 3c 05 20 0d 00 46  |oft 1984..<. ..F|
00000070  08 20 eb 20 31 0d 00 50  12 20 f2 69 6e 74 72 6f  |. . 1..P. .intro|
00000080  64 75 63 74 69 6f 6e 0d  00 5a 19 20 f4 20 49 6e  |duction..Z. . In|
00000090  69 74 69 61 6c 69 73 65  20 72 6f 75 74 69 6e 65  |itialise routine|
000000a0  0d 00 64 2b 20 e2 31 2c  31 2c 31 2c 2d 31 2c 30  |..d+ .1,1,1,-1,0|
000000b0  2c 35 2c 35 2c 30 2c 31  32 36 2c 30 2c 30 2c 2d  |,5,5,0,126,0,0,-|
000000c0  31 32 36 2c 31 32 36 2c  31 32 36 0d 00 6e 14 20  |126,126,126..n. |
000000d0  67 75 65 73 73 3d 30 3a  73 63 6f 72 65 3d 30 0d  |guess=0:score=0.|
000000e0  00 78 24 20 61 24 3d 22  41 41 42 42 43 43 44 44  |.x$ a$="AABBCCDD|
000000f0  45 45 46 46 47 47 48 48  49 49 4a 4a 22 3a 6a 24  |EEFFGGHHIIJJ":j$|
00000100  3d 22 22 0d 00 82 16 20  6c 73 63 6f 72 65 3d 30  |="".... lscore=0|
00000110  3a 6b 73 63 6f 72 65 3d  30 0d 00 8c 05 20 0d 00  |:kscore=0.... ..|
00000120  96 0e 20 f4 20 53 68 75  66 66 6c 65 0d 00 a0 0f  |.. . Shuffle....|
00000130  20 e3 20 6b 3d 31 20 b8  20 32 30 0d 00 aa 0d 20  | . k=1 . 20.... |
00000140  20 20 6c 3d a9 20 61 24  0d 00 b4 0d 20 20 20 6e  |  l=. a$....   n|
00000150  3d b3 28 6c 29 0d 00 be  15 20 20 20 6a 24 3d 6a  |=.(l)....   j$=j|
00000160  24 2b c1 61 24 2c 6e 2c  31 29 0d 00 c8 1b 20 20  |$+.a$,n,1)....  |
00000170  20 61 24 3d c0 61 24 2c  6e 2d 31 29 2b c2 61 24  | a$=.a$,n-1)+.a$|
00000180  2c 6c 2d 6e 29 0d 00 d2  08 20 ed 20 6b 0d 00 dc  |,l-n).... . k...|
00000190  05 20 0d 00 e6 14 20 f4  20 44 69 73 70 6c 61 79  |. .... . Display|
000001a0  20 62 61 63 6b 73 0d 00  f0 0e 20 e3 20 6e 3d 30  | backs.... . n=0|
000001b0  20 b8 20 34 0d 00 fa 0f  20 20 e3 20 6d 3d 30 20  | . 4....  . m=0 |
000001c0  b8 20 33 0d 01 04 20 20  20 f1 20 8a 33 2a 6e 2b  |. 3...   . .3*n+|
000001d0  31 31 2c 33 2a 6d 2b 31  30 29 3b 20 6e 2b 35 2a  |11,3*m+10); n+5*|
000001e0  6d 2b 31 0d 01 0e 09 20  20 ed 20 6d 0d 01 18 08  |m+1....  . m....|
000001f0  20 ed 20 6e 0d 01 22 05  20 0d 01 2c 06 20 f5 0d  | . n..". ..,. ..|
00000200  01 36 05 20 0d 01 40 15  20 f4 20 44 69 73 70 6c  |.6. ..@. . Displ|
00000210  61 79 20 73 63 6f 72 65  73 0d 01 4a 48 20 e7 20  |ay scores..JH . |
00000220  70 3d 31 20 8c 20 f1 8a  36 2c 33 29 3b 22 4e 75  |p=1 . ..6,3);"Nu|
00000230  6d 62 65 72 20 6f 66 20  74 72 69 65 73 20 3d 20  |mber of tries = |
00000240  22 3b 67 75 65 73 73 3a  20 f1 8a 31 36 2c 35 29  |";guess: ..16,5)|
00000250  3b 22 53 63 6f 72 65 20  3d 20 22 3b 73 63 6f 72  |;"Score = ";scor|
00000260  65 0d 01 54 18 20 e7 20  70 3d 32 20 8c 20 f2 74  |e..T. . p=2 . .t|
00000270  77 6f 70 6c 61 79 65 72  73 0d 01 5e 1e 20 e7 20  |woplayers..^. . |
00000280  6c 73 63 6f 72 65 2b 6b  73 63 6f 72 65 3d 31 30  |lscore+kscore=10|
00000290  20 8c 20 8d 54 52 42 0d  01 68 05 20 0d 01 72 18  | . .TRB..h. ..r.|
000002a0  20 f4 20 43 68 6f 6f 73  65 20 66 69 72 73 74 20  | . Choose first |
000002b0  63 61 72 64 0d 01 7c 0c  20 f2 63 68 6f 69 63 65  |card..|. .choice|
000002c0  0d 01 86 1f 20 66 69 72  73 74 67 75 65 73 73 3d  |.... firstguess=|
000002d0  69 20 3a 20 6e 31 3d 6e  20 3a 20 6d 31 3d 6d 0d  |i : n1=n : m1=m.|
000002e0  01 90 05 20 0d 01 9a 1a  20 f4 20 43 68 6f 6f 73  |... .... . Choos|
000002f0  65 20 73 65 63 6f 6e 64  20 20 63 61 72 64 0d 01  |e second  card..|
00000300  a4 0e 20 f5 20 f2 63 68  6f 69 63 65 0d 01 ae 14  |.. . .choice....|
00000310  20 fd 20 69 3c 3e 66 69  72 73 74 67 75 65 73 73  | . i<>firstguess|
00000320  0d 01 b8 05 20 0d 01 c2  12 20 67 75 65 73 73 3d  |.... .... guess=|
00000330  67 75 65 73 73 2b 31 0d  01 cc 05 20 0d 01 d6 1e  |guess+1.... ....|
00000340  20 e7 20 70 6c 61 79 65  72 3d 30 20 8c 20 73 63  | . player=0 . sc|
00000350  6f 72 65 3d 6c 73 63 6f  72 65 0d 01 e0 1e 20 e7  |ore=lscore.... .|
00000360  20 70 6c 61 79 65 72 3d  31 20 8c 20 73 63 6f 72  | player=1 . scor|
00000370  65 3d 6b 73 63 6f 72 65  0d 01 ea 12 20 d1 3d 30  |e=kscore.... .=0|
00000380  3a f5 20 fd 20 91 3e 3d  38 30 0d 01 f4 05 20 0d  |:. . .>=80.... .|
00000390  01 fe 40 20 e7 20 c1 6a  24 2c 66 69 72 73 74 67  |..@ . .j$,firstg|
000003a0  75 65 73 73 2c 31 29 3d  c1 6a 24 2c 69 2c 31 29  |uess,1)=.j$,i,1)|
000003b0  20 8c 20 f2 74 68 65 79  5f 6d 61 74 63 68 20 3a  | . .they_match :|
000003c0  8b 20 f2 64 6f 5f 6e 6f  74 5f 6d 61 74 63 68 0d  |. .do_not_match.|
000003d0  02 08 05 20 0d 02 12 21  20 fd 73 63 6f 72 65 3d  |... ...! .score=|
000003e0  31 30 20 84 20 6c 73 63  6f 72 65 2b 6b 73 63 6f  |10 . lscore+ksco|
000003f0  72 65 3d 31 30 0d 02 1c  05 20 0d 02 26 16 20 e3  |re=10.... ..&. .|
00000400  69 3d 31 38 30 20 b8 20  31 32 30 20 88 20 2d 35  |i=180 . 120 . -5|
00000410  0d 02 30 0d 20 d4 31 2c  31 2c 69 2c 32 0d 02 3a  |..0. .1,1,i,2..:|
00000420  08 20 ed 20 69 0d 02 44  1f 20 f1 8a 30 2c 32 32  |. . i..D. ..0,22|
00000430  29 3b 89 28 33 38 29 3b  8a 30 2c 32 35 29 3b 89  |);.(38);.0,25);.|
00000440  28 33 38 29 0d 02 4e 34  20 e7 20 70 3d 32 20 80  |(38)..N4 . p=2 .|
00000450  20 6b 73 63 6f 72 65 3e  6c 73 63 6f 72 65 20 8c  | kscore>lscore .|
00000460  20 f1 20 8a 31 2c 32 33  29 3b 6b 24 3b 22 20 68  | . .1,23);k$;" h|
00000470  61 73 20 77 6f 6e 2e 22  0d 02 58 30 20 e7 20 70  |as won."..X0 . p|
00000480  3d 32 20 80 20 6b 73 63  6f 72 65 3d 6c 73 63 6f  |=2 . kscore=lsco|
00000490  72 65 20 8c 20 f1 20 8a  31 34 2c 32 33 29 3b 22  |re . . .14,23);"|
000004a0  41 20 64 72 61 77 21 22  0d 02 62 34 20 e7 20 70  |A draw!"..b4 . p|
000004b0  3d 32 20 80 20 6b 73 63  6f 72 65 3c 6c 73 63 6f  |=2 . kscore<lsco|
000004c0  72 65 20 8c 20 f1 20 8a  31 2c 32 33 29 3b 6c 24  |re . . .1,23);l$|
000004d0  3b 22 20 68 61 73 20 77  6f 6e 2e 22 0d 02 6c 29  |;" has won."..l)|
000004e0  20 f1 20 8a 32 2c 32 36  29 3b 22 2e 2e 2e 2e 2e  | . .2,26);".....|
000004f0  2e 2e 2e 54 68 61 74 27  73 20 61 6c 6c 20 66 6f  |...That's all fo|
00000500  6c 6b 73 2e 22 0d 02 76  0f 20 e3 20 7a 3d 31 20  |lks."..v. . z=1 |
00000510  b8 20 32 35 0d 02 80 12  20 d4 20 31 2c 2d 31 35  |. 25.... . 1,-15|
00000520  2c 37 2a 7a 2c 33 0d 02  8a 09 20 20 ed 20 7a 0d  |,7*z,3....  . z.|
00000530  02 94 31 20 f1 20 8a 30  2c 32 38 29 3b 22 44 6f  |..1 . .0,28);"Do|
00000540  20 79 6f 75 20 77 61 6e  74 20 61 6e 6f 74 68 65  | you want anothe|
00000550  72 20 67 61 6d 65 20 28  59 2f 4e 29 20 3f 22 3b  |r game (Y/N) ?";|
00000560  0d 02 9e 15 20 f5 20 6b  65 79 3d a7 22 59 79 4e  |.... . key=."YyN|
00000570  6e 22 2c be 29 0d 02 a8  0d 20 fd 20 6b 65 79 3c  |n",.).... . key<|
00000580  3e 30 0d 02 b2 10 20 e7  20 6b 65 79 3c 33 20 8c  |>0.... . key<3 .|
00000590  20 f9 0d 02 bc 05 20 0d  02 c6 0e 20 eb 20 36 3a  | ..... .... . 6:|
000005a0  f1 27 27 27 27 0d 02 d0  0c 20 2a 46 58 31 32 2c  |.''''.... *FX12,|
000005b0  30 0d 02 da 06 20 e0 0d  02 e4 05 20 0d 02 ee 21  |0.... ..... ...!|
000005c0  20 f4 20 20 20 20 2a 2a  2a 2a 2a 2a 2a 2a 2a 20  | .    ********* |
000005d0  45 4e 44 20 2a 2a 2a 2a  2a 2a 2a 2a 2a 0d 02 f8  |END *********...|
000005e0  05 20 0d 03 02 24 20 f4  20 2a 2a 2a 2a 2a 2a 2a  |. ...$ . *******|
000005f0  2a 20 53 55 42 52 4f 55  54 49 4e 45 53 20 2a 2a  |* SUBROUTINES **|
00000600  2a 2a 2a 2a 2a 2a 0d 03  0c 05 20 0d 03 16 11 dd  |******.... .....|
00000610  20 f2 74 77 6f 70 6c 61  79 65 72 73 0d 03 20 1e  | .twoplayers.. .|
00000620  20 e7 20 70 6c 61 79 65  72 3d 30 20 8c 20 6c 73  | . player=0 . ls|
00000630  63 6f 72 65 3d 73 63 6f  72 65 0d 03 2a 1e 20 e7  |core=score..*. .|
00000640  20 70 6c 61 79 65 72 3d  31 20 8c 20 6b 73 63 6f  | player=1 . ksco|
00000650  72 65 3d 73 63 6f 72 65  0d 03 34 14 20 70 6c 61  |re=score..4. pla|
00000660  79 65 72 3d 31 2d 70 6c  61 79 65 72 0d 03 3e 11  |yer=1-player..>.|
00000670  20 f4 20 73 77 61 70 20  74 75 72 6e 73 0d 03 48  | . swap turns..H|
00000680  4d 20 e7 20 70 3d 32 20  8c 20 f1 20 8a 36 2c 33  |M . p=2 . . .6,3|
00000690  29 3b 6c 24 3b 22 27 73  20 73 63 6f 72 65 20 3d  |);l$;"'s score =|
000006a0  20 22 3b 6c 73 63 6f 72  65 3a 20 f1 20 8a 36 2c  | ";lscore: . .6,|
000006b0  35 29 3b 6b 24 3b 22 27  73 20 73 63 6f 72 65 20  |5);k$;"'s score |
000006c0  3d 20 22 3b 6b 73 63 6f  72 65 0d 03 52 40 20 e7  |= ";kscore..R@ .|
000006d0  20 70 6c 61 79 65 72 3d  30 20 8c 20 73 63 6f 72  | player=0 . scor|
000006e0  65 3d 6c 73 63 6f 72 65  3a 20 f1 20 8a 31 2c 32  |e=lscore: . .1,2|
000006f0  32 29 3b 22 2a 2a 2a 20  22 3b 6c 24 3b 22 27 73  |2);"*** ";l$;"'s|
00000700  20 74 75 72 6e 20 2a 2a  2a 22 0d 03 5c 40 20 e7  | turn ***"..\@ .|
00000710  20 70 6c 61 79 65 72 3d  31 20 8c 20 73 63 6f 72  | player=1 . scor|
00000720  65 3d 6b 73 63 6f 72 65  3a 20 f1 20 8a 31 2c 32  |e=kscore: . .1,2|
00000730  32 29 3b 22 2a 2a 2a 20  22 3b 6b 24 3b 22 27 73  |2);"*** ";k$;"'s|
00000740  20 74 75 72 6e 20 2a 2a  2a 22 0d 03 66 1b 20 ef  | turn ***"..f. .|
00000750  31 39 2c 30 2c 70 6c 61  79 65 72 2a 33 2b 31 2c  |19,0,player*3+1,|
00000760  30 2c 30 2c 30 0d 03 70  1c 20 d4 31 2c 2d 31 35  |0,0,0..p. .1,-15|
00000770  2c 70 6c 61 79 65 72 2a  31 35 30 2b 32 30 2c 31  |,player*150+20,1|
00000780  30 0d 03 7a 05 e1 0d 03  84 05 20 0d 03 8e 0d dd  |0..z...... .....|
00000790  20 f2 63 68 6f 69 63 65  0d 03 98 06 20 f5 0d 03  | .choice.... ...|
000007a0  a2 2a 20 20 f1 20 8a 30  2c 32 35 29 22 20 57 68  |.*  . .0,25)" Wh|
000007b0  69 63 68 20 63 61 72 64  73 20 3f 20 20 20 20 20  |ich cards ?     |
000007c0  20 20 20 20 20 20 20 22  0d 03 ac 11 20 20 e8 20  |       "....  . |
000007d0  8a 31 35 2c 32 35 29 20  69 0d 03 b6 1e 20 20 63  |.15,25) i....  c|
000007e0  24 3d c1 6a 24 2c 69 2c  31 29 3a 20 f4 20 46 69  |$=.j$,i,1): . Fi|
000007f0  6e 64 20 63 61 72 64 0d  03 c0 1d 20 fd 20 69 3e  |nd card.... . i>|
00000800  3d 31 20 80 20 69 3c 3d  32 30 20 80 20 63 24 3c  |=1 . i<=20 . c$<|
00000810  3e 22 2d 22 0d 03 ca 1f  20 f1 20 8a 31 35 2c 32  |>"-".... . .15,2|
00000820  35 29 20 22 20 20 20 20  20 20 20 20 20 20 20 20  |5) "            |
00000830  20 20 22 0d 03 d4 10 20  6d 3d 28 69 2d 31 29 20  |  ".... m=(i-1) |
00000840  81 20 35 0d 03 de 10 20  6e 3d 28 69 2d 31 29 20  |. 5.... n=(i-1) |
00000850  83 20 35 0d 03 e8 05 20  0d 03 f2 10 20 f4 20 53  |. 5.... .... . S|
00000860  68 6f 77 20 63 61 72 64  0d 03 fc 0b 20 f7 20 8d  |how card.... . .|
00000870  44 74 44 0d 04 06 19 20  e7 20 70 3d 31 20 fb 20  |DtD.... . p=1 . |
00000880  28 97 28 63 24 29 83 20  33 29 2b 31 0d 04 10 19  |(.(c$). 3)+1....|
00000890  20 e7 20 70 3d 32 20 fb  20 28 97 28 63 24 29 83  | . p=2 . (.(c$).|
000008a0  20 32 29 2b 32 0d 04 1a  1c 20 e7 20 63 24 3c 22  | 2)+2.... . c$<"|
000008b0  41 22 20 84 20 63 24 3e  22 4a 22 20 e5 8d 44 42  |A" . c$>"J" ..DB|
000008c0  44 0d 04 24 06 20 f5 0d  04 2e 15 20 20 f3 20 6c  |D..$. .....  . l|
000008d0  65 74 74 65 72 24 2c 78  24 2c 79 24 0d 04 38 11  |etter$,x$,y$..8.|
000008e0  20 fd 20 6c 65 74 74 65  72 24 3d 63 24 0d 04 42  | . letter$=c$..B|
000008f0  19 20 f1 20 8a 33 2a 6e  2b 31 31 2c 33 2a 6d 2b  |. . .3*n+11,3*m+|
00000900  31 30 29 20 78 24 0d 04  4c 19 20 f1 20 8a 33 2a  |10) x$..L. . .3*|
00000910  6e 2b 31 31 2c 33 2a 6d  2b 31 31 29 20 79 24 0d  |n+11,3*m+11) y$.|
00000920  04 56 08 20 fb 20 33 0d  04 60 05 e1 0d 04 6a 05  |.V. . 3..`....j.|
00000930  20 0d 04 74 56 20 dc 20  41 2c 2b 2b 2c 2b 2b 2c  | ..tV . A,++,++,|
00000940  42 2c 2f 5c 2c 5c 2f 2c  43 2c 5b 5d 2c 5b 5d 2c  |B,/\,\/,C,[],[],|
00000950  44 2c 3a 3a 2c 3a 3a 2c  45 2c 40 40 2c 40 40 2c  |D,::,::,E,@@,@@,|
00000960  46 2c 58 58 2c 58 58 2c  47 2c 2a 2a 2c 2a 2a 2c  |F,XX,XX,G,**,**,|
00000970  48 2c 29 28 2c 29 28 2c  49 2c 3d 3d 2c 3d 3d 2c  |H,)(,)(,I,==,==,|
00000980  4a 2c 4f 4f 2c 4f 4f 0d  04 7e 05 20 0d 04 88 11  |J,OO,OO..~. ....|
00000990  dd 20 f2 74 68 65 79 5f  6d 61 74 63 68 0d 04 92  |. .they_match...|
000009a0  32 20 6a 24 3d c0 6a 24  2c 66 69 72 73 74 67 75  |2 j$=.j$,firstgu|
000009b0  65 73 73 2d 31 29 2b 22  2d 22 2b c2 6a 24 2c a9  |ess-1)+"-"+.j$,.|
000009c0  20 6a 24 2d 66 69 72 73  74 67 75 65 73 73 29 0d  | j$-firstguess).|
000009d0  04 9c 20 20 6a 24 3d c0  6a 24 2c 69 2d 31 29 2b  |..  j$=.j$,i-1)+|
000009e0  22 2d 22 2b c2 6a 24 2c  a9 20 6a 24 2d 69 29 0d  |"-"+.j$,. j$-i).|
000009f0  04 a6 12 20 73 63 6f 72  65 3d 73 63 6f 72 65 2b  |... score=score+|
00000a00  31 0d 04 b0 10 20 e3 20  7a 3d 35 33 20 b8 20 36  |1.... . z=53 . 6|
00000a10  33 0d 04 ba 10 20 20 d4  31 2c 31 2c 7a 2a 35 2c  |3....  .1,1,z*5,|
00000a20  32 0d 04 c4 08 20 ed 20  7a 0d 04 ce 12 20 d1 3d  |2.... . z.... .=|
00000a30  30 3a f5 20 fd 20 91 3e  3d 38 30 0d 04 d8 05 e1  |0:. . .>=80.....|
00000a40  0d 04 e2 05 20 0d 04 ec  13 dd 20 f2 64 6f 5f 6e  |.... ..... .do_n|
00000a50  6f 74 5f 6d 61 74 63 68  0d 04 f6 15 20 e3 7a 3d  |ot_match.... .z=|
00000a60  35 30 20 b8 20 32 30 30  20 88 20 32 30 0d 05 00  |50 . 200 . 20...|
00000a70  10 20 20 d4 31 2c 2d 31  35 2c 7a 2c 31 0d 05 0a  |.  .1,-15,z,1...|
00000a80  08 20 ed 20 7a 0d 05 14  10 20 d4 31 2c 2d 31 35  |. . z.... .1,-15|
00000a90  2c 37 30 2c 32 0d 05 1e  28 20 f1 20 8a 33 2a 6e  |,70,2...( . .3*n|
00000aa0  31 2b 31 31 2c 33 2a 6d  31 2b 31 30 29 3b 20 66  |1+11,3*m1+10); f|
00000ab0  69 72 73 74 67 75 65 73  73 20 22 20 22 0d 05 28  |irstguess " "..(|
00000ac0  1d 20 f1 20 8a 33 2a 6e  31 2b 31 31 2c 33 2a 6d  |. . .3*n1+11,3*m|
00000ad0  31 2b 31 31 29 20 22 20  20 22 0d 05 32 1d 20 f1  |1+11) "  "..2. .|
00000ae0  20 8a 33 2a 6e 2b 31 31  2c 33 2a 6d 2b 31 30 29  | .3*n+11,3*m+10)|
00000af0  3b 20 69 20 22 20 22 0d  05 3c 1b 20 f1 20 8a 33  |; i " "..<. . .3|
00000b00  2a 6e 2b 31 31 2c 33 2a  6d 2b 31 31 29 20 22 20  |*n+11,3*m+11) " |
00000b10  20 22 0d 05 46 12 20 d1  3d 30 3a f5 20 fd 20 91  | "..F. .=0:. . .|
00000b20  3e 3d 38 30 0d 05 50 05  e1 0d 05 5a 05 20 0d 05  |>=80..P....Z. ..|
00000b30  64 13 dd 20 f2 69 6e 74  72 6f 64 75 63 74 69 6f  |d.. .introductio|
00000b40  6e 0d 05 6e 1f 20 f4 20  54 75 72 6e 20 6f 66 66  |n..n. . Turn off|
00000b50  20 6b 65 79 62 6f 61 72  64 20 72 65 70 65 61 74  | keyboard repeat|
00000b60  0d 05 78 0c 20 2a 46 58  31 31 2c 30 0d 05 82 1e  |..x. *FX11,0....|
00000b70  20 70 6c 61 79 65 72 3d  31 30 30 3a 20 f4 20 64  | player=100: . d|
00000b80  75 6d 6d 79 20 76 61 6c  75 65 0d 05 8c 21 20 ef  |ummy value...! .|
00000b90  20 31 39 2c 30 2c 34 2c  30 2c 30 2c 30 3a ef 31  | 19,0,4,0,0,0:.1|
00000ba0  39 2c 33 2c 36 2c 30 2c  30 2c 30 0d 05 96 2b 20  |9,3,6,0,0,0...+ |
00000bb0  f1 20 8a 35 2c 31 30 29  3b 22 2a 2a 2a 2a 2a 2a  |. .5,10);"******|
00000bc0  20 4d 20 41 20 54 20 43  20 48 20 45 20 4d 20 2a  | M A T C H E M *|
00000bd0  2a 2a 2a 2a 2a 22 0d 05  a0 2b 20 f1 20 8a 35 2c  |*****"...+ . .5,|
00000be0  32 30 29 3b 22 48 6f 77  20 6d 61 6e 79 20 70 6c  |20);"How many pl|
00000bf0  61 79 65 72 73 20 28 31  20 6f 72 20 32 29 20 3f  |ayers (1 or 2) ?|
00000c00  22 0d 05 aa 0b 20 f5 20  70 24 3d be 0d 05 b4 16  |".... . p$=.....|
00000c10  20 fd 20 70 24 3d 22 31  22 20 84 20 70 24 3d 22  | . p$="1" . p$="|
00000c20  32 22 0d 05 be 0c 20 70  3d bb 28 70 24 29 0d 05  |2".... p=.(p$)..|
00000c30  c8 06 20 db 0d 05 d2 0e  20 e7 20 70 3d 31 20 8c  |.. ..... . p=1 .|
00000c40  20 e1 0d 05 dc 35 20 e8  20 8a 30 2c 36 29 3b 22  | ....5 . .0,6);"|
00000c50  50 6c 61 79 65 72 20 31  2c 20 70 6c 65 61 73 65  |Player 1, please|
00000c60  20 69 6e 70 75 74 20 79  6f 75 72 20 6e 61 6d 65  | input your name|
00000c70  20 22 27 27 20 6c 24 0d  05 e6 11 20 d4 31 2c 2d  | "'' l$.... .1,-|
00000c80  31 35 2c 32 30 2c 31 30  0d 05 f0 36 20 e8 20 8a  |15,20,10...6 . .|
00000c90  30 2c 31 32 29 3b 22 50  6c 61 79 65 72 20 32 2c  |0,12);"Player 2,|
00000ca0  20 70 6c 65 61 73 65 20  69 6e 70 75 74 20 79 6f  | please input yo|
00000cb0  75 72 20 6e 61 6d 65 20  22 27 27 20 6b 24 0d 05  |ur name "'' k$..|
00000cc0  fa 12 20 d4 31 2c 2d 31  35 2c 31 37 30 2c 31 30  |.. .1,-15,170,10|
00000cd0  0d 06 04 42 20 f1 20 8a  30 2c 32 30 29 3b 6c 24  |...B . .0,20);l$|
00000ce0  3b 22 20 61 6e 64 20 22  3b 6b 24 3b 22 2c 22 27  |;" and ";k$;","'|
00000cf0  27 22 20 70 72 65 73 73  20 61 20 6b 65 79 20 77  |'" press a key w|
00000d00  68 65 6e 20 79 6f 75 20  61 72 65 20 72 65 61 64  |hen you are read|
00000d10  79 22 0d 06 0e 0a 20 6b  65 79 3d a5 0d 06 18 4a  |y".... key=....J|
00000d20  20 70 6c 61 79 65 72 3d  31 20 3a f4 20 70 6c 61  | player=1 :. pla|
00000d30  79 65 72 3d 30 20 6d 65  61 6e 73 20 66 69 72 73  |yer=0 means firs|
00000d40  74 20 70 6c 61 79 65 72  2c 20 70 6c 61 79 65 72  |t player, player|
00000d50  3d 31 20 6d 65 61 6e 73  20 73 65 63 6f 6e 64 20  |=1 means second |
00000d60  70 6c 61 79 65 72 0d 06  22 06 20 db 0d 06 2c 05  |player..". ...,.|
00000d70  e1 0d ff                                          |...|
00000d73
MATCHEM.m0
MATCHEM.m1
MATCHEM.m2
MATCHEM.m4
MATCHEM.m5