ZXTape!Maze K K M  4000 2x$(n+1,n+1):y$(n+1,n+1) `:m=1n+1:p=1n+1:x$(m,p)=(<.5):y$(m,p)=(>.5):p:m O'''"Press any key":0:cx=((n+1)/2):cy=cx:cx1=cx:cy1=cy /3000 :2000:12 ,9 ;"" %a$=:(a$<"5")(a$>"9")1050 $.4L,30:a$="9" .%(a$="5")Ưy$(cx,cy)cx1=cx-1 8%(a$="6")Ưx$(cx,cy)cy1=cy-1 B-(a$="7")Ưx$(cx,cy+1)cy1=cy+1 L-(a$="8")Ưy$(cx+1,cy)cx1=cx+1 VQ(cx1(x+8))(cy1(y+8))cx=cx1:cy=cy1:2000 `t20-2*(cy-y),2*(cx-x)+1;" ";20-2*(cy1-y),2*(cx1-x)+1;2;"" jcx=cx1:cy=cy1:(cx>n)(cx<1)(cy>n)(cy<1)30:0,0;6;2;1;"** You have escaped **"'"Press enter for another game";a$: t 1050 x=cx-4:y=cy-4:a1=((1-x)>0)*(1-x):a2=((n-x-8)0)*9 +((n-x-8)<0)*(n-x+1):b1=((1-y)>0)*(1-y):b2=((n-y-8)0)*9 +((n-y-8)<0)*(n-y+1) 0:0::4:1:a=a1a2:b=b1b2-1:20-2*b,20;5;y+b:c=02:16*a+c,16*b:0,5:ݯy$(x+a,y+b);0,7:0,6:c:b:a a=a1a2-1:2-(a-2*(a/2)),2*a;5;x+a:b=b1b2:c=02:16*a,16*b+c:5,0:ݯx$(x+a,y+b);7,0:6,0:c:b:a 0,0;6;"Use the cursor keys 5-8 to move";5,23;"Press 9";7,23;"for a";9 ,23;"new maze"  2  4m=07:"a"+m,(224m5):m  70:0:7::1,14;"MAZE" 5,4;5;"This program will generate arandom square maze and place youin the centre of it"'''4;" A 9x9 section is displayed in which you can move left, right, up or down. A new section will be displayed when you move off the grid" ''5;"You may select the size of the maze by specifying the length ofone side":0,0;("Type in a number 1 to 50 followed by enter. ";1;"SIZE ");a$ Qa$""n=1̱a$:(a$(n)"0")(a$(n)"9")n:n=a$:n5024050  4000 ҁ:" Your Spectrum compuer will now take about ";(n^2/16)+4;" secs"'"to generate a ";n;" by ";n;" maze": Maze orig.    4000 2x$(n+1,n+1):y$(n+1,n+1) `:m=1n+1:p=1n+1:x$(m,p)=(<.5):y$(m,p)=(>.5):p:m O'''"Press any key":0:cx=((n+1)/2):cy=cx:cx1=cx:cy1=cy /3000 :2000:12 ,9 ;"" %a$=:(a$<"5")(a$>"9")1050 $.4L,30:a$="9" .%(a$="5")Ưy$(cx,cy)cx1=cx-1 8%(a$="6")Ưx$(cx,cy)cy1=cy-1 B-(a$="7")Ưx$(cx,cy+1)cy1=cy+1 L-(a$="8")Ưy$(cx+1,cy)cx1=cx+1 VQ(cx1(x+8))(cy1(y+8))cx=cx1:cy=cy1:2000 `t20-2*(cy-y),2*(cx-x)+1;" ";20-2*(cy1-y),2*(cx1-x)+1;2;"" jcx=cx1:cy=cy1:(cx>n)(cx<1)(cy>n)(cy<1)30:0,0;6;2;1;"** You have escaped **"'"Press enter for another game";a$: t 1050 x=cx-4:y=cy-4:a1=((1-x)>0)*(1-x):a2=((n-x-8)0)*9 +((n-x-8)<0)*(n-x+1):b1=((1-y)>0)*(1-y):b2=((n-y-8)0)*9 +((n-y-8)<0)*(n-y+1) 0:0::4:1:a=a1a2:b=b1b2-1:20-2*b,20;5;y+b:c=02:16*a+c,16*b:0,5:ݯy$(x+a,y+b);0,7:0,6:c:b:a a=a1a2-1:2-(a-2*(a/2)),2*a;5;x+a:b=b1b2:c=02:16*a,16*b+c:5,0:ݯx$(x+a,y+b);7,0:6,0:c:b:a P0,0;6;"Use the cursor keys 5-8 to move";5,23; 5,4;5;"This program will generate arandom square maze and place youin the centre of it"'''4;" A 9x9 section is displayed in which you can move left, right, up or down. A new section will be displayed when you move off the grid" ''5;"You may select the size of the maze by specifying the length ofone side":0,0;("Type in a number 1 to 50 followed by enter. ";1;"SIZE ");a$ Qa$""n=1̱a$:(a$(n)"0")(a$(n)"9")n:n=a$:n5024050  4000 ҁ:" Your Spectrum compuer will now take about ";(n^2/16)+4;" secs"'"to generate a ";n;" by ";n;" maze": ]