Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Extras » PDScheme/Atterer/Mastermind

PDScheme/Atterer/Mastermind

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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Extras
Filename: PDScheme/Atterer/Mastermind
Read OK:
File size: 0FA8 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM>Mastermind - LREPORTser
   20REM Richard Atterer 16.12.1993
   30
   40i%=RND(-TIME)
   50
   60MODE 13
   70ON ERROR CLS:ON:END
   80PRINT"M A S T E R M I N D   S O L V I N G"'
   90PRINT'"programmed 'just for fun' by"'"Richard Atterer on 16.-18.12.1993"
  100INPUT'''"number of colours (RETURN: 8) ";farbanz%
  110IFfarbanz%=0THENfarbanz%=8
  120INPUT'"number of columns (RETURN: 4) ";spaltanz%
  130IFspaltanz%=0THENspaltanz%=4
  140farbanz%-=1
  150spaltanz%-=1
  160
  170CLS:OFF
  180DIMversuch%(19,spaltanz%)
  190DIMakt%(spaltanz%)
  200DIManf%(spaltanz%)
  210DIMrfarb%(19),rstellufarb%(19)
  220DIMsuf%(spaltanz%),f%(spaltanz%)
  230DIMcolours%(farbanz%)
  240colours%()=-1
  250
  260FORx%=0TO15
  270FORy%=0TO15
  280PROCsetcol(y%<<4ORx%)
  290RECTANGLE FILL x%<<5,482-(y%<<5),31,31
  300NEXT
  310NEXT
  320*Pointer
  330FORc%=0TOfarbanz%
  340PRINT TAB(0,0)"choose colour number ";c%+1
  350REPEAT
  360col%=-1
  370REPEAT
  380MOUSEx%,y%,z%
  390UNTILz%=0
  400REPEAT
  410MOUSEx%,y%,z%
  420UNTILz%>0
  430IFx%<512ANDy%<512 THEN
  440col%=(((512-y%)AND%111100000)>>1) OR x%>>5
  450FORi%=0TOc%
  460IFcolours%(i%)=col%THEN col%=-1:VDU 7
  470NEXT
  480ENDIF
  490UNTILcol%>=0
  500colours%(c%)=col%
  510PROCsetcol(col%)
  520CIRCLE FILL 600+(c%<<5),256,32
  530NEXT
  540TIME=0
  550REPEAT UNTIL TIME>50
  560
  570
  580CLS:*Pointer 0
  590PROCsetcol(87)
  600RECTANGLE 0,0,50*(spaltanz%+1),1000
  610FORi%=1TO19
  620LINE0,50*i%,50*(spaltanz%+1),50*i%
  630NEXT
  640
  650PRINT TAB(18,0)"right colour x times"TAB(18,5)"right col and pos"
  660FORi%=0TOspaltanz%+1
  670RECTANGLE 560+(i%<<6),912,64,64
  680PRINT TAB(18+(i%<<1),2);i%
  690RECTANGLE 560+(i%<<6),752,64,64
  700PRINT TAB(18+(i%<<1),7);i%
  710NEXT
  720RECTANGLE 560,624,96,64:PRINT TAB(18,11)"OK"
  730rectx%=560+((spaltanz%+1)<<6)+64
  740:
  750FORi%=0TOspaltanz%
  760anf%(i%)=RND(farbanz%)
  770NEXT
  780akt%()=anf%()
  790
  800maxkomb=(farbanz%+1)^(spaltanz%+1)
  810kombnr=0
  820versuch%=0
  830
  840PROCpaintakt
  850PROCinputnr
  860PROCmovedata
  870PRINT TAB(18,16)"of possible"TAB(18,17);maxkomb
  880
  890FORversuch%=1TO19
  900REPEAT
  910
  920i%=0:REM NGOSUBchste KombinationsmREPORTglichkeit
  930REPEAT
  940akt%(i%)+=1
  950IFakt%(i%)>farbanz%THEN akt%(i%)=0:i%+=1 ELSEi%=spaltanz%+1
  960UNTILi%>spaltanz%
  970PRINT TAB(18,15);kombnr:kombnr+=1
  980
  990gleich%=TRUE:REM Schon alle Kombinationen?
 1000FORi%=0TOspaltanz%
 1010IFakt%(i%)<>anf%(i%)THENgleich%=FALSE
 1020NEXT
 1030IFgleich% THEN
 1040PROCclear
 1050PRINT TAB(18,15)"THAT'S IMPOSSIBLE!!!"TAB(0,0);
 1060a$=GET$:ON:CLS:END
 1070ENDIF
 1080
 1090moglich%=TRUE
 1100
 1110i%=versuch%-1
 1120REPEAT
 1130PROCcheck(i%)
 1140IFsuf%<>rstellufarb%(i%) OR f%<>rfarb%(i%)THEN i%=0:moglich%=FALSE
 1150i%-=1
 1160UNTIL i%<0
 1170
 1180UNTIL moglich%
 1190
 1200PROCpaintakt
 1210PROCinputnr
 1220IFpos2%=spaltanz%+1THEN
 1230PROCclear
 1240PRINT TAB(18,15)"game won with "TAB(18,16);versuch%+1" tries!"TAB(0,0);
 1250a$=GET$:ON:CLS:END
 1260ENDIF
 1270PROCmovedata
 1280
 1290NEXTversuch%
 1300
 1310PROCclear
 1320PRINT TAB(18,15)"Oh no, I lost..."TAB(0,0);
 1330a$=GET$:ON:CLS:END
 1340
 1350
 1360REM------------------------------
 1370DEF PROCsetcol(col%)
 1380GCOL col%>>2 TINT (col%AND3)<<6
 1390ENDPROC
 1400
 1410REM------------------------------
 1420DEF PROCpaintakt
 1430LOCAL i%
 1440FORi%=0TOspaltanz%
 1450PROCsetcol(colours%(akt%(i%)))
 1460CIRCLE FILL 25+i%*50,25+versuch%*50,20
 1470NEXT
 1480ENDPROC
 1490
 1500REM------------------------------
 1510DEF PROCinputnr
 1520VDU 7
 1530PROCsetcol(15)
 1540RECTANGLE 564,916,56,56:RECTANGLE 564,756,56,56:pos1%=0:pos2%=0
 1550*Pointer
 1560REPEAT
 1570REPEAT
 1580MOUSE x%,y%,z%
 1590UNTIL z%=0
 1600REPEAT
 1610MOUSE x%,y%,z%
 1620UNTIL z%>0
 1630IF x%>560ANDx%<rectx% THEN
 1640IF y%>911ANDy%<976THEN
 1650PROCsetcol(0):RECTANGLE 564+(pos1%<<6),916,56,56
 1660pos1%=(x%-560)>>6
 1670PROCsetcol(15):RECTANGLE 564+(pos1%<<6),916,56,56
 1680ENDIF
 1690IF y%>751ANDy%<816THEN
 1700PROCsetcol(0):RECTANGLE 564+(pos2%<<6),756,56,56
 1710pos2%=(x%-560)>>6
 1720PROCsetcol(15):RECTANGLE 564+(pos2%<<6),756,56,56
 1730ENDIF
 1740ENDIF
 1750UNTILx%>560ANDx%<656ANDy%>624ANDy%<688
 1760*Pointer 0
 1770PROCsetcol(0)
 1780RECTANGLE 564+(pos1%<<6),916,56,56:RECTANGLE 564+(pos2%<<6),756,56,56
 1790VDU 5:REM Text an Grafikcursor ausgeben
 1800PROCsetcol(255)
 1810MOVE 64+50*spaltanz%,36+50*versuch%:PRINT;pos1%",";pos2%
 1820VDU 4:OFF
 1830ENDPROC
 1840
 1850REM------------------------------
 1860DEF PROCmovedata
 1870LOCAL i%
 1880rfarb%(versuch%)=pos1%
 1890rstellufarb%(versuch%)=pos2%
 1900FORi%=0TOspaltanz%
 1910versuch%(versuch%,i%)=akt%(i%)
 1920NEXT
 1930ENDPROC
 1940
 1950REM------------------------------
 1960DEF PROCcheck(nr%)
 1970LOCALi%,j%
 1980suf%=0:suf%()=FALSE
 1990FORi%=0TOspaltanz%
 2000IF versuch%(nr%,i%)=akt%(i%)THEN suf%+=1:suf%(i%)=TRUE
 2010NEXT
 2020:
 2030f%=0:f%()=suf%()
 2040FORi%=0TOspaltanz%
 2050IF NOT suf%(i%) THEN
 2060j%=spaltanz%:REPEAT
 2070IF f%(j%)=FALSE AND akt%(i%)=versuch%(nr%,j%)THEN f%+=1:f%(j%)=TRUE:j%=0
 2080j%-=1:UNTILj%<0
 2090ENDIF
 2100NEXT
 2110ENDPROC
 2120
 2130REM------------------------------
 2140DEF PROCclear
 2150PRINT TAB(18,16)SPC(11)TAB(18,17)SPC(20)
 2160ENDPROC

�>Mastermind - L�ser
 � Richard Atterer 16.12.1993

(i%=�(-�)
2
<� 13
F
� � �:�:�
P+�"M A S T E R M I N D   S O L V I N G"'
ZH�'"programmed 'just for fun' by"'"Richard Atterer on 16.-18.12.1993"
d1�'''"number of colours (RETURN: 8) ";farbanz%
n�farbanz%=0�farbanz%=8
x0�'"number of columns (RETURN: 4) ";spaltanz%
��spaltanz%=0�spaltanz%=4
�farbanz%-=1
�spaltanz%-=1
�
��:�
��versuch%(19,spaltanz%)
��akt%(spaltanz%)
��anf%(spaltanz%)
� �rfarb%(19),rstellufarb%(19)
�"�suf%(spaltanz%),f%(spaltanz%)
��colours%(farbanz%)
�colours%()=-1
�
�x%=0�15
�y%=0�15
�setcol(y%<<4�x%)
"!ȓ Ȑ x%<<5,482-(y%<<5),31,31
,�
6�
@*Pointer
J�c%=0�farbanz%
T'� �0,0)"choose colour number ";c%+1
^�
hcol%=-1
r�
|ȗx%,y%,z%
�	�z%=0
��
�ȗx%,y%,z%
�	�z%>0
��x%<512�y%<512 �
�+col%=(((512-y%)�%111100000)>>1) � x%>>5
��i%=0�c%
�#�colours%(i%)=col%� col%=-1:� 7
��
��
��col%>=0
�colours%(c%)=col%
��setcol(col%)
ȏ Ȑ 600+(c%<<5),256,32
�
�=0
&� � �>50
0
:
D�:*Pointer 0
N�setcol(87)
X ȓ 0,0,50*(spaltanz%+1),1000
b�i%=1�19
l#�0,50*i%,50*(spaltanz%+1),50*i%
v�
�
�;� �18,0)"right colour x times"�18,5)"right col and pos"
��i%=0�spaltanz%+1
�ȓ 560+(i%<<6),912,64,64
�� �18+(i%<<1),2);i%
�ȓ 560+(i%<<6),752,64,64
�� �18+(i%<<1),7);i%
��
�"ȓ 560,624,96,64:� �18,11)"OK"
�$rectx%=560+((spaltanz%+1)<<6)+64
�:
��i%=0�spaltanz%
�anf%(i%)=�(farbanz%)
�
akt%()=anf%()

 &maxkomb=(farbanz%+1)^(spaltanz%+1)
