10 rem D.M.BROAD. 20 rem SUMMER 1986. 30 : 40 gosub 3000 50 : 60 gosub 6000 70 : 80 get key A$ 85 end 99 : 3000 color 0,15,3: color 4,3,3: color 1,1 3005 dim MZ%(39,24), D(4) 3010 def fn R(X)= int( rnd(1) *X) 3020 D(0)=0: D(1)=2: D(2)=0: D(3)=-2: D(4)=0 3030 WD= 34: HE= 22: NN= int(WD/2) * int(HE/2) 3040 print "WAIT.." 3050 gosub 5000 3060 return 3070 : 4490 rem FIND DIRECTION. 4500 DR= fn R(4)+1 4550 RX= D(DR): RY= D(DR-1) 4560 if PX+RX<0 or PX+RX>=WD or PY+RY<0 or PY+RY>=HE then F=1: else F=0 4570 return 4580 : 5000 PX= int(WD/2): PY= int(HE/2) 5010 SX= PX-2: SY= PY: NS=0 5050 gosub 4500: if F goto 5050 5100 MZ%(PX,PY)=1 5110 NS= NS+1: if NS=NN then return 5120 print ".";: C=0 5130 : 5150 if MZ%(PX+RX, PY+RY)=0 then 5500 5200 DR= 1+DR*(DR=4)+DR 5210 gosub 4550: if F goto 5200 5220 C=C+1: if C<4 then 5150 5225 : 5230 C=0: SX=SX+2: if SX>=WD then SX=1: SY=SY+2: if SY>=HE then SY=1 5235 : 5240 if MZ%(SX,SY)=1 then PX=SX: PY=SY: goto 5210: else goto 5230 5250 : 5500 MZ%(PX+RX/2, PY+RY/2)=1 5510 PX= PX+RX: PY= PY+RY 5520 goto 5050 5530 : 6000 scnclr 6005 for Y=0 to HE 6010 for X=0 to WD 6020 A= MZ%(X,Y) 6030 if A=0 then print " ";: else print " "; 6040 next 6050 print 6060 next 6070 return 6080 :