ZXTape!Towers  $ -10 ,10 ;"Please Wait":780  ڼ:缧:6 r(200) d$(8,8) d$(1)=" " d$(2)=" " d$(3)=" " d$(4)=" " d$(5)=" " d$(6)="" d$(7)="" d$(8)=" "  32 7n=2:g$:f=07:a:g$+f,a:f:n "a",9 ,9 ,15,15,9 ,9 ,15,15,"b",240,240,144,144,240,240,144,144 ":ç,6;"THE TOWERS OF HANOI";1,3;"Long ago the priests of the temple of Hanoi were presented with 100 golden discs in descen-ding order of size." #" Each had a central hole for threading onto one of three"'"poles of ebony inset with"'"sapphires and set in the temple floor." $" Starting with all the discs on the first pole, with the"'"smallest at the top, the priestswere charged with transferring one disc each day, with the aim of getting all the discs on to the third pole." %w" The second pole could be usedas required for intermediate"'"moves, but no disc must ever sitabove a smaller one." &/21,0;"PRESS ANY KEY TO CONTINUE" 'ç: (" Since the total number of"'"moves required for 100 discs is in excess of 1,000,000,000,000, 000,000,000,000,000,000 - the work is still proceeding!" *'" This game reduces the number of discs to 7, whih makes the total number of moves 127, and it does the heavy work of movingthe gold discs to instruction." ,s'" It will even give you a"'"solution while you watch, or"'"replay YOUR solution, complete with any mistakes!" .!'" PRESS ANY KEY TO CONTINUE" 0ç: 4[10 ,0;"Of course, if you were allowed to do it like this, it would be easy!" 6 200: :Tn=10 16:0;n,6;"";n,16;"";n,26;"":n ;(n=031:17,n;"":n <:n=17:n+9 ,3;d$(n):n:10 >n=17:n+9 ,3;d$(8);n+9 ,6;0;"":17-n,13 ;d$(n):20:n:20 @n=17:n+9 ,13 ;d$(8);n+9 ,16;0;"":17-n,23;d$(8-n):20:n:20 B 150: DB10 ,0;"But you're not-that's CHEATING!":200: F]"The following is the series"'"of numbers which gives the"'"automatic solution:":890z N:4,0;" You have three options:-"''"1) An automatic solution;"'" you just watch"'"2) You can move the discs"'" for your own solution"'"3) Having achieved a manual solution, you can replay it complete with any false moves." PO'"For 1) key a and ENTER"''"For 2) key m and ENTER"''"For 3) key r and ENTER" Um$: Wm$="m"m$="M"r(200) Z5m$"m"m$"M"m$"a"m$"A"m$"r"m$"R"78N s2n=10 16:n,6;0;"":n x3n=10 16:n,16;0;"":n }3n=10 16:n,26;0;"":n (n=031:17,n;"":n n=10 16 n,3;d$(n-9 ) n B2,7;"1";2,17;"2";2,27;"3" $6,0;"Number of moves" ?a$(8,8):b$(8,8):c$(8,8) n=8:a$(n)=d$(n):n $n=8:b$(n)=d$(8):n $n=8:c$(n)=d$(8):n *a=10 :b=17:c=17:k=ç c=10 264  271 c.2~L,7:.5,12 :.2~L,7:1,12 :"Another go (Y/N)? ";g$  g$="y"g$="Y"269   g$="n"g$="G"10000'  78N m$="r"m$="R"276 m$="a"m$="A"280 g"To move disc, key the 'from' and'to' numbers, and ENTER."'"To return to menu, key 9 and"'"ENTER: ";p Xp12 p13 p21p23p31p32 p9 273  k=k+1:r(k)=p:284 k=k+1:p=r(k)  k=1p=0365m  284 k=k+1:p=w(k)  6,18;k:400 ^<8,0;1;"ATTEMPT TO CHEAT COUNTS 1 MOVE" c120x:8,0,, h 271 p=12 x=a:y=b:sf=3:pf=6:st=13 :pt=16:x$=a$(a-9 ):y$=b$(b-9 ):500:a=x:b=y:b$(b-9 )=y$ p=13 x=a:y=c:sf=3:pf=6:st=23:pt=26:x$=a$(a-9 ):y$=c$(c-9 ):500:a=x:c=y:c$(c-9 )=y$ p=21x=b:y=a:sf=13 :pf=16:st=3:pt=6:x$=b$(b-9 ):y$=a$(a-9 ):500:b=x:a=y:a$(a-9 )=y$ p=23x=b:y=c:sf=13 :pf=16:st=23:pt=26:x$=b$(b-9 ):y$=c$(c-9 ):500:b=x:c=y:c$(c-9 )=y$ p=31x=c:y=a:sf=23:pf=26:st=3:pt=6:x$=c$(c-9 ):y$=a$(a-9 ):500:c=x:a=y:a$(a-9 )=y$ •p=32 x=c:y=b:sf=23:pf=26:st=13 :pt=16:x$=c$(c-9 ):y$=b$(b-9 ):500:c=x:b=y:b$(b-9 )=y$ p=9 34"  260 y>16530 x>16271 x$>y$350^ t$=x$ &x,sf;d$(8) 0 x=x+1 :n=x-110 -1 D n,sf;t$ N 2 Xn,sf;d$(8) bn,pf;0;"" ln vn=sfst((st>sf)-(sti=ki=i+3 @j=kj=j+3 Cr:c Hn=014 R.w(8+8*n)=w(2*n+2):n \ z&:n=1127:w(n);" ";:n /21,0;"Press any key to continue" ç::