Home » CEEFAX disks » telesoftware12.adl » 13-01-89/SWITCH2

13-01-89/SWITCH2

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 » telesoftware12.adl
Filename: 13-01-89/SWITCH2
Read OK:
File size: 1664 bytes
Load address: FFFF0E00
Exec address: FFFF802B
Duplicates

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

File contents
   10REM SWITCH PART 2
   20ON ERROR PROCerror
   30MODE2:PROCoff
   40PROCinit:REM initialise
   50REPEAT
   60PROCboard:REM show board
   70PROCmove:REM Get move and go
   80PROCscore:REM Show score
   90PROClower:REM Lower bonus
  100UNTIL total%<10
  110MODE7:PROCoff:PROCagain
  120END
  130*****
  140DEFPROCoff:VDU23;11,0;0;0;0:ENDPROC
  150*****
  160DEFPROCinit
  170board%=1:target%=10:bonus%=10:all%=0:shape%=4:clr%=0:down%=4:final%=0:extra%=0:move%=10
  180VDU28,0,4,11,0:COLOUR134:CLS
  190sh1$=CHR$225+CHR$227+CHR$225+CHR$10+CHR$8+CHR$8+CHR$8+CHR$224+CHR$224+CHR$224+CHR$10+CHR$8+CHR$8+CHR$8+CHR$228+CHR$226+CHR$228
  200sh2$=CHR$225+CHR$224+CHR$227+CHR$10+CHR$8+CHR$8+CHR$8+CHR$224+CHR$224+CHR$224+CHR$10+CHR$8+CHR$8+CHR$8+CHR$226+CHR$224+CHR$228
  210sh3$=CHR$32+CHR$224+CHR$32+CHR$10+CHR$8+CHR$8+CHR$8+CHR$224+CHR$224+CHR$224+CHR$10+CHR$8+CHR$8+CHR$8+CHR$32+CHR$224+CHR$32
  220sh4$=CHR$224+CHR$224+CHR$224+CHR$10+CHR$8+CHR$8+CHR$8+CHR$224+CHR$32+CHR$224+CHR$10+CHR$8+CHR$8+CHR$8+CHR$224+CHR$224+CHR$224
  230sh5$=CHR$225+CHR$32+CHR$227+CHR$10+CHR$8+CHR$8+CHR$8+CHR$32+CHR$224+CHR$32+CHR$10+CHR$8+CHR$8+CHR$8+CHR$226+CHR$32+CHR$228
  240sh6$=CHR$32+CHR$225+CHR$227+CHR$10+CHR$8+CHR$8+CHR$8+CHR$225+CHR$224+CHR$228+CHR$10+CHR$8+CHR$8+CHR$8+CHR$226+CHR$228+CHR$32
  250sh7$=CHR$225+CHR$227+CHR$32+CHR$10+CHR$8+CHR$8+CHR$8+CHR$226+CHR$224+CHR$227+CHR$10+CHR$8+CHR$8+CHR$8+CHR$32+CHR$226+CHR$228
  260sh8$=CHR$224+CHR$32+CHR$224+CHR$10+CHR$8+CHR$8+CHR$8+CHR$32+CHR$224+CHR$32+CHR$10+CHR$8+CHR$8+CHR$8+CHR$224+CHR$32+CHR$224
  270rnd=RND(-TIME):DIM brd%(5,7):*FX4,1
  280*FX9 5
  290*FX10 5
  300ENDPROC
  310*****
  320DEFPROCboard
  330oldcol%=10:col%=10:oldrow%=13:row%=13
  340COLOUR0:PRINTTAB(1,0)"BOARD No.";board%
  350VDU28,13,4,19,0:COLOUR133:CLS:PROCleft:VDU28,0,31,19,6:COLOUR135:CLS
  360FORcol%=1TO18 STEP3:FORrow%=1TO24 STEP3
  370no%=RND(shape%):shape$="sh"+STR$(no%)+"$"
  380IF col%=1 COLOUR128 ELSE COLOUR135
  390co%=col%DIV3:ro%=row%DIV3:brd%(co%,ro%)=no%
  400PROCcolour:COLOURclr%:PRINTTAB(col%,row%)EVAL(shape$)
  410SOUND1,-10,(col%*row%)/2,2
  420IF co%<1 wait%=INKEY(75) ELSE wait%=INKEY(25)
  430NEXT:NEXT
  440oldshape%=brd%(3,4):oldshape$="sh"+STR$(brd%(3,4))+"$"
  450ENDPROC
  460*****
  470DEFPROCscore
  480VDU26:total%=0:FORro%=0TO7
  490score%=0:FOR co%=1TO5
  500IF brd%(co%,ro%)=brd%(0,ro%) score%=score%+1
  510COLOUR 5:COLOUR134
  520PRINTTAB(1,1)"ROW ";ro%+1;"=";score%
  530NEXT
  540COLOUR1:total%=total%+score%:PRINTTAB(0,2)"SUB TOTAL=";total%
  550PROCarrows(8):delay%=INKEY(300):PROCarrows(7):NEXT
  560COLOUR4:COLOUR134:all%=all%+total%:PRINTTAB(2,4)"TOTAL=";all%
  570ENDPROC
  580*****
  590DEFPROCarrows(colour%)
  600COLOUR135:COLOUR colour%
  610PRINTTAB(0,7+(3*ro%))CHR$227TAB(0,8+(3*ro%))CHR$224TAB(0,9+(3*ro%))CHR$228
  620PRINTTAB(19,7+(3*ro%))CHR$225TAB(19,8+(3*ro%))CHR$224TAB(19,9+(3*ro%))CHR$226;
  630IF ro%<7 SOUND1,-10,ro%*15,2
  640ENDPROC
  650*****
  660DEFPROCmove
  670col%=10:row%=13:temptarget%=0
  680REPEAT:PROCprint(3)
  690FORdummy=1TO1
  700FORflag%=1TO2
  710REPEAT
  720REPEAT:*FX21,0
  730move%=GET
  740UNTIL (move%>135 AND move%<140) OR move%=9 OR move%=32
  750IFmove%=9 flag%=2:temptarget%=target%:target%=-1
  760COLOUR135:PROCcolour:COLOURclr%:PRINTTAB(col%,row%)EVAL(shape$)
  770IF move%=136 AND col%<6 PROCrestore
  780IF move%=136 AND col%>6 col%=col%-3:PROCprint(flag%):PROCsound
  790IF move%=137 AND col%>13 PROCrestore
  800IF move%=137 AND col%<16 col%=col%+3:PROCprint(flag%):PROCsound
  810IF move%=138 AND row%>19 PROCrestore
  820IF move%=138 AND row%<22 row%=row%+3:PROCprint(flag%):PROCsound
  830IF move%=139 AND row%<3 PROCrestore
  840IF move%=139 AND row%>3 row%=row%-3:PROCprint(flag%):PROCsound
  850UNTIL (flag%=1 AND move%=32)OR flag%=2
  860IFmove%=9 AND flag%=2 SOUND1,-10,200,3:GOTO900
  870PROCprint(flag%):NEXT
  880PROCswap:PROCleft
  890temptarget%=target%
  900NEXTdummy
  910UNTIL target%<0
  920target%=0:move%=9
  930ENDPROC
  940*****
  950DEFPROCprint(flag%)
  960co%=col%DIV3:ro%=row%DIV3
  970shape$="sh"+STR$(brd%(co%,ro%))+"$"
  980IF(flag%=1 OR flag%=3) COLOUR136 ELSE COLOUR143
  990PROCcolour:COLOURclr%
 1000PRINTTAB(col%,row%)EVAL(shape$)
 1010IFflag%=3 THEN ENDPROC
 1020IFflag%=1 AND move%=32 SOUND1,1,100,3
 1030IFflag%=1 oldcol%=col%:oldrow%=row%:oldshape%=brd%(oldcol%DIV3,oldrow%DIV3):oldshape$=shape$:ENDPROC
 1040oldcol2%=col%:oldrow2%=row%:oldshape2%=brd%(oldcol2%DIV3,oldrow2%DIV3):oldshape2$=shape$:ENDPROC
 1050*****
 1060DEFPROCswap
 1070tempshape%=oldshape%:oldshape%=oldshape2%:oldshape2%=tempshape%
 1080brd%(oldcol2%DIV3,oldrow2%DIV3)=oldshape2%:brd%(oldcol%DIV3,oldrow%DIV3)=oldshape%
 1090tempcol%=oldcol%:oldcol%=oldcol2%:oldcol2%=tempcol%
 1100temprow%=oldrow%:oldrow%=oldrow2%:oldrow2%=temprow%
 1110tempshape$=oldshape$:oldshape$=oldshape2$:oldshape2$=tempshape$
 1120COLOUR135:IF shape%>5 oldshape%=RND(5)+1
 1130COLOURoldshape%:PRINTTAB(oldcol2%,oldrow2%)EVAL(oldshape$)
 1140IF shape%>5 oldshape2%=RND(5)+1
 1150COLOURoldshape2%:PRINTTAB(oldcol%,oldrow%)EVAL(oldshape2$)
 1160ENDPROC
 1170*****
 1180DEFPROCrestore
 1190IFflag%=1 COLOUR136 ELSE COLOUR143
 1200PROCcolour:COLOURclr%:PRINTTAB(col%,row%)EVAL(shape$)
 1210ENDPROC
 1220*****
 1230DEFPROCleft
 1240VDU28,13,4,19,0
 1250IF move%=9 PROCsound3:COLOUR0:PRINTTAB(1,1)"ADDED"TAB(1,2)"MOVES"TAB(3,3)STR$bonus%:wait=INKEY(300)
 1260IF move%=9 AND extra%>0 PROCsound2:PROCmore
 1270COLOUR133:CLS
 1280COLOUR2:PRINTTAB(1,1)"MOVES"
 1290target$=STR$target%
 1300IF target%<1 target$="NIL"
 1310IF target%<6 COLOUR13
 1320PRINTTAB(4-LEN(target$)/2,3)target$
 1330target%=target%-1
 1340VDU28,0,31,19,6
 1350ENDPROC
 1360*****
 1370DEFPROCagain
 1380IF (board%-2)<>1 boards$=" boards" ELSE boards$=" board"
 1390PROCdbl("You completed "+STR$(board%-2)+boards$,1)
 1400PROCdbl("and scored "+STR$all%+" but",2)
 1410IF target%>0 PROCdbl("you still had "+target$+" moves left.",3) ELSE PROCdbl("you ran out of moves.",3)
 1420final%=all%*(board%-1)-(target%*(board%-1) DIV2)
 1430PROCdbl("Your final score is "+STR$final%,4)
 1440PROCdbl("Again (Y/N) ?",5):REPEAT:again$=GET$:UNTIL again$="Y" ORagain$="y" ORagain$="N" ORagain$="n"
 1450IF again$="Y" OR again$="y" THEN RUN ELSE PROCend
 1460ENDPROC
 1470*****
 1480DEFPROClower
 1490IF total%<10 bonus%=0
 1500extra%=FNex
 1510target%=target%+bonus%+temptarget%+extra%:bonus%=bonus%-1
 1520IF bonus%<1 bonus%=0
 1530IF target%<1 target%=0
 1540board%=board%+1:PRINTTAB(0,1)STRING$(12," ")TAB(0,2)STRING$(12," ")
 1550IF board% MOD2=1 AND board%>2 shape%=shape%+1
 1560IF shape%>8 shape%=8
 1570ENDPROC
 1580*****
 1590DEFPROCdbl(word$,hue%)
 1600wordlen%=LENword$
 1610FOR print%=down% TO down%+1
 1620PRINTTAB(17-(wordlen%/2),print%)CHR$141CHR$(128+hue%)word$
 1630NEXT:down%=down%+4
 1640ENDPROC
 1650*****
 1660DEFPROCcolour
 1670IF board% MOD2=1 clr%=brd%(co%,ro%) ELSE clr%=RND(5)+1
 1680IF shape%>5 clr%=RND(5)+1
 1690ENDPROC
 1700*****
 1710DEFPROCend
 1720*FX9 25
 1730*FX10 25
 1740*FX4
 1750*FX210
 1760*FX220,27
 1770VDU23;11,255;0;0;0:*FX210
 1780ENDPROC
 1790*****
 1800DEFPROCerror:*FX4
 1810ON ERROR OFF
 1820REPORT:PRINT" @ ";ERL
 1830END
 1840*****
 1850DEFPROCsound
 1860SOUND1,3,(co%*ro%)*6,2
 1870ENDPROC
 1880*****
 1890DEFFNex
 1900IF total%>19=10
 1910IF total%>14=5
 1920=0
 1930*****
 1940DEFPROCmore
 1950IF extra%>5 COLOUR140 ELSE COLOUR142
 1960CLS:COLOUR7:PRINTTAB(1,1)"BONUS":extra$=STR$extra%
 1970PRINTTAB(4-LEN(extra$)/2,2)extra$
 1980PRINTTAB(1,3)"MOVES"
 1990wait%=INKEY(500):ENDPROC
 2000*****
 2010DEFPROCsound2
 2020FORl=1TO5:SOUND1,2,100,3:W=INKEY(10)
 2030SOUND1,2,10,3:W=INKEY(10)
 2040NEXT:SOUND1,0,0,0
 2050ENDPROC
 2060*****
 2070DEFPROCsound3
 2080FORl=96TO97:SOUND0,2,l,1:w=INKEY(30):NEXT
 2090SOUND0,0,0,0:ENDPROC
 2100*****