*kombnr=0
4versuch%=0
>
H
�paintakt
R�inputnr
\
�movedata
f)� �18,16)"of possible"�18,17);maxkomb
p
z�versuch%=1�19
��
�
�*i%=0:� N�chste Kombinationsm�glichkeit
��
�akt%(i%)+=1
�8�akt%(i%)>farbanz%� akt%(i%)=0:i%+=1 �i%=spaltanz%+1
��i%>spaltanz%
�� �18,15);kombnr:kombnr+=1
�
�)gleich%=�:� Schon alle Kombinationen?
��i%=0�spaltanz%
�!�akt%(i%)<>anf%(i%)�gleich%=�
��
�gleich% �

�clear
)� �18,15)"THAT'S IMPOSSIBLE!!!"�0,0);
$a$=�:�:�:�
.�
8
Bmoglich%=�
L
Vi%=versuch%-1
`�
j�check(i%)
t=�suf%<>rstellufarb%(i%) � f%<>rfarb%(i%)� i%=0:moglich%=�
~	i%-=1
�
� i%<0
�
�� moglich%
�
�
�paintakt
��inputnr
��pos2%=spaltanz%+1�
�
�clear
�>� �18,15)"game won with "�18,16);versuch%+1" tries!"�0,0);
�a$=�:�:�:�
��
�
�movedata



�versuch%


�clear
(%� �18,15)"Oh no, I lost..."�0,0);
2a$=�:�:�:�
<
F
P#�------------------------------
Z� �setcol(col%)
d� col%>>2 Ȝ (col%�3)<<6
n�
x
�#�------------------------------
�� �paintakt
�� i%
��i%=0�spaltanz%
��setcol(colours%(akt%(i%)))
�$ȏ Ȑ 25+i%*50,25+versuch%*50,20
��
��
�
�#�------------------------------
�� �inputnr
�� 7
��setcol(15)
5ȓ 564,916,56,56:ȓ 564,756,56,56:pos1%=0:pos2%=0
*Pointer
�
"�
,ȗ x%,y%,z%
6
� z%=0
@�
Jȗ x%,y%,z%
T
� z%>0
^� x%>560�x%<rectx% �
h� y%>911�y%<976�
r*�setcol(0):ȓ 564+(pos1%<<6),916,56,56
|pos1%=(x%-560)>>6
�+�setcol(15):ȓ 564+(pos1%<<6),916,56,56
��
�� y%>751�y%<816�
�*�setcol(0):ȓ 564+(pos2%<<6),756,56,56
�pos2%=(x%-560)>>6
�+�setcol(15):ȓ 564+(pos2%<<6),756,56,56
��
��
� �x%>560�x%<656�y%>624�y%<688
�*Pointer 0
��setcol(0)
�;ȓ 564+(pos1%<<6),916,56,56:ȓ 564+(pos2%<<6),756,56,56
�'� 5:� Text an Grafikcursor ausgeben
�setcol(255)
5� 64+50*spaltanz%,36+50*versuch%:�;pos1%",";pos2%
	� 4:�
&�
0
:#�------------------------------
D� �movedata
N� i%
Xrfarb%(versuch%)=pos1%
b rstellufarb%(versuch%)=pos2%
l�i%=0�spaltanz%
v"versuch%(versuch%,i%)=akt%(i%)
��
��
�
�#�------------------------------
�� �check(nr%)
�
�i%,j%
�suf%=0:suf%()=�
��i%=0�spaltanz%
�3� versuch%(nr%,i%)=akt%(i%)� suf%+=1:suf%(i%)=�
��
�:
�f%=0:f%()=suf%()
��i%=0�spaltanz%
� � suf%(i%) �
j%=spaltanz%:�
?� f%(j%)=� � akt%(i%)=versuch%(nr%,j%)� f%+=1:f%(j%)=�:j%=0
 j%-=1:�j%<0
*�
4�
>�
H
R#�------------------------------
\� �clear
f� �18,16)�(11)�18,17)�(20)
p�
�
00000000  0d 00 0a 18 f4 3e 4d 61  73 74 65 72 6d 69 6e 64  |.....>Mastermind|
00000010  20 2d 20 4c f6 73 65 72  0d 00 14 20 f4 20 52 69  | - L.ser... . Ri|
00000020  63 68 61 72 64 20 41 74  74 65 72 65 72 20 31 36  |chard Atterer 16|
00000030  2e 31 32 2e 31 39 39 33  0d 00 1e 04 0d 00 28 0c  |.12.1993......(.|
00000040  69 25 3d b3 28 2d 91 29  0d 00 32 04 0d 00 3c 08  |i%=.(-.)..2...<.|
00000050  eb 20 31 33 0d 00 46 0d  ee 20 85 20 db 3a ee 3a  |. 13..F.. . .:.:|
00000060  e0 0d 00 50 2b f1 22 4d  20 41 20 53 20 54 20 45  |...P+."M A S T E|
00000070  20 52 20 4d 20 49 20 4e  20 44 20 20 20 53 20 4f  | R M I N D   S O|
00000080  20 4c 20 56 20 49 20 4e  20 47 22 27 0d 00 5a 48  | L V I N G"'..ZH|
00000090  f1 27 22 70 72 6f 67 72  61 6d 6d 65 64 20 27 6a  |.'"programmed 'j|
000000a0  75 73 74 20 66 6f 72 20  66 75 6e 27 20 62 79 22  |ust for fun' by"|
000000b0  27 22 52 69 63 68 61 72  64 20 41 74 74 65 72 65  |'"Richard Attere|
000000c0  72 20 6f 6e 20 31 36 2e  2d 31 38 2e 31 32 2e 31  |r on 16.-18.12.1|
000000d0  39 39 33 22 0d 00 64 31  e8 27 27 27 22 6e 75 6d  |993"..d1.'''"num|
000000e0  62 65 72 20 6f 66 20 63  6f 6c 6f 75 72 73 20 28  |ber of colours (|
000000f0  52 45 54 55 52 4e 3a 20  38 29 20 22 3b 66 61 72  |RETURN: 8) ";far|
00000100  62 61 6e 7a 25 0d 00 6e  1a e7 66 61 72 62 61 6e  |banz%..n..farban|
00000110  7a 25 3d 30 8c 66 61 72  62 61 6e 7a 25 3d 38 0d  |z%=0.farbanz%=8.|
00000120  00 78 30 e8 27 22 6e 75  6d 62 65 72 20 6f 66 20  |.x0.'"number of |
00000130  63 6f 6c 75 6d 6e 73 20  28 52 45 54 55 52 4e 3a  |columns (RETURN:|
00000140  20 34 29 20 22 3b 73 70  61 6c 74 61 6e 7a 25 0d  | 4) ";spaltanz%.|
00000150  00 82 1c e7 73 70 61 6c  74 61 6e 7a 25 3d 30 8c  |....spaltanz%=0.|
00000160  73 70 61 6c 74 61 6e 7a  25 3d 34 0d 00 8c 0f 66  |spaltanz%=4....f|
00000170  61 72 62 61 6e 7a 25 2d  3d 31 0d 00 96 10 73 70  |arbanz%-=1....sp|
00000180  61 6c 74 61 6e 7a 25 2d  3d 31 0d 00 a0 04 0d 00  |altanz%-=1......|
00000190  aa 07 db 3a 87 0d 00 b4  1b de 76 65 72 73 75 63  |...:......versuc|
000001a0  68 25 28 31 39 2c 73 70  61 6c 74 61 6e 7a 25 29  |h%(19,spaltanz%)|
000001b0  0d 00 be 14 de 61 6b 74  25 28 73 70 61 6c 74 61  |.....akt%(spalta|
000001c0  6e 7a 25 29 0d 00 c8 14  de 61 6e 66 25 28 73 70  |nz%).....anf%(sp|
000001d0  61 6c 74 61 6e 7a 25 29  0d 00 d2 20 de 72 66 61  |altanz%)... .rfa|
000001e0  72 62 25 28 31 39 29 2c  72 73 74 65 6c 6c 75 66  |rb%(19),rstelluf|
000001f0  61 72 62 25 28 31 39 29  0d 00 dc 22 de 73 75 66  |arb%(19)...".suf|
00000200  25 28 73 70 61 6c 74 61  6e 7a 25 29 2c 66 25 28  |%(spaltanz%),f%(|
00000210  73 70 61 6c 74 61 6e 7a  25 29 0d 00 e6 17 de 63  |spaltanz%).....c|
00000220  6f 6c 6f 75 72 73 25 28  66 61 72 62 61 6e 7a 25  |olours%(farbanz%|
00000230  29 0d 00 f0 11 63 6f 6c  6f 75 72 73 25 28 29 3d  |)....colours%()=|
00000240  2d 31 0d 00 fa 04 0d 01  04 0c e3 78 25 3d 30 b8  |-1.........x%=0.|
00000250  31 35 0d 01 0e 0c e3 79  25 3d 30 b8 31 35 0d 01  |15.....y%=0.15..|
00000260  18 15 f2 73 65 74 63 6f  6c 28 79 25 3c 3c 34 84  |...setcol(y%<<4.|
00000270  78 25 29 0d 01 22 21 c8  93 20 c8 90 20 78 25 3c  |x%).."!.. .. x%<|
00000280  3c 35 2c 34 38 32 2d 28  79 25 3c 3c 35 29 2c 33  |<5,482-(y%<<5),3|
00000290  31 2c 33 31 0d 01 2c 05  ed 0d 01 36 05 ed 0d 01  |1,31..,....6....|
000002a0  40 0c 2a 50 6f 69 6e 74  65 72 0d 01 4a 12 e3 63  |@.*Pointer..J..c|
000002b0  25 3d 30 b8 66 61 72 62  61 6e 7a 25 0d 01 54 27  |%=0.farbanz%..T'|
000002c0  f1 20 8a 30 2c 30 29 22  63 68 6f 6f 73 65 20 63  |. .0,0)"choose c|
000002d0  6f 6c 6f 75 72 20 6e 75  6d 62 65 72 20 22 3b 63  |olour number ";c|
000002e0  25 2b 31 0d 01 5e 05 f5  0d 01 68 0b 63 6f 6c 25  |%+1..^....h.col%|
000002f0  3d 2d 31 0d 01 72 05 f5  0d 01 7c 0e c8 97 78 25  |=-1..r....|...x%|
00000300  2c 79 25 2c 7a 25 0d 01  86 09 fd 7a 25 3d 30 0d  |,y%,z%.....z%=0.|
00000310  01 90 05 f5 0d 01 9a 0e  c8 97 78 25 2c 79 25 2c  |..........x%,y%,|
00000320  7a 25 0d 01 a4 09 fd 7a  25 3e 30 0d 01 ae 14 e7  |z%.....z%>0.....|
00000330  78 25 3c 35 31 32 80 79  25 3c 35 31 32 20 8c 0d  |x%<512.y%<512 ..|
00000340  01 b8 2b 63 6f 6c 25 3d  28 28 28 35 31 32 2d 79  |..+col%=(((512-y|
00000350  25 29 80 25 31 31 31 31  30 30 30 30 30 29 3e 3e  |%).%111100000)>>|
00000360  31 29 20 84 20 78 25 3e  3e 35 0d 01 c2 0c e3 69  |1) . x%>>5.....i|
00000370  25 3d 30 b8 63 25 0d 01  cc 23 e7 63 6f 6c 6f 75  |%=0.c%...#.colou|
00000380  72 73 25 28 69 25 29 3d  63 6f 6c 25 8c 20 63 6f  |rs%(i%)=col%. co|
00000390  6c 25 3d 2d 31 3a ef 20  37 0d 01 d6 05 ed 0d 01  |l%=-1:. 7.......|
000003a0  e0 05 cd 0d 01 ea 0c fd  63 6f 6c 25 3e 3d 30 0d  |........col%>=0.|
000003b0  01 f4 15 63 6f 6c 6f 75  72 73 25 28 63 25 29 3d  |...colours%(c%)=|
000003c0  63 6f 6c 25 0d 01 fe 11  f2 73 65 74 63 6f 6c 28  |col%.....setcol(|
000003d0  63 6f 6c 25 29 0d 02 08  1c c8 8f 20 c8 90 20 36  |col%)...... .. 6|
000003e0  30 30 2b 28 63 25 3c 3c  35 29 2c 32 35 36 2c 33  |00+(c%<<5),256,3|
000003f0  32 0d 02 12 05 ed 0d 02  1c 07 d1 3d 30 0d 02 26  |2..........=0..&|
00000400  0c f5 20 fd 20 91 3e 35  30 0d 02 30 04 0d 02 3a  |.. . .>50..0...:|
00000410  04 0d 02 44 10 db 3a 2a  50 6f 69 6e 74 65 72 20  |...D..:*Pointer |
00000420  30 0d 02 4e 0f f2 73 65  74 63 6f 6c 28 38 37 29  |0..N..setcol(87)|
00000430  0d 02 58 20 c8 93 20 30  2c 30 2c 35 30 2a 28 73  |..X .. 0,0,50*(s|
00000440  70 61 6c 74 61 6e 7a 25  2b 31 29 2c 31 30 30 30  |paltanz%+1),1000|
00000450  0d 02 62 0c e3 69 25 3d  31 b8 31 39 0d 02 6c 23  |..b..i%=1.19..l#|
00000460  86 30 2c 35 30 2a 69 25  2c 35 30 2a 28 73 70 61  |.0,50*i%,50*(spa|
00000470  6c 74 61 6e 7a 25 2b 31  29 2c 35 30 2a 69 25 0d  |ltanz%+1),50*i%.|
00000480  02 76 05 ed 0d 02 80 04  0d 02 8a 3b f1 20 8a 31  |.v.........;. .1|
00000490  38 2c 30 29 22 72 69 67  68 74 20 63 6f 6c 6f 75  |8,0)"right colou|
000004a0  72 20 78 20 74 69 6d 65  73 22 8a 31 38 2c 35 29  |r x times".18,5)|
000004b0  22 72 69 67 68 74 20 63  6f 6c 20 61 6e 64 20 70  |"right col and p|
000004c0  6f 73 22 0d 02 94 15 e3  69 25 3d 30 b8 73 70 61  |os".....i%=0.spa|
000004d0  6c 74 61 6e 7a 25 2b 31  0d 02 9e 1c c8 93 20 35  |ltanz%+1...... 5|
000004e0  36 30 2b 28 69 25 3c 3c  36 29 2c 39 31 32 2c 36  |60+(i%<<6),912,6|
000004f0  34 2c 36 34 0d 02 a8 17  f1 20 8a 31 38 2b 28 69  |4,64..... .18+(i|
00000500  25 3c 3c 31 29 2c 32 29  3b 69 25 0d 02 b2 1c c8  |%<<1),2);i%.....|
00000510  93 20 35 36 30 2b 28 69  25 3c 3c 36 29 2c 37 35  |. 560+(i%<<6),75|
00000520  32 2c 36 34 2c 36 34 0d  02 bc 17 f1 20 8a 31 38  |2,64,64..... .18|
00000530  2b 28 69 25 3c 3c 31 29  2c 37 29 3b 69 25 0d 02  |+(i%<<1),7);i%..|
00000540  c6 05 ed 0d 02 d0 22 c8  93 20 35 36 30 2c 36 32  |......".. 560,62|
00000550  34 2c 39 36 2c 36 34 3a  f1 20 8a 31 38 2c 31 31  |4,96,64:. .18,11|
00000560  29 22 4f 4b 22 0d 02 da  24 72 65 63 74 78 25 3d  |)"OK"...$rectx%=|
00000570  35 36 30 2b 28 28 73 70  61 6c 74 61 6e 7a 25 2b  |560+((spaltanz%+|
00000580  31 29 3c 3c 36 29 2b 36  34 0d 02 e4 05 3a 0d 02  |1)<<6)+64....:..|
00000590  ee 13 e3 69 25 3d 30 b8  73 70 61 6c 74 61 6e 7a  |...i%=0.spaltanz|
000005a0  25 0d 02 f8 18 61 6e 66  25 28 69 25 29 3d b3 28  |%....anf%(i%)=.(|
000005b0  66 61 72 62 61 6e 7a 25  29 0d 03 02 05 ed 0d 03  |farbanz%).......|
000005c0  0c 11 61 6b 74 25 28 29  3d 61 6e 66 25 28 29 0d  |..akt%()=anf%().|
000005d0  03 16 04 0d 03 20 26 6d  61 78 6b 6f 6d 62 3d 28  |..... &maxkomb=(|
000005e0  66 61 72 62 61 6e 7a 25  2b 31 29 5e 28 73 70 61  |farbanz%+1)^(spa|
000005f0  6c 74 61 6e 7a 25 2b 31  29 0d 03 2a 0c 6b 6f 6d  |ltanz%+1)..*.kom|
00000600  62 6e 72 3d 30 0d 03 34  0e 76 65 72 73 75 63 68  |bnr=0..4.versuch|
00000610  25 3d 30 0d 03 3e 04 0d  03 48 0d f2 70 61 69 6e  |%=0..>...H..pain|
00000620  74 61 6b 74 0d 03 52 0c  f2 69 6e 70 75 74 6e 72  |takt..R..inputnr|
00000630  0d 03 5c 0d f2 6d 6f 76  65 64 61 74 61 0d 03 66  |..\..movedata..f|
00000640  29 f1 20 8a 31 38 2c 31  36 29 22 6f 66 20 70 6f  |). .18,16)"of po|
00000650  73 73 69 62 6c 65 22 8a  31 38 2c 31 37 29 3b 6d  |ssible".18,17);m|
00000660  61 78 6b 6f 6d 62 0d 03  70 04 0d 03 7a 12 e3 76  |axkomb..p...z..v|
00000670  65 72 73 75 63 68 25 3d  31 b8 31 39 0d 03 84 05  |ersuch%=1.19....|
00000680  f5 0d 03 8e 04 0d 03 98  2a 69 25 3d 30 3a f4 20  |........*i%=0:. |
00000690  4e e4 63 68 73 74 65 20  4b 6f 6d 62 69 6e 61 74  |N.chste Kombinat|
000006a0  69 6f 6e 73 6d f6 67 6c  69 63 68 6b 65 69 74 0d  |ionsm.glichkeit.|
000006b0  03 a2 05 f5 0d 03 ac 0f  61 6b 74 25 28 69 25 29  |........akt%(i%)|
000006c0  2b 3d 31 0d 03 b6 38 e7  61 6b 74 25 28 69 25 29  |+=1...8.akt%(i%)|
000006d0  3e 66 61 72 62 61 6e 7a  25 8c 20 61 6b 74 25 28  |>farbanz%. akt%(|
000006e0  69 25 29 3d 30 3a 69 25  2b 3d 31 20 8b 69 25 3d  |i%)=0:i%+=1 .i%=|
000006f0  73 70 61 6c 74 61 6e 7a  25 2b 31 0d 03 c0 11 fd  |spaltanz%+1.....|
00000700  69 25 3e 73 70 61 6c 74  61 6e 7a 25 0d 03 ca 1e  |i%>spaltanz%....|
00000710  f1 20 8a 31 38 2c 31 35  29 3b 6b 6f 6d 62 6e 72  |. .18,15);kombnr|
00000720  3a 6b 6f 6d 62 6e 72 2b  3d 31 0d 03 d4 04 0d 03  |:kombnr+=1......|
00000730  de 29 67 6c 65 69 63 68  25 3d b9 3a f4 20 53 63  |.)gleich%=.:. Sc|
00000740  68 6f 6e 20 61 6c 6c 65  20 4b 6f 6d 62 69 6e 61  |hon alle Kombina|
00000750  74 69 6f 6e 65 6e 3f 0d  03 e8 13 e3 69 25 3d 30  |tionen?.....i%=0|
00000760  b8 73 70 61 6c 74 61 6e  7a 25 0d 03 f2 21 e7 61  |.spaltanz%...!.a|
00000770  6b 74 25 28 69 25 29 3c  3e 61 6e 66 25 28 69 25  |kt%(i%)<>anf%(i%|
00000780  29 8c 67 6c 65 69 63 68  25 3d a3 0d 03 fc 05 ed  |).gleich%=......|
00000790  0d 04 06 0e e7 67 6c 65  69 63 68 25 20 8c 0d 04  |.....gleich% ...|
000007a0  10 0a f2 63 6c 65 61 72  0d 04 1a 29 f1 20 8a 31  |...clear...). .1|
000007b0  38 2c 31 35 29 22 54 48  41 54 27 53 20 49 4d 50  |8,15)"THAT'S IMP|
000007c0  4f 53 53 49 42 4c 45 21  21 21 22 8a 30 2c 30 29  |OSSIBLE!!!".0,0)|
000007d0  3b 0d 04 24 0e 61 24 3d  be 3a ee 3a db 3a e0 0d  |;..$.a$=.:.:.:..|
000007e0  04 2e 05 cd 0d 04 38 04  0d 04 42 0e 6d 6f 67 6c  |......8...B.mogl|
000007f0  69 63 68 25 3d b9 0d 04  4c 04 0d 04 56 11 69 25  |ich%=...L...V.i%|
00000800  3d 76 65 72 73 75 63 68  25 2d 31 0d 04 60 05 f5  |=versuch%-1..`..|
00000810  0d 04 6a 0e f2 63 68 65  63 6b 28 69 25 29 0d 04  |..j..check(i%)..|
00000820  74 3d e7 73 75 66 25 3c  3e 72 73 74 65 6c 6c 75  |t=.suf%<>rstellu|
00000830  66 61 72 62 25 28 69 25  29 20 84 20 66 25 3c 3e  |farb%(i%) . f%<>|
00000840  72 66 61 72 62 25 28 69  25 29 8c 20 69 25 3d 30  |rfarb%(i%). i%=0|
00000850  3a 6d 6f 67 6c 69 63 68  25 3d a3 0d 04 7e 09 69  |:moglich%=...~.i|
00000860  25 2d 3d 31 0d 04 88 0a  fd 20 69 25 3c 30 0d 04  |%-=1..... i%<0..|
00000870  92 04 0d 04 9c 0e fd 20  6d 6f 67 6c 69 63 68 25  |....... moglich%|
00000880  0d 04 a6 04 0d 04 b0 0d  f2 70 61 69 6e 74 61 6b  |.........paintak|
00000890  74 0d 04 ba 0c f2 69 6e  70 75 74 6e 72 0d 04 c4  |t.....inputnr...|
000008a0  17 e7 70 6f 73 32 25 3d  73 70 61 6c 74 61 6e 7a  |..pos2%=spaltanz|
000008b0  25 2b 31 8c 0d 04 ce 0a  f2 63 6c 65 61 72 0d 04  |%+1......clear..|
000008c0  d8 3e f1 20 8a 31 38 2c  31 35 29 22 67 61 6d 65  |.>. .18,15)"game|
000008d0  20 77 6f 6e 20 77 69 74  68 20 22 8a 31 38 2c 31  | won with ".18,1|
000008e0  36 29 3b 76 65 72 73 75  63 68 25 2b 31 22 20 74  |6);versuch%+1" t|
000008f0  72 69 65 73 21 22 8a 30  2c 30 29 3b 0d 04 e2 0e  |ries!".0,0);....|
00000900  61 24 3d be 3a ee 3a db  3a e0 0d 04 ec 05 cd 0d  |a$=.:.:.:.......|
00000910  04 f6 0d f2 6d 6f 76 65  64 61 74 61 0d 05 00 04  |....movedata....|
00000920  0d 05 0a 0d ed 76 65 72  73 75 63 68 25 0d 05 14  |.....versuch%...|
00000930  04 0d 05 1e 0a f2 63 6c  65 61 72 0d 05 28 25 f1  |......clear..(%.|
00000940  20 8a 31 38 2c 31 35 29  22 4f 68 20 6e 6f 2c 20  | .18,15)"Oh no, |
00000950  49 20 6c 6f 73 74 2e 2e  2e 22 8a 30 2c 30 29 3b  |I lost...".0,0);|
00000960  0d 05 32 0e 61 24 3d be  3a ee 3a db 3a e0 0d 05  |..2.a$=.:.:.:...|
00000970  3c 04 0d 05 46 04 0d 05  50 23 f4 2d 2d 2d 2d 2d  |<...F...P#.-----|
00000980  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000990  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 05 5a 13 dd 20 f2  |---------..Z.. .|
000009a0  73 65 74 63 6f 6c 28 63  6f 6c 25 29 0d 05 64 1c  |setcol(col%)..d.|
000009b0  e6 20 63 6f 6c 25 3e 3e  32 20 c8 9c 20 28 63 6f  |. col%>>2 .. (co|
000009c0  6c 25 80 33 29 3c 3c 36  0d 05 6e 05 e1 0d 05 78  |l%.3)<<6..n....x|
000009d0  04 0d 05 82 23 f4 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |....#.----------|
000009e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000009f0  2d 2d 2d 2d 0d 05 8c 0f  dd 20 f2 70 61 69 6e 74  |----..... .paint|
00000a00  61 6b 74 0d 05 96 08 ea  20 69 25 0d 05 a0 13 e3  |akt..... i%.....|
00000a10  69 25 3d 30 b8 73 70 61  6c 74 61 6e 7a 25 0d 05  |i%=0.spaltanz%..|
00000a20  aa 1f f2 73 65 74 63 6f  6c 28 63 6f 6c 6f 75 72  |...setcol(colour|
00000a30  73 25 28 61 6b 74 25 28  69 25 29 29 29 0d 05 b4  |s%(akt%(i%)))...|
00000a40  24 c8 8f 20 c8 90 20 32  35 2b 69 25 2a 35 30 2c  |$.. .. 25+i%*50,|
00000a50  32 35 2b 76 65 72 73 75  63 68 25 2a 35 30 2c 32  |25+versuch%*50,2|
00000a60  30 0d 05 be 05 ed 0d 05  c8 05 e1 0d 05 d2 04 0d  |0...............|
00000a70  05 dc 23 f4 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |..#.------------|
00000a80  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000a90  2d 2d 0d 05 e6 0e dd 20  f2 69 6e 70 75 74 6e 72  |--..... .inputnr|
00000aa0  0d 05 f0 07 ef 20 37 0d  05 fa 0f f2 73 65 74 63  |..... 7.....setc|
00000ab0  6f 6c 28 31 35 29 0d 06  04 35 c8 93 20 35 36 34  |ol(15)...5.. 564|
00000ac0  2c 39 31 36 2c 35 36 2c  35 36 3a c8 93 20 35 36  |,916,56,56:.. 56|
00000ad0  34 2c 37 35 36 2c 35 36  2c 35 36 3a 70 6f 73 31  |4,756,56,56:pos1|
00000ae0  25 3d 30 3a 70 6f 73 32  25 3d 30 0d 06 0e 0c 2a  |%=0:pos2%=0....*|
00000af0  50 6f 69 6e 74 65 72 0d  06 18 05 f5 0d 06 22 05  |Pointer.......".|
00000b00  f5 0d 06 2c 0f c8 97 20  78 25 2c 79 25 2c 7a 25  |...,... x%,y%,z%|
00000b10  0d 06 36 0a fd 20 7a 25  3d 30 0d 06 40 05 f5 0d  |..6.. z%=0..@...|
00000b20  06 4a 0f c8 97 20 78 25  2c 79 25 2c 7a 25 0d 06  |.J... x%,y%,z%..|
00000b30  54 0a fd 20 7a 25 3e 30  0d 06 5e 18 e7 20 78 25  |T.. z%>0..^.. x%|
00000b40  3e 35 36 30 80 78 25 3c  72 65 63 74 78 25 20 8c  |>560.x%<rectx% .|
00000b50  0d 06 68 14 e7 20 79 25  3e 39 31 31 80 79 25 3c  |..h.. y%>911.y%<|
00000b60  39 37 36 8c 0d 06 72 2a  f2 73 65 74 63 6f 6c 28  |976...r*.setcol(|
00000b70  30 29 3a c8 93 20 35 36  34 2b 28 70 6f 73 31 25  |0):.. 564+(pos1%|
00000b80  3c 3c 36 29 2c 39 31 36  2c 35 36 2c 35 36 0d 06  |<<6),916,56,56..|
00000b90  7c 15 70 6f 73 31 25 3d  28 78 25 2d 35 36 30 29  ||.pos1%=(x%-560)|
00000ba0  3e 3e 36 0d 06 86 2b f2  73 65 74 63 6f 6c 28 31  |>>6...+.setcol(1|
00000bb0  35 29 3a c8 93 20 35 36  34 2b 28 70 6f 73 31 25  |5):.. 564+(pos1%|
00000bc0  3c 3c 36 29 2c 39 31 36  2c 35 36 2c 35 36 0d 06  |<<6),916,56,56..|
00000bd0  90 05 cd 0d 06 9a 14 e7  20 79 25 3e 37 35 31 80  |........ y%>751.|
00000be0  79 25 3c 38 31 36 8c 0d  06 a4 2a f2 73 65 74 63  |y%<816....*.setc|
00000bf0  6f 6c 28 30 29 3a c8 93  20 35 36 34 2b 28 70 6f  |ol(0):.. 564+(po|
00000c00  73 32 25 3c 3c 36 29 2c  37 35 36 2c 35 36 2c 35  |s2%<<6),756,56,5|
00000c10  36 0d 06 ae 15 70 6f 73  32 25 3d 28 78 25 2d 35  |6....pos2%=(x%-5|
00000c20  36 30 29 3e 3e 36 0d 06  b8 2b f2 73 65 74 63 6f  |60)>>6...+.setco|
00000c30  6c 28 31 35 29 3a c8 93  20 35 36 34 2b 28 70 6f  |l(15):.. 564+(po|
00000c40  73 32 25 3c 3c 36 29 2c  37 35 36 2c 35 36 2c 35  |s2%<<6),756,56,5|
00000c50  36 0d 06 c2 05 cd 0d 06  cc 05 cd 0d 06 d6 20 fd  |6............. .|
00000c60  78 25 3e 35 36 30 80 78  25 3c 36 35 36 80 79 25  |x%>560.x%<656.y%|
00000c70  3e 36 32 34 80 79 25 3c  36 38 38 0d 06 e0 0e 2a  |>624.y%<688....*|
00000c80  50 6f 69 6e 74 65 72 20  30 0d 06 ea 0e f2 73 65  |Pointer 0.....se|
00000c90  74 63 6f 6c 28 30 29 0d  06 f4 3b c8 93 20 35 36  |tcol(0)...;.. 56|
00000ca0  34 2b 28 70 6f 73 31 25  3c 3c 36 29 2c 39 31 36  |4+(pos1%<<6),916|
00000cb0  2c 35 36 2c 35 36 3a c8  93 20 35 36 34 2b 28 70  |,56,56:.. 564+(p|
00000cc0  6f 73 32 25 3c 3c 36 29  2c 37 35 36 2c 35 36 2c  |os2%<<6),756,56,|
00000cd0  35 36 0d 06 fe 27 ef 20  35 3a f4 20 54 65 78 74  |56...'. 5:. Text|
00000ce0  20 61 6e 20 47 72 61 66  69 6b 63 75 72 73 6f 72  | an Grafikcursor|
00000cf0  20 61 75 73 67 65 62 65  6e 0d 07 08 10 f2 73 65  | ausgeben.....se|
00000d00  74 63 6f 6c 28 32 35 35  29 0d 07 12 35 ec 20 36  |tcol(255)...5. 6|
00000d10  34 2b 35 30 2a 73 70 61  6c 74 61 6e 7a 25 2c 33  |4+50*spaltanz%,3|
00000d20  36 2b 35 30 2a 76 65 72  73 75 63 68 25 3a f1 3b  |6+50*versuch%:.;|
00000d30  70 6f 73 31 25 22 2c 22  3b 70 6f 73 32 25 0d 07  |pos1%",";pos2%..|
00000d40  1c 09 ef 20 34 3a 87 0d  07 26 05 e1 0d 07 30 04  |... 4:...&....0.|
00000d50  0d 07 3a 23 f4 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |..:#.-----------|
00000d60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000d70  2d 2d 2d 0d 07 44 0f dd  20 f2 6d 6f 76 65 64 61  |---..D.. .moveda|
00000d80  74 61 0d 07 4e 08 ea 20  69 25 0d 07 58 1a 72 66  |ta..N.. i%..X.rf|
00000d90  61 72 62 25 28 76 65 72  73 75 63 68 25 29 3d 70  |arb%(versuch%)=p|
00000da0  6f 73 31 25 0d 07 62 20  72 73 74 65 6c 6c 75 66  |os1%..b rstelluf|
00000db0  61 72 62 25 28 76 65 72  73 75 63 68 25 29 3d 70  |arb%(versuch%)=p|
00000dc0  6f 73 32 25 0d 07 6c 13  e3 69 25 3d 30 b8 73 70  |os2%..l..i%=0.sp|
00000dd0  61 6c 74 61 6e 7a 25 0d  07 76 22 76 65 72 73 75  |altanz%..v"versu|
00000de0  63 68 25 28 76 65 72 73  75 63 68 25 2c 69 25 29  |ch%(versuch%,i%)|
00000df0  3d 61 6b 74 25 28 69 25  29 0d 07 80 05 ed 0d 07  |=akt%(i%).......|
00000e00  8a 05 e1 0d 07 94 04 0d  07 9e 23 f4 2d 2d 2d 2d  |..........#.----|
00000e10  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000e20  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 07 a8 11 dd 20  |----------..... |
00000e30  f2 63 68 65 63 6b 28 6e  72 25 29 0d 07 b2 0a ea  |.check(nr%).....|
00000e40  69 25 2c 6a 25 0d 07 bc  13 73 75 66 25 3d 30 3a  |i%,j%....suf%=0:|
00000e50  73 75 66 25 28 29 3d a3  0d 07 c6 13 e3 69 25 3d  |suf%()=......i%=|
00000e60  30 b8 73 70 61 6c 74 61  6e 7a 25 0d 07 d0 33 e7  |0.spaltanz%...3.|
00000e70  20 76 65 72 73 75 63 68  25 28 6e 72 25 2c 69 25  | versuch%(nr%,i%|
00000e80  29 3d 61 6b 74 25 28 69  25 29 8c 20 73 75 66 25  |)=akt%(i%). suf%|
00000e90  2b 3d 31 3a 73 75 66 25  28 69 25 29 3d b9 0d 07  |+=1:suf%(i%)=...|
00000ea0  da 05 ed 0d 07 e4 05 3a  0d 07 ee 14 66 25 3d 30  |.......:....f%=0|
00000eb0  3a 66 25 28 29 3d 73 75  66 25 28 29 0d 07 f8 13  |:f%()=suf%()....|
00000ec0  e3 69 25 3d 30 b8 73 70  61 6c 74 61 6e 7a 25 0d  |.i%=0.spaltanz%.|
00000ed0  08 02 12 e7 20 ac 20 73  75 66 25 28 69 25 29 20  |.... . suf%(i%) |
00000ee0  8c 0d 08 0c 12 6a 25 3d  73 70 61 6c 74 61 6e 7a  |.....j%=spaltanz|
00000ef0  25 3a f5 0d 08 16 3f e7  20 66 25 28 6a 25 29 3d  |%:....?. f%(j%)=|
00000f00  a3 20 80 20 61 6b 74 25  28 69 25 29 3d 76 65 72  |. . akt%(i%)=ver|
00000f10  73 75 63 68 25 28 6e 72  25 2c 6a 25 29 8c 20 66  |such%(nr%,j%). f|
00000f20  25 2b 3d 31 3a 66 25 28  6a 25 29 3d b9 3a 6a 25  |%+=1:f%(j%)=.:j%|
00000f30  3d 30 0d 08 20 0f 6a 25  2d 3d 31 3a fd 6a 25 3c  |=0.. .j%-=1:.j%<|
00000f40  30 0d 08 2a 05 cd 0d 08  34 05 ed 0d 08 3e 05 e1  |0..*....4....>..|
00000f50  0d 08 48 04 0d 08 52 23  f4 2d 2d 2d 2d 2d 2d 2d  |..H...R#.-------|
00000f60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000f70  2d 2d 2d 2d 2d 2d 2d 0d  08 5c 0c dd 20 f2 63 6c  |-------..\.. .cl|
00000f80  65 61 72 0d 08 66 1e f1  20 8a 31 38 2c 31 36 29  |ear..f.. .18,16)|
00000f90  89 28 31 31 29 8a 31 38  2c 31 37 29 89 28 32 30  |.(11).18,17).(20|
00000fa0  29 0d 08 70 05 e1 0d ff                           |)..p....|
00000fa8