� SWITCH PART 2
� � �error
�2:�off
(�init:� initialise
2�
<�board:� show board
F�move:� Get move and go
P�score:� Show score
Z�lower:� Lower bonus
d� total%<10
n�7:�off:�again
x�
�	*****
���off:�23;11,0;0;0;0:�
�	*****
�
��init
�[board%=1:target%=10:bonus%=10:all%=0:shape%=4:clr%=0:down%=4:final%=0:extra%=0:move%=10
��28,0,4,11,0:�134:�
�Osh1$=�225+�227+�225+�10+�8+�8+�8+�224+�224+�224+�10+�8+�8+�8+�228+�226+�228
�Osh2$=�225+�224+�227+�10+�8+�8+�8+�224+�224+�224+�10+�8+�8+�8+�226+�224+�228
�Ksh3$=�32+�224+�32+�10+�8+�8+�8+�224+�224+�224+�10+�8+�8+�8+�32+�224+�32
�Nsh4$=�224+�224+�224+�10+�8+�8+�8+�224+�32+�224+�10+�8+�8+�8+�224+�224+�224
�Ksh5$=�225+�32+�227+�10+�8+�8+�8+�32+�224+�32+�10+�8+�8+�8+�226+�32+�228
�Msh6$=�32+�225+�227+�10+�8+�8+�8+�225+�224+�228+�10+�8+�8+�8+�226+�228+�32
�Msh7$=�225+�227+�32+�10+�8+�8+�8+�226+�224+�227+�10+�8+�8+�8+�32+�226+�228
Ksh8$=�224+�32+�224+�10+�8+�8+�8+�32+�224+�32+�10+�8+�8+�8+�224+�32+�224
 rnd=�(-�):� brd%(5,7):*FX4,1

*FX9 5
"*FX10 5
,�
6	*****
@��board
J)oldcol%=10:col%=10:oldrow%=13:row%=13
T�0:�1,0)"BOARD No.";board%
^3�28,13,4,19,0:�133:�:�left:�28,0,31,19,6:�135:�
h�col%=1�18 �3:�row%=1�24 �3
r(no%=�(shape%):shape$="sh"+�(no%)+"$"
|� col%=1 �128 � �135
�+co%=col%�3:ro%=row%�3:brd%(co%,ro%)=no%
�'�colour:�clr%:�col%,row%)�(shape$)
��1,-10,(col%*row%)/2,2
�%� co%<1 wait%=�(75) � wait%=�(25)
��:�
�7oldshape%=brd%(3,4):oldshape$="sh"+�(brd%(3,4))+"$"
��
�	*****
���score
��26:total%=0:�ro%=0�7
�score%=0:� co%=1�5
�/� brd%(co%,ro%)=brd%(0,ro%) score%=score%+1
�� 5:�134
!�1,1)"ROW ";ro%+1;"=";score%
�
5�1:total%=total%+score%:�0,2)"SUB TOTAL=";total%
&)�arrows(8):delay%=�(300):�arrows(7):�
00�4:�134:all%=all%+total%:�2,4)"TOTAL=";all%
:�
D	*****
N��arrows(colour%)
X�135:� colour%
b8�0,7+(3*ro%))�227�0,8+(3*ro%))�224�0,9+(3*ro%))�228
l<�19,7+(3*ro%))�225�19,8+(3*ro%))�224�19,9+(3*ro%))�226;
v� ro%<7 �1,-10,ro%*15,2
��
�	*****
�
��move
�!col%=10:row%=13:temptarget%=0
��:�print(3)
��dummy=1�1
��flag%=1�2
��
�
�:*FX21,0
�move%=�
�2� (move%>135 � move%<140) � move%=9 � move%=32
�3�move%=9 flag%=2:temptarget%=target%:target%=-1
�,�135:�colour:�clr%:�col%,row%)�(shape$)
!� move%=136 � col%<6 �restore
9� move%=136 � col%>6 col%=col%-3:�print(flag%):�sound
"� move%=137 � col%>13 �restore
 :� move%=137 � col%<16 col%=col%+3:�print(flag%):�sound
*"� move%=138 � row%>19 �restore
4:� move%=138 � row%<22 row%=row%+3:�print(flag%):�sound
>!� move%=139 � row%<3 �restore
H9� move%=139 � row%>3 row%=row%-3:�print(flag%):�sound
R#� (flag%=1 � move%=32)� flag%=2
\)�move%=9 � flag%=2 �1,-10,200,3:�tDC
f�print(flag%):�
p�swap:�left
ztemptarget%=target%
�
�dummy
�� target%<0
�target%=0:move%=9
��
�	*****
���print(flag%)
�co%=col%�3:ro%=row%�3
�$shape$="sh"+�(brd%(co%,ro%))+"$"
�$�(flag%=1 � flag%=3) �136 � �143
��colour:�clr%
��col%,row%)�(shape$)
��flag%=3 � �
�"�flag%=1 � move%=32 �1,1,100,3
]�flag%=1 oldcol%=col%:oldrow%=row%:oldshape%=brd%(oldcol%�3,oldrow%�3):oldshape$=shape$:�
Zoldcol2%=col%:oldrow2%=row%:oldshape2%=brd%(oldcol2%�3,oldrow2%�3):oldshape2$=shape$:�
	*****
$
��swap
.Ctempshape%=oldshape%:oldshape%=oldshape2%:oldshape2%=tempshape%
8Nbrd%(oldcol2%�3,oldrow2%�3)=oldshape2%:brd%(oldcol%�3,oldrow%�3)=oldshape%
B7tempcol%=oldcol%:oldcol%=oldcol2%:oldcol2%=tempcol%
L7temprow%=oldrow%:oldrow%=oldrow2%:oldrow2%=temprow%
VCtempshape$=oldshape$:oldshape$=oldshape2$:oldshape2$=tempshape$
`$�135:� shape%>5 oldshape%=�(5)+1
j/�oldshape%:�oldcol2%,oldrow2%)�(oldshape$)
t � shape%>5 oldshape2%=�(5)+1
~/�oldshape2%:�oldcol%,oldrow%)�(oldshape2$)
��
�	*****
�
��restore
��flag%=1 �136 � �143
�'�colour:�clr%:�col%,row%)�(shape$)
��
�	*****
�
��left
��28,13,4,19,0
�J� move%=9 �sound3:�0:�1,1)"ADDED"�1,2)"MOVES"�3,3)�bonus%:wait=�(300)
�&� move%=9 � extra%>0 �sound2:�more
�
�133:�
�2:�1,1)"MOVES"

target$=�target%
� target%<1 target$="NIL"
� target%<6 �13
(�4-�(target$)/2,3)target$
2target%=target%-1
<�28,0,31,19,6
F�
P	*****
Z��again
d8� (board%-2)<>1 boards$=" boards" � boards$=" board"
n0�dbl("You completed "+�(board%-2)+boards$,1)
x&�dbl("and scored "+�all%+" but",2)
�a� target%>0 �dbl("you still had "+target$+" moves left.",3) � �dbl("you ran out of moves.",3)
�2final%=all%*(board%-1)-(target%*(board%-1) �2)
�*�dbl("Your final score is "+�final%,4)
�W�dbl("Again (Y/N) ?",5):�:again$=�:� again$="Y" �again$="y" �again$="N" �again$="n"
�(� again$="Y" � again$="y" � � � �end
��
�	*****
���lower
�� total%<10 bonus%=0
�extra%=�ex
�=target%=target%+bonus%+temptarget%+extra%:bonus%=bonus%-1
�� bonus%<1 bonus%=0
�� target%<1 target%=0
/board%=board%+1:�0,1)�12," ")�0,2)�12," ")
,� board% �2=1 � board%>2 shape%=shape%+1
� shape%>8 shape%=8
"�
,	*****
6��dbl(word$,hue%)
@wordlen%=�word$
J� print%=down% � down%+1
T1�17-(wordlen%/2),print%)�141�(128+hue%)word$
^�:down%=down%+4
h�
r	*****
|��colour
�2� board% �2=1 clr%=brd%(co%,ro%) � clr%=�(5)+1
�� shape%>5 clr%=�(5)+1
��
�	*****
�	��end
�*FX9 25
�*FX10 25
�*FX4
�
*FX210
�
*FX220,27
��23;11,255;0;0;0:*FX210
��
�	*****
��error:*FX4
	� � �
�:�" @ ";�
&�
0	*****
:��sound
D�1,3,(co%*ro%)*6,2
N�
X	*****
bݤex
l� total%>19=10
v� total%>14=5
�=0
�	*****
�
��more
�� extra%>5 �140 � �142
�%�:�7:�1,1)"BONUS":extra$=�extra%
��4-�(extra$)/2,2)extra$
��1,3)"MOVES"
�wait%=�(500):�
�	*****
���sound2
��l=1�5:�1,2,100,3:W=�(10)
��1,2,10,3:W=�(10)
��:�1,0,0,0
�
	*****
��sound3
 �l=96�97:�0,2,l,1:w=�(30):�
*�0,0,0,0:�
4	*****
�
00000000  0d 00 0a 13 f4 20 53 57  49 54 43 48 20 50 41 52  |..... SWITCH PAR|
00000010  54 20 32 0d 00 14 0e ee  20 85 20 f2 65 72 72 6f  |T 2..... . .erro|
00000020  72 0d 00 1e 0b eb 32 3a  f2 6f 66 66 0d 00 28 16  |r.....2:.off..(.|
00000030  f2 69 6e 69 74 3a f4 20  69 6e 69 74 69 61 6c 69  |.init:. initiali|
00000040  73 65 0d 00 32 05 f5 0d  00 3c 17 f2 62 6f 61 72  |se..2....<..boar|
00000050  64 3a f4 20 73 68 6f 77  20 62 6f 61 72 64 0d 00  |d:. show board..|
00000060  46 1b f2 6d 6f 76 65 3a  f4 20 47 65 74 20 6d 6f  |F..move:. Get mo|
00000070  76 65 20 61 6e 64 20 67  6f 0d 00 50 17 f2 73 63  |ve and go..P..sc|
00000080  6f 72 65 3a f4 20 53 68  6f 77 20 73 63 6f 72 65  |ore:. Show score|
00000090  0d 00 5a 18 f2 6c 6f 77  65 72 3a f4 20 4c 6f 77  |..Z..lower:. Low|
000000a0  65 72 20 62 6f 6e 75 73  0d 00 64 0f fd 20 74 6f  |er bonus..d.. to|
000000b0  74 61 6c 25 3c 31 30 0d  00 6e 12 eb 37 3a f2 6f  |tal%<10..n..7:.o|
000000c0  66 66 3a f2 61 67 61 69  6e 0d 00 78 05 e0 0d 00  |ff:.again..x....|
000000d0  82 09 2a 2a 2a 2a 2a 0d  00 8c 1a dd f2 6f 66 66  |..*****......off|
000000e0  3a ef 32 33 3b 31 31 2c  30 3b 30 3b 30 3b 30 3a  |:.23;11,0;0;0;0:|
000000f0  e1 0d 00 96 09 2a 2a 2a  2a 2a 0d 00 a0 0a dd f2  |.....*****......|
00000100  69 6e 69 74 0d 00 aa 5b  62 6f 61 72 64 25 3d 31  |init...[board%=1|
00000110  3a 74 61 72 67 65 74 25  3d 31 30 3a 62 6f 6e 75  |:target%=10:bonu|
00000120  73 25 3d 31 30 3a 61 6c  6c 25 3d 30 3a 73 68 61  |s%=10:all%=0:sha|
00000130  70 65 25 3d 34 3a 63 6c  72 25 3d 30 3a 64 6f 77  |pe%=4:clr%=0:dow|
00000140  6e 25 3d 34 3a 66 69 6e  61 6c 25 3d 30 3a 65 78  |n%=4:final%=0:ex|
00000150  74 72 61 25 3d 30 3a 6d  6f 76 65 25 3d 31 30 0d  |tra%=0:move%=10.|
00000160  00 b4 17 ef 32 38 2c 30  2c 34 2c 31 31 2c 30 3a  |....28,0,4,11,0:|
00000170  fb 31 33 34 3a db 0d 00  be 4f 73 68 31 24 3d bd  |.134:....Osh1$=.|
00000180  32 32 35 2b bd 32 32 37  2b bd 32 32 35 2b bd 31  |225+.227+.225+.1|
00000190  30 2b bd 38 2b bd 38 2b  bd 38 2b bd 32 32 34 2b  |0+.8+.8+.8+.224+|
000001a0  bd 32 32 34 2b bd 32 32  34 2b bd 31 30 2b bd 38  |.224+.224+.10+.8|
000001b0  2b bd 38 2b bd 38 2b bd  32 32 38 2b bd 32 32 36  |+.8+.8+.228+.226|
000001c0  2b bd 32 32 38 0d 00 c8  4f 73 68 32 24 3d bd 32  |+.228...Osh2$=.2|
000001d0  32 35 2b bd 32 32 34 2b  bd 32 32 37 2b bd 31 30  |25+.224+.227+.10|
000001e0  2b bd 38 2b bd 38 2b bd  38 2b bd 32 32 34 2b bd  |+.8+.8+.8+.224+.|
000001f0  32 32 34 2b bd 32 32 34  2b bd 31 30 2b bd 38 2b  |224+.224+.10+.8+|
00000200  bd 38 2b bd 38 2b bd 32  32 36 2b bd 32 32 34 2b  |.8+.8+.226+.224+|
00000210  bd 32 32 38 0d 00 d2 4b  73 68 33 24 3d bd 33 32  |.228...Ksh3$=.32|
00000220  2b bd 32 32 34 2b bd 33  32 2b bd 31 30 2b bd 38  |+.224+.32+.10+.8|
00000230  2b bd 38 2b bd 38 2b bd  32 32 34 2b bd 32 32 34  |+.8+.8+.224+.224|
00000240  2b bd 32 32 34 2b bd 31  30 2b bd 38 2b bd 38 2b  |+.224+.10+.8+.8+|
00000250  bd 38 2b bd 33 32 2b bd  32 32 34 2b bd 33 32 0d  |.8+.32+.224+.32.|
00000260  00 dc 4e 73 68 34 24 3d  bd 32 32 34 2b bd 32 32  |..Nsh4$=.224+.22|
00000270  34 2b bd 32 32 34 2b bd  31 30 2b bd 38 2b bd 38  |4+.224+.10+.8+.8|
00000280  2b bd 38 2b bd 32 32 34  2b bd 33 32 2b bd 32 32  |+.8+.224+.32+.22|
00000290  34 2b bd 31 30 2b bd 38  2b bd 38 2b bd 38 2b bd  |4+.10+.8+.8+.8+.|
000002a0  32 32 34 2b bd 32 32 34  2b bd 32 32 34 0d 00 e6  |224+.224+.224...|
000002b0  4b 73 68 35 24 3d bd 32  32 35 2b bd 33 32 2b bd  |Ksh5$=.225+.32+.|
000002c0  32 32 37 2b bd 31 30 2b  bd 38 2b bd 38 2b bd 38  |227+.10+.8+.8+.8|
000002d0  2b bd 33 32 2b bd 32 32  34 2b bd 33 32 2b bd 31  |+.32+.224+.32+.1|
000002e0  30 2b bd 38 2b bd 38 2b  bd 38 2b bd 32 32 36 2b  |0+.8+.8+.8+.226+|
000002f0  bd 33 32 2b bd 32 32 38  0d 00 f0 4d 73 68 36 24  |.32+.228...Msh6$|
00000300  3d bd 33 32 2b bd 32 32  35 2b bd 32 32 37 2b bd  |=.32+.225+.227+.|
00000310  31 30 2b bd 38 2b bd 38  2b bd 38 2b bd 32 32 35  |10+.8+.8+.8+.225|
00000320  2b bd 32 32 34 2b bd 32  32 38 2b bd 31 30 2b bd  |+.224+.228+.10+.|
00000330  38 2b bd 38 2b bd 38 2b  bd 32 32 36 2b bd 32 32  |8+.8+.8+.226+.22|
00000340  38 2b bd 33 32 0d 00 fa  4d 73 68 37 24 3d bd 32  |8+.32...Msh7$=.2|
00000350  32 35 2b bd 32 32 37 2b  bd 33 32 2b bd 31 30 2b  |25+.227+.32+.10+|
00000360  bd 38 2b bd 38 2b bd 38  2b bd 32 32 36 2b bd 32  |.8+.8+.8+.226+.2|
00000370  32 34 2b bd 32 32 37 2b  bd 31 30 2b bd 38 2b bd  |24+.227+.10+.8+.|
00000380  38 2b bd 38 2b bd 33 32  2b bd 32 32 36 2b bd 32  |8+.8+.32+.226+.2|
00000390  32 38 0d 01 04 4b 73 68  38 24 3d bd 32 32 34 2b  |28...Ksh8$=.224+|
000003a0  bd 33 32 2b bd 32 32 34  2b bd 31 30 2b bd 38 2b  |.32+.224+.10+.8+|
000003b0  bd 38 2b bd 38 2b bd 33  32 2b bd 32 32 34 2b bd  |.8+.8+.32+.224+.|
000003c0  33 32 2b bd 31 30 2b bd  38 2b bd 38 2b bd 38 2b  |32+.10+.8+.8+.8+|
000003d0  bd 32 32 34 2b bd 33 32  2b bd 32 32 34 0d 01 0e  |.224+.32+.224...|
000003e0  20 72 6e 64 3d b3 28 2d  91 29 3a de 20 62 72 64  | rnd=.(-.):. brd|
000003f0  25 28 35 2c 37 29 3a 2a  46 58 34 2c 31 0d 01 18  |%(5,7):*FX4,1...|
00000400  0a 2a 46 58 39 20 35 0d  01 22 0b 2a 46 58 31 30  |.*FX9 5..".*FX10|
00000410  20 35 0d 01 2c 05 e1 0d  01 36 09 2a 2a 2a 2a 2a  | 5..,....6.*****|
00000420  0d 01 40 0b dd f2 62 6f  61 72 64 0d 01 4a 29 6f  |..@...board..J)o|
00000430  6c 64 63 6f 6c 25 3d 31  30 3a 63 6f 6c 25 3d 31  |ldcol%=10:col%=1|
00000440  30 3a 6f 6c 64 72 6f 77  25 3d 31 33 3a 72 6f 77  |0:oldrow%=13:row|
00000450  25 3d 31 33 0d 01 54 1f  fb 30 3a f1 8a 31 2c 30  |%=13..T..0:..1,0|
00000460  29 22 42 4f 41 52 44 20  4e 6f 2e 22 3b 62 6f 61  |)"BOARD No.";boa|
00000470  72 64 25 0d 01 5e 33 ef  32 38 2c 31 33 2c 34 2c  |rd%..^3.28,13,4,|
00000480  31 39 2c 30 3a fb 31 33  33 3a db 3a f2 6c 65 66  |19,0:.133:.:.lef|
00000490  74 3a ef 32 38 2c 30 2c  33 31 2c 31 39 2c 36 3a  |t:.28,0,31,19,6:|
000004a0  fb 31 33 35 3a db 0d 01  68 1f e3 63 6f 6c 25 3d  |.135:...h..col%=|
000004b0  31 b8 31 38 20 88 33 3a  e3 72 6f 77 25 3d 31 b8  |1.18 .3:.row%=1.|
000004c0  32 34 20 88 33 0d 01 72  28 6e 6f 25 3d b3 28 73  |24 .3..r(no%=.(s|
000004d0  68 61 70 65 25 29 3a 73  68 61 70 65 24 3d 22 73  |hape%):shape$="s|
000004e0  68 22 2b c3 28 6e 6f 25  29 2b 22 24 22 0d 01 7c  |h"+.(no%)+"$"..||
000004f0  18 e7 20 63 6f 6c 25 3d  31 20 fb 31 32 38 20 8b  |.. col%=1 .128 .|
00000500  20 fb 31 33 35 0d 01 86  2b 63 6f 25 3d 63 6f 6c  | .135...+co%=col|
00000510  25 81 33 3a 72 6f 25 3d  72 6f 77 25 81 33 3a 62  |%.3:ro%=row%.3:b|
00000520  72 64 25 28 63 6f 25 2c  72 6f 25 29 3d 6e 6f 25  |rd%(co%,ro%)=no%|
00000530  0d 01 90 27 f2 63 6f 6c  6f 75 72 3a fb 63 6c 72  |...'.colour:.clr|
00000540  25 3a f1 8a 63 6f 6c 25  2c 72 6f 77 25 29 a0 28  |%:..col%,row%).(|
00000550  73 68 61 70 65 24 29 0d  01 9a 1a d4 31 2c 2d 31  |shape$).....1,-1|
00000560  30 2c 28 63 6f 6c 25 2a  72 6f 77 25 29 2f 32 2c  |0,(col%*row%)/2,|
00000570  32 0d 01 a4 25 e7 20 63  6f 25 3c 31 20 77 61 69  |2...%. co%<1 wai|
00000580  74 25 3d a6 28 37 35 29  20 8b 20 77 61 69 74 25  |t%=.(75) . wait%|
00000590  3d a6 28 32 35 29 0d 01  ae 07 ed 3a ed 0d 01 b8  |=.(25).....:....|
000005a0  37 6f 6c 64 73 68 61 70  65 25 3d 62 72 64 25 28  |7oldshape%=brd%(|
000005b0  33 2c 34 29 3a 6f 6c 64  73 68 61 70 65 24 3d 22  |3,4):oldshape$="|
000005c0  73 68 22 2b c3 28 62 72  64 25 28 33 2c 34 29 29  |sh"+.(brd%(3,4))|
000005d0  2b 22 24 22 0d 01 c2 05  e1 0d 01 cc 09 2a 2a 2a  |+"$".........***|
000005e0  2a 2a 0d 01 d6 0b dd f2  73 63 6f 72 65 0d 01 e0  |**......score...|
000005f0  19 ef 32 36 3a 74 6f 74  61 6c 25 3d 30 3a e3 72  |..26:total%=0:.r|
00000600  6f 25 3d 30 b8 37 0d 01  ea 16 73 63 6f 72 65 25  |o%=0.7....score%|
00000610  3d 30 3a e3 20 63 6f 25  3d 31 b8 35 0d 01 f4 2f  |=0:. co%=1.5.../|
00000620  e7 20 62 72 64 25 28 63  6f 25 2c 72 6f 25 29 3d  |. brd%(co%,ro%)=|
00000630  62 72 64 25 28 30 2c 72  6f 25 29 20 73 63 6f 72  |brd%(0,ro%) scor|
00000640  65 25 3d 73 63 6f 72 65  25 2b 31 0d 01 fe 0c fb  |e%=score%+1.....|
00000650  20 35 3a fb 31 33 34 0d  02 08 21 f1 8a 31 2c 31  | 5:.134...!..1,1|
00000660  29 22 52 4f 57 20 22 3b  72 6f 25 2b 31 3b 22 3d  |)"ROW ";ro%+1;"=|
00000670  22 3b 73 63 6f 72 65 25  0d 02 12 05 ed 0d 02 1c  |";score%........|
00000680  35 fb 31 3a 74 6f 74 61  6c 25 3d 74 6f 74 61 6c  |5.1:total%=total|
00000690  25 2b 73 63 6f 72 65 25  3a f1 8a 30 2c 32 29 22  |%+score%:..0,2)"|
000006a0  53 55 42 20 54 4f 54 41  4c 3d 22 3b 74 6f 74 61  |SUB TOTAL=";tota|
000006b0  6c 25 0d 02 26 29 f2 61  72 72 6f 77 73 28 38 29  |l%..&).arrows(8)|
000006c0  3a 64 65 6c 61 79 25 3d  a6 28 33 30 30 29 3a f2  |:delay%=.(300):.|
000006d0  61 72 72 6f 77 73 28 37  29 3a ed 0d 02 30 30 fb  |arrows(7):...00.|
000006e0  34 3a fb 31 33 34 3a 61  6c 6c 25 3d 61 6c 6c 25  |4:.134:all%=all%|
000006f0  2b 74 6f 74 61 6c 25 3a  f1 8a 32 2c 34 29 22 54  |+total%:..2,4)"T|
00000700  4f 54 41 4c 3d 22 3b 61  6c 6c 25 0d 02 3a 05 e1  |OTAL=";all%..:..|
00000710  0d 02 44 09 2a 2a 2a 2a  2a 0d 02 4e 15 dd f2 61  |..D.*****..N...a|
00000720  72 72 6f 77 73 28 63 6f  6c 6f 75 72 25 29 0d 02  |rrows(colour%)..|
00000730  58 12 fb 31 33 35 3a fb  20 63 6f 6c 6f 75 72 25  |X..135:. colour%|
00000740  0d 02 62 38 f1 8a 30 2c  37 2b 28 33 2a 72 6f 25  |..b8..0,7+(3*ro%|
00000750  29 29 bd 32 32 37 8a 30  2c 38 2b 28 33 2a 72 6f  |)).227.0,8+(3*ro|
00000760  25 29 29 bd 32 32 34 8a  30 2c 39 2b 28 33 2a 72  |%)).224.0,9+(3*r|
00000770  6f 25 29 29 bd 32 32 38  0d 02 6c 3c f1 8a 31 39  |o%)).228..l<..19|
00000780  2c 37 2b 28 33 2a 72 6f  25 29 29 bd 32 32 35 8a  |,7+(3*ro%)).225.|
00000790  31 39 2c 38 2b 28 33 2a  72 6f 25 29 29 bd 32 32  |19,8+(3*ro%)).22|
000007a0  34 8a 31 39 2c 39 2b 28  33 2a 72 6f 25 29 29 bd  |4.19,9+(3*ro%)).|
000007b0  32 32 36 3b 0d 02 76 1b  e7 20 72 6f 25 3c 37 20  |226;..v.. ro%<7 |
000007c0  d4 31 2c 2d 31 30 2c 72  6f 25 2a 31 35 2c 32 0d  |.1,-10,ro%*15,2.|
000007d0  02 80 05 e1 0d 02 8a 09  2a 2a 2a 2a 2a 0d 02 94  |........*****...|
000007e0  0a dd f2 6d 6f 76 65 0d  02 9e 21 63 6f 6c 25 3d  |...move...!col%=|
000007f0  31 30 3a 72 6f 77 25 3d  31 33 3a 74 65 6d 70 74  |10:row%=13:tempt|
00000800  61 72 67 65 74 25 3d 30  0d 02 a8 0f f5 3a f2 70  |arget%=0.....:.p|
00000810  72 69 6e 74 28 33 29 0d  02 b2 0e e3 64 75 6d 6d  |rint(3).....dumm|
00000820  79 3d 31 b8 31 0d 02 bc  0e e3 66 6c 61 67 25 3d  |y=1.1.....flag%=|
00000830  31 b8 32 0d 02 c6 05 f5  0d 02 d0 0d f5 3a 2a 46  |1.2..........:*F|
00000840  58 32 31 2c 30 0d 02 da  0b 6d 6f 76 65 25 3d a5  |X21,0....move%=.|
00000850  0d 02 e4 32 fd 20 28 6d  6f 76 65 25 3e 31 33 35  |...2. (move%>135|
00000860  20 80 20 6d 6f 76 65 25  3c 31 34 30 29 20 84 20  | . move%<140) . |
00000870  6d 6f 76 65 25 3d 39 20  84 20 6d 6f 76 65 25 3d  |move%=9 . move%=|
00000880  33 32 0d 02 ee 33 e7 6d  6f 76 65 25 3d 39 20 66  |32...3.move%=9 f|
00000890  6c 61 67 25 3d 32 3a 74  65 6d 70 74 61 72 67 65  |lag%=2:temptarge|
000008a0  74 25 3d 74 61 72 67 65  74 25 3a 74 61 72 67 65  |t%=target%:targe|
000008b0  74 25 3d 2d 31 0d 02 f8  2c fb 31 33 35 3a f2 63  |t%=-1...,.135:.c|
000008c0  6f 6c 6f 75 72 3a fb 63  6c 72 25 3a f1 8a 63 6f  |olour:.clr%:..co|
000008d0  6c 25 2c 72 6f 77 25 29  a0 28 73 68 61 70 65 24  |l%,row%).(shape$|
000008e0  29 0d 03 02 21 e7 20 6d  6f 76 65 25 3d 31 33 36  |)...!. move%=136|
000008f0  20 80 20 63 6f 6c 25 3c  36 20 f2 72 65 73 74 6f  | . col%<6 .resto|
00000900  72 65 0d 03 0c 39 e7 20  6d 6f 76 65 25 3d 31 33  |re...9. move%=13|
00000910  36 20 80 20 63 6f 6c 25  3e 36 20 63 6f 6c 25 3d  |6 . col%>6 col%=|
00000920  63 6f 6c 25 2d 33 3a f2  70 72 69 6e 74 28 66 6c  |col%-3:.print(fl|
00000930  61 67 25 29 3a f2 73 6f  75 6e 64 0d 03 16 22 e7  |ag%):.sound...".|
00000940  20 6d 6f 76 65 25 3d 31  33 37 20 80 20 63 6f 6c  | move%=137 . col|
00000950  25 3e 31 33 20 f2 72 65  73 74 6f 72 65 0d 03 20  |%>13 .restore.. |
00000960  3a e7 20 6d 6f 76 65 25  3d 31 33 37 20 80 20 63  |:. move%=137 . c|
00000970  6f 6c 25 3c 31 36 20 63  6f 6c 25 3d 63 6f 6c 25  |ol%<16 col%=col%|
00000980  2b 33 3a f2 70 72 69 6e  74 28 66 6c 61 67 25 29  |+3:.print(flag%)|
00000990  3a f2 73 6f 75 6e 64 0d  03 2a 22 e7 20 6d 6f 76  |:.sound..*". mov|
000009a0  65 25 3d 31 33 38 20 80  20 72 6f 77 25 3e 31 39  |e%=138 . row%>19|
000009b0  20 f2 72 65 73 74 6f 72  65 0d 03 34 3a e7 20 6d  | .restore..4:. m|
000009c0  6f 76 65 25 3d 31 33 38  20 80 20 72 6f 77 25 3c  |ove%=138 . row%<|
000009d0  32 32 20 72 6f 77 25 3d  72 6f 77 25 2b 33 3a f2  |22 row%=row%+3:.|
000009e0  70 72 69 6e 74 28 66 6c  61 67 25 29 3a f2 73 6f  |print(flag%):.so|
000009f0  75 6e 64 0d 03 3e 21 e7  20 6d 6f 76 65 25 3d 31  |und..>!. move%=1|
00000a00  33 39 20 80 20 72 6f 77  25 3c 33 20 f2 72 65 73  |39 . row%<3 .res|
00000a10  74 6f 72 65 0d 03 48 39  e7 20 6d 6f 76 65 25 3d  |tore..H9. move%=|
00000a20  31 33 39 20 80 20 72 6f  77 25 3e 33 20 72 6f 77  |139 . row%>3 row|
00000a30  25 3d 72 6f 77 25 2d 33  3a f2 70 72 69 6e 74 28  |%=row%-3:.print(|
00000a40  66 6c 61 67 25 29 3a f2  73 6f 75 6e 64 0d 03 52  |flag%):.sound..R|
00000a50  23 fd 20 28 66 6c 61 67  25 3d 31 20 80 20 6d 6f  |#. (flag%=1 . mo|
00000a60  76 65 25 3d 33 32 29 84  20 66 6c 61 67 25 3d 32  |ve%=32). flag%=2|
00000a70  0d 03 5c 29 e7 6d 6f 76  65 25 3d 39 20 80 20 66  |..\).move%=9 . f|
00000a80  6c 61 67 25 3d 32 20 d4  31 2c 2d 31 30 2c 32 30  |lag%=2 .1,-10,20|
00000a90  30 2c 33 3a e5 8d 74 44  43 0d 03 66 13 f2 70 72  |0,3:..tDC..f..pr|
00000aa0  69 6e 74 28 66 6c 61 67  25 29 3a ed 0d 03 70 0f  |int(flag%):...p.|
00000ab0  f2 73 77 61 70 3a f2 6c  65 66 74 0d 03 7a 17 74  |.swap:.left..z.t|
00000ac0  65 6d 70 74 61 72 67 65  74 25 3d 74 61 72 67 65  |emptarget%=targe|
00000ad0  74 25 0d 03 84 0a ed 64  75 6d 6d 79 0d 03 8e 0f  |t%.....dummy....|
00000ae0  fd 20 74 61 72 67 65 74  25 3c 30 0d 03 98 15 74  |. target%<0....t|
00000af0  61 72 67 65 74 25 3d 30  3a 6d 6f 76 65 25 3d 39  |arget%=0:move%=9|
00000b00  0d 03 a2 05 e1 0d 03 ac  09 2a 2a 2a 2a 2a 0d 03  |.........*****..|
00000b10  b6 12 dd f2 70 72 69 6e  74 28 66 6c 61 67 25 29  |....print(flag%)|
00000b20  0d 03 c0 19 63 6f 25 3d  63 6f 6c 25 81 33 3a 72  |....co%=col%.3:r|
00000b30  6f 25 3d 72 6f 77 25 81  33 0d 03 ca 24 73 68 61  |o%=row%.3...$sha|
00000b40  70 65 24 3d 22 73 68 22  2b c3 28 62 72 64 25 28  |pe$="sh"+.(brd%(|
00000b50  63 6f 25 2c 72 6f 25 29  29 2b 22 24 22 0d 03 d4  |co%,ro%))+"$"...|
00000b60  24 e7 28 66 6c 61 67 25  3d 31 20 84 20 66 6c 61  |$.(flag%=1 . fla|
00000b70  67 25 3d 33 29 20 fb 31  33 36 20 8b 20 fb 31 34  |g%=3) .136 . .14|
00000b80  33 0d 03 de 11 f2 63 6f  6c 6f 75 72 3a fb 63 6c  |3.....colour:.cl|
00000b90  72 25 0d 03 e8 19 f1 8a  63 6f 6c 25 2c 72 6f 77  |r%......col%,row|
00000ba0  25 29 a0 28 73 68 61 70  65 24 29 0d 03 f2 10 e7  |%).(shape$).....|
00000bb0  66 6c 61 67 25 3d 33 20  8c 20 e1 0d 03 fc 22 e7  |flag%=3 . ....".|
00000bc0  66 6c 61 67 25 3d 31 20  80 20 6d 6f 76 65 25 3d  |flag%=1 . move%=|
00000bd0  33 32 20 d4 31 2c 31 2c  31 30 30 2c 33 0d 04 06  |32 .1,1,100,3...|
00000be0  5d e7 66 6c 61 67 25 3d  31 20 6f 6c 64 63 6f 6c  |].flag%=1 oldcol|
00000bf0  25 3d 63 6f 6c 25 3a 6f  6c 64 72 6f 77 25 3d 72  |%=col%:oldrow%=r|
00000c00  6f 77 25 3a 6f 6c 64 73  68 61 70 65 25 3d 62 72  |ow%:oldshape%=br|
00000c10  64 25 28 6f 6c 64 63 6f  6c 25 81 33 2c 6f 6c 64  |d%(oldcol%.3,old|
00000c20  72 6f 77 25 81 33 29 3a  6f 6c 64 73 68 61 70 65  |row%.3):oldshape|
00000c30  24 3d 73 68 61 70 65 24  3a e1 0d 04 10 5a 6f 6c  |$=shape$:....Zol|
00000c40  64 63 6f 6c 32 25 3d 63  6f 6c 25 3a 6f 6c 64 72  |dcol2%=col%:oldr|
00000c50  6f 77 32 25 3d 72 6f 77  25 3a 6f 6c 64 73 68 61  |ow2%=row%:oldsha|
00000c60  70 65 32 25 3d 62 72 64  25 28 6f 6c 64 63 6f 6c  |pe2%=brd%(oldcol|
00000c70  32 25 81 33 2c 6f 6c 64  72 6f 77 32 25 81 33 29  |2%.3,oldrow2%.3)|
00000c80  3a 6f 6c 64 73 68 61 70  65 32 24 3d 73 68 61 70  |:oldshape2$=shap|
00000c90  65 24 3a e1 0d 04 1a 09  2a 2a 2a 2a 2a 0d 04 24  |e$:.....*****..$|
00000ca0  0a dd f2 73 77 61 70 0d  04 2e 43 74 65 6d 70 73  |...swap...Ctemps|
00000cb0  68 61 70 65 25 3d 6f 6c  64 73 68 61 70 65 25 3a  |hape%=oldshape%:|
00000cc0  6f 6c 64 73 68 61 70 65  25 3d 6f 6c 64 73 68 61  |oldshape%=oldsha|
00000cd0  70 65 32 25 3a 6f 6c 64  73 68 61 70 65 32 25 3d  |pe2%:oldshape2%=|
00000ce0  74 65 6d 70 73 68 61 70  65 25 0d 04 38 4e 62 72  |tempshape%..8Nbr|
00000cf0  64 25 28 6f 6c 64 63 6f  6c 32 25 81 33 2c 6f 6c  |d%(oldcol2%.3,ol|
00000d00  64 72 6f 77 32 25 81 33  29 3d 6f 6c 64 73 68 61  |drow2%.3)=oldsha|
00000d10  70 65 32 25 3a 62 72 64  25 28 6f 6c 64 63 6f 6c  |pe2%:brd%(oldcol|
00000d20  25 81 33 2c 6f 6c 64 72  6f 77 25 81 33 29 3d 6f  |%.3,oldrow%.3)=o|
00000d30  6c 64 73 68 61 70 65 25  0d 04 42 37 74 65 6d 70  |ldshape%..B7temp|
00000d40  63 6f 6c 25 3d 6f 6c 64  63 6f 6c 25 3a 6f 6c 64  |col%=oldcol%:old|
00000d50  63 6f 6c 25 3d 6f 6c 64  63 6f 6c 32 25 3a 6f 6c  |col%=oldcol2%:ol|
00000d60  64 63 6f 6c 32 25 3d 74  65 6d 70 63 6f 6c 25 0d  |dcol2%=tempcol%.|
00000d70  04 4c 37 74 65 6d 70 72  6f 77 25 3d 6f 6c 64 72  |.L7temprow%=oldr|
00000d80  6f 77 25 3a 6f 6c 64 72  6f 77 25 3d 6f 6c 64 72  |ow%:oldrow%=oldr|
00000d90  6f 77 32 25 3a 6f 6c 64  72 6f 77 32 25 3d 74 65  |ow2%:oldrow2%=te|
00000da0  6d 70 72 6f 77 25 0d 04  56 43 74 65 6d 70 73 68  |mprow%..VCtempsh|
00000db0  61 70 65 24 3d 6f 6c 64  73 68 61 70 65 24 3a 6f  |ape$=oldshape$:o|
00000dc0  6c 64 73 68 61 70 65 24  3d 6f 6c 64 73 68 61 70  |ldshape$=oldshap|
00000dd0  65 32 24 3a 6f 6c 64 73  68 61 70 65 32 24 3d 74  |e2$:oldshape2$=t|
00000de0  65 6d 70 73 68 61 70 65  24 0d 04 60 24 fb 31 33  |empshape$..`$.13|
00000df0  35 3a e7 20 73 68 61 70  65 25 3e 35 20 6f 6c 64  |5:. shape%>5 old|
00000e00  73 68 61 70 65 25 3d b3  28 35 29 2b 31 0d 04 6a  |shape%=.(5)+1..j|
00000e10  2f fb 6f 6c 64 73 68 61  70 65 25 3a f1 8a 6f 6c  |/.oldshape%:..ol|
00000e20  64 63 6f 6c 32 25 2c 6f  6c 64 72 6f 77 32 25 29  |dcol2%,oldrow2%)|
00000e30  a0 28 6f 6c 64 73 68 61  70 65 24 29 0d 04 74 20  |.(oldshape$)..t |
00000e40  e7 20 73 68 61 70 65 25  3e 35 20 6f 6c 64 73 68  |. shape%>5 oldsh|
00000e50  61 70 65 32 25 3d b3 28  35 29 2b 31 0d 04 7e 2f  |ape2%=.(5)+1..~/|
00000e60  fb 6f 6c 64 73 68 61 70  65 32 25 3a f1 8a 6f 6c  |.oldshape2%:..ol|
00000e70  64 63 6f 6c 25 2c 6f 6c  64 72 6f 77 25 29 a0 28  |dcol%,oldrow%).(|
00000e80  6f 6c 64 73 68 61 70 65  32 24 29 0d 04 88 05 e1  |oldshape2$).....|
00000e90  0d 04 92 09 2a 2a 2a 2a  2a 0d 04 9c 0d dd f2 72  |....*****......r|
00000ea0  65 73 74 6f 72 65 0d 04  a6 18 e7 66 6c 61 67 25  |estore.....flag%|
00000eb0  3d 31 20 fb 31 33 36 20  8b 20 fb 31 34 33 0d 04  |=1 .136 . .143..|
00000ec0  b0 27 f2 63 6f 6c 6f 75  72 3a fb 63 6c 72 25 3a  |.'.colour:.clr%:|
00000ed0  f1 8a 63 6f 6c 25 2c 72  6f 77 25 29 a0 28 73 68  |..col%,row%).(sh|
00000ee0  61 70 65 24 29 0d 04 ba  05 e1 0d 04 c4 09 2a 2a  |ape$).........**|
00000ef0  2a 2a 2a 0d 04 ce 0a dd  f2 6c 65 66 74 0d 04 d8  |***......left...|
00000f00  11 ef 32 38 2c 31 33 2c  34 2c 31 39 2c 30 0d 04  |..28,13,4,19,0..|
00000f10  e2 4a e7 20 6d 6f 76 65  25 3d 39 20 f2 73 6f 75  |.J. move%=9 .sou|
00000f20  6e 64 33 3a fb 30 3a f1  8a 31 2c 31 29 22 41 44  |nd3:.0:..1,1)"AD|
00000f30  44 45 44 22 8a 31 2c 32  29 22 4d 4f 56 45 53 22  |DED".1,2)"MOVES"|
00000f40  8a 33 2c 33 29 c3 62 6f  6e 75 73 25 3a 77 61 69  |.3,3).bonus%:wai|
00000f50  74 3d a6 28 33 30 30 29  0d 04 ec 26 e7 20 6d 6f  |t=.(300)...&. mo|
00000f60  76 65 25 3d 39 20 80 20  65 78 74 72 61 25 3e 30  |ve%=9 . extra%>0|
00000f70  20 f2 73 6f 75 6e 64 32  3a f2 6d 6f 72 65 0d 04  | .sound2:.more..|
00000f80  f6 0a fb 31 33 33 3a db  0d 05 00 14 fb 32 3a f1  |...133:......2:.|
00000f90  8a 31 2c 31 29 22 4d 4f  56 45 53 22 0d 05 0a 14  |.1,1)"MOVES"....|
00000fa0  74 61 72 67 65 74 24 3d  c3 74 61 72 67 65 74 25  |target$=.target%|
00000fb0  0d 05 14 1d e7 20 74 61  72 67 65 74 25 3c 31 20  |..... target%<1 |
00000fc0  74 61 72 67 65 74 24 3d  22 4e 49 4c 22 0d 05 1e  |target$="NIL"...|
00000fd0  13 e7 20 74 61 72 67 65  74 25 3c 36 20 fb 31 33  |.. target%<6 .13|
00000fe0  0d 05 28 1e f1 8a 34 2d  a9 28 74 61 72 67 65 74  |..(...4-.(target|
00000ff0  24 29 2f 32 2c 33 29 74  61 72 67 65 74 24 0d 05  |$)/2,3)target$..|
00001000  32 15 74 61 72 67 65 74  25 3d 74 61 72 67 65 74  |2.target%=target|
00001010  25 2d 31 0d 05 3c 11 ef  32 38 2c 30 2c 33 31 2c  |%-1..<..28,0,31,|
00001020  31 39 2c 36 0d 05 46 05  e1 0d 05 50 09 2a 2a 2a  |19,6..F....P.***|
00001030  2a 2a 0d 05 5a 0b dd f2  61 67 61 69 6e 0d 05 64  |**..Z...again..d|
00001040  38 e7 20 28 62 6f 61 72  64 25 2d 32 29 3c 3e 31  |8. (board%-2)<>1|
00001050  20 62 6f 61 72 64 73 24  3d 22 20 62 6f 61 72 64  | boards$=" board|
00001060  73 22 20 8b 20 62 6f 61  72 64 73 24 3d 22 20 62  |s" . boards$=" b|
00001070  6f 61 72 64 22 0d 05 6e  30 f2 64 62 6c 28 22 59  |oard"..n0.dbl("Y|
00001080  6f 75 20 63 6f 6d 70 6c  65 74 65 64 20 22 2b c3  |ou completed "+.|
00001090  28 62 6f 61 72 64 25 2d  32 29 2b 62 6f 61 72 64  |(board%-2)+board|
000010a0  73 24 2c 31 29 0d 05 78  26 f2 64 62 6c 28 22 61  |s$,1)..x&.dbl("a|
000010b0  6e 64 20 73 63 6f 72 65  64 20 22 2b c3 61 6c 6c  |nd scored "+.all|
000010c0  25 2b 22 20 62 75 74 22  2c 32 29 0d 05 82 61 e7  |%+" but",2)...a.|
000010d0  20 74 61 72 67 65 74 25  3e 30 20 f2 64 62 6c 28  | target%>0 .dbl(|
000010e0  22 79 6f 75 20 73 74 69  6c 6c 20 68 61 64 20 22  |"you still had "|
000010f0  2b 74 61 72 67 65 74 24  2b 22 20 6d 6f 76 65 73  |+target$+" moves|
00001100  20 6c 65 66 74 2e 22 2c  33 29 20 8b 20 f2 64 62  | left.",3) . .db|
00001110  6c 28 22 79 6f 75 20 72  61 6e 20 6f 75 74 20 6f  |l("you ran out o|
00001120  66 20 6d 6f 76 65 73 2e  22 2c 33 29 0d 05 8c 32  |f moves.",3)...2|
00001130  66 69 6e 61 6c 25 3d 61  6c 6c 25 2a 28 62 6f 61  |final%=all%*(boa|
00001140  72 64 25 2d 31 29 2d 28  74 61 72 67 65 74 25 2a  |rd%-1)-(target%*|
00001150  28 62 6f 61 72 64 25 2d  31 29 20 81 32 29 0d 05  |(board%-1) .2)..|
00001160  96 2a f2 64 62 6c 28 22  59 6f 75 72 20 66 69 6e  |.*.dbl("Your fin|
00001170  61 6c 20 73 63 6f 72 65  20 69 73 20 22 2b c3 66  |al score is "+.f|
00001180  69 6e 61 6c 25 2c 34 29  0d 05 a0 57 f2 64 62 6c  |inal%,4)...W.dbl|
00001190  28 22 41 67 61 69 6e 20  28 59 2f 4e 29 20 3f 22  |("Again (Y/N) ?"|
000011a0  2c 35 29 3a f5 3a 61 67  61 69 6e 24 3d be 3a fd  |,5):.:again$=.:.|
000011b0  20 61 67 61 69 6e 24 3d  22 59 22 20 84 61 67 61  | again$="Y" .aga|
000011c0  69 6e 24 3d 22 79 22 20  84 61 67 61 69 6e 24 3d  |in$="y" .again$=|
000011d0  22 4e 22 20 84 61 67 61  69 6e 24 3d 22 6e 22 0d  |"N" .again$="n".|
000011e0  05 aa 28 e7 20 61 67 61  69 6e 24 3d 22 59 22 20  |..(. again$="Y" |
000011f0  84 20 61 67 61 69 6e 24  3d 22 79 22 20 8c 20 f9  |. again$="y" . .|
00001200  20 8b 20 f2 65 6e 64 0d  05 b4 05 e1 0d 05 be 09  | . .end.........|
00001210  2a 2a 2a 2a 2a 0d 05 c8  0b dd f2 6c 6f 77 65 72  |*****......lower|
00001220  0d 05 d2 18 e7 20 74 6f  74 61 6c 25 3c 31 30 20  |..... total%<10 |
00001230  62 6f 6e 75 73 25 3d 30  0d 05 dc 0e 65 78 74 72  |bonus%=0....extr|
00001240  61 25 3d a4 65 78 0d 05  e6 3d 74 61 72 67 65 74  |a%=.ex...=target|
00001250  25 3d 74 61 72 67 65 74  25 2b 62 6f 6e 75 73 25  |%=target%+bonus%|
00001260  2b 74 65 6d 70 74 61 72  67 65 74 25 2b 65 78 74  |+temptarget%+ext|
00001270  72 61 25 3a 62 6f 6e 75  73 25 3d 62 6f 6e 75 73  |ra%:bonus%=bonus|
00001280  25 2d 31 0d 05 f0 17 e7  20 62 6f 6e 75 73 25 3c  |%-1..... bonus%<|
00001290  31 20 62 6f 6e 75 73 25  3d 30 0d 05 fa 19 e7 20  |1 bonus%=0..... |
000012a0  74 61 72 67 65 74 25 3c  31 20 74 61 72 67 65 74  |target%<1 target|
000012b0  25 3d 30 0d 06 04 2f 62  6f 61 72 64 25 3d 62 6f  |%=0.../board%=bo|
000012c0  61 72 64 25 2b 31 3a f1  8a 30 2c 31 29 c4 31 32  |ard%+1:..0,1).12|
000012d0  2c 22 20 22 29 8a 30 2c  32 29 c4 31 32 2c 22 20  |," ").0,2).12," |
000012e0  22 29 0d 06 0e 2c e7 20  62 6f 61 72 64 25 20 83  |")...,. board% .|
000012f0  32 3d 31 20 80 20 62 6f  61 72 64 25 3e 32 20 73  |2=1 . board%>2 s|
00001300  68 61 70 65 25 3d 73 68  61 70 65 25 2b 31 0d 06  |hape%=shape%+1..|
00001310  18 17 e7 20 73 68 61 70  65 25 3e 38 20 73 68 61  |... shape%>8 sha|
00001320  70 65 25 3d 38 0d 06 22  05 e1 0d 06 2c 09 2a 2a  |pe%=8.."....,.**|
00001330  2a 2a 2a 0d 06 36 15 dd  f2 64 62 6c 28 77 6f 72  |***..6...dbl(wor|
00001340  64 24 2c 68 75 65 25 29  0d 06 40 13 77 6f 72 64  |d$,hue%)..@.word|
00001350  6c 65 6e 25 3d a9 77 6f  72 64 24 0d 06 4a 1c e3  |len%=.word$..J..|
00001360  20 70 72 69 6e 74 25 3d  64 6f 77 6e 25 20 b8 20  | print%=down% . |
00001370  64 6f 77 6e 25 2b 31 0d  06 54 31 f1 8a 31 37 2d  |down%+1..T1..17-|
00001380  28 77 6f 72 64 6c 65 6e  25 2f 32 29 2c 70 72 69  |(wordlen%/2),pri|
00001390  6e 74 25 29 bd 31 34 31  bd 28 31 32 38 2b 68 75  |nt%).141.(128+hu|
000013a0  65 25 29 77 6f 72 64 24  0d 06 5e 13 ed 3a 64 6f  |e%)word$..^..:do|
000013b0  77 6e 25 3d 64 6f 77 6e  25 2b 34 0d 06 68 05 e1  |wn%=down%+4..h..|
000013c0  0d 06 72 09 2a 2a 2a 2a  2a 0d 06 7c 0c dd f2 63  |..r.*****..|...c|
000013d0  6f 6c 6f 75 72 0d 06 86  32 e7 20 62 6f 61 72 64  |olour...2. board|
000013e0  25 20 83 32 3d 31 20 63  6c 72 25 3d 62 72 64 25  |% .2=1 clr%=brd%|
000013f0  28 63 6f 25 2c 72 6f 25  29 20 8b 20 63 6c 72 25  |(co%,ro%) . clr%|
00001400  3d b3 28 35 29 2b 31 0d  06 90 1a e7 20 73 68 61  |=.(5)+1..... sha|
00001410  70 65 25 3e 35 20 63 6c  72 25 3d b3 28 35 29 2b  |pe%>5 clr%=.(5)+|
00001420  31 0d 06 9a 05 e1 0d 06  a4 09 2a 2a 2a 2a 2a 0d  |1.........*****.|
00001430  06 ae 09 dd f2 65 6e 64  0d 06 b8 0b 2a 46 58 39  |.....end....*FX9|
00001440  20 32 35 0d 06 c2 0c 2a  46 58 31 30 20 32 35 0d  | 25....*FX10 25.|
00001450  06 cc 08 2a 46 58 34 0d  06 d6 0a 2a 46 58 32 31  |...*FX4....*FX21|
00001460  30 0d 06 e0 0d 2a 46 58  32 32 30 2c 32 37 0d 06  |0....*FX220,27..|
00001470  ea 1b ef 32 33 3b 31 31  2c 32 35 35 3b 30 3b 30  |...23;11,255;0;0|
00001480  3b 30 3a 2a 46 58 32 31  30 0d 06 f4 05 e1 0d 06  |;0:*FX210.......|
00001490  fe 09 2a 2a 2a 2a 2a 0d  07 08 10 dd f2 65 72 72  |..*****......err|
000014a0  6f 72 3a 2a 46 58 34 0d  07 12 09 ee 20 85 20 87  |or:*FX4..... . .|
000014b0  0d 07 1c 0e f6 3a f1 22  20 40 20 22 3b 9e 0d 07  |.....:." @ ";...|
000014c0  26 05 e0 0d 07 30 09 2a  2a 2a 2a 2a 0d 07 3a 0b  |&....0.*****..:.|
000014d0  dd f2 73 6f 75 6e 64 0d  07 44 16 d4 31 2c 33 2c  |..sound..D..1,3,|
000014e0  28 63 6f 25 2a 72 6f 25  29 2a 36 2c 32 0d 07 4e  |(co%*ro%)*6,2..N|
000014f0  05 e1 0d 07 58 09 2a 2a  2a 2a 2a 0d 07 62 08 dd  |....X.*****..b..|
00001500  a4 65 78 0d 07 6c 12 e7  20 74 6f 74 61 6c 25 3e  |.ex..l.. total%>|
00001510  31 39 3d 31 30 0d 07 76  11 e7 20 74 6f 74 61 6c  |19=10..v.. total|
00001520  25 3e 31 34 3d 35 0d 07  80 06 3d 30 0d 07 8a 09  |%>14=5....=0....|
00001530  2a 2a 2a 2a 2a 0d 07 94  0a dd f2 6d 6f 72 65 0d  |*****......more.|
00001540  07 9e 1a e7 20 65 78 74  72 61 25 3e 35 20 fb 31  |.... extra%>5 .1|
00001550  34 30 20 8b 20 fb 31 34  32 0d 07 a8 25 db 3a fb  |40 . .142...%.:.|
00001560  37 3a f1 8a 31 2c 31 29  22 42 4f 4e 55 53 22 3a  |7:..1,1)"BONUS":|
00001570  65 78 74 72 61 24 3d c3  65 78 74 72 61 25 0d 07  |extra$=.extra%..|
00001580  b2 1c f1 8a 34 2d a9 28  65 78 74 72 61 24 29 2f  |....4-.(extra$)/|
00001590  32 2c 32 29 65 78 74 72  61 24 0d 07 bc 11 f1 8a  |2,2)extra$......|
000015a0  31 2c 33 29 22 4d 4f 56  45 53 22 0d 07 c6 12 77  |1,3)"MOVES"....w|
000015b0  61 69 74 25 3d a6 28 35  30 30 29 3a e1 0d 07 d0  |ait%=.(500):....|
000015c0  09 2a 2a 2a 2a 2a 0d 07  da 0c dd f2 73 6f 75 6e  |.*****......soun|
000015d0  64 32 0d 07 e4 1d e3 6c  3d 31 b8 35 3a d4 31 2c  |d2.....l=1.5:.1,|
000015e0  32 2c 31 30 30 2c 33 3a  57 3d a6 28 31 30 29 0d  |2,100,3:W=.(10).|
000015f0  07 ee 15 d4 31 2c 32 2c  31 30 2c 33 3a 57 3d a6  |....1,2,10,3:W=.|
00001600  28 31 30 29 0d 07 f8 0e  ed 3a d4 31 2c 30 2c 30  |(10).....:.1,0,0|
00001610  2c 30 0d 08 02 05 e1 0d  08 0c 09 2a 2a 2a 2a 2a  |,0.........*****|
00001620  0d 08 16 0c dd f2 73 6f  75 6e 64 33 0d 08 20 1f  |......sound3.. .|
00001630  e3 6c 3d 39 36 b8 39 37  3a d4 30 2c 32 2c 6c 2c  |.l=96.97:.0,2,l,|
00001640  31 3a 77 3d a6 28 33 30  29 3a ed 0d 08 2a 0e d4  |1:w=.(30):...*..|
00001650  30 2c 30 2c 30 2c 30 3a  e1 0d 08 34 09 2a 2a 2a  |0,0,0,0:...4.***|
00001660  2a 2a 0d ff                                       |**..|
00001664
13-01-89/SWITCH2.m0
13-01-89/SWITCH2.m1
13-01-89/SWITCH2.m2
13-01-89/SWITCH2.m4
13-01-89/SWITCH2.m5