100 init 110 randomize 120 stnum=38 130 dim cx(stnum) 140 dim cy(stnum) 150 my=10 160 waitsp=20 170 waitc=0 180 lup=0 190 ldw=0 200 padnum=30 210 for i=1 to stnum 220 cx(i)=-1 230 next i 240 label main 250 clear 260 locate 1,my 270 print"#" 280 for i=1 to stnum 290 if cx(i)>=0 then 300 locate cx(i),cy(i) 310 if cx(i)=1 and cy(i)=my then 320 print"x" 330 end 340 else 350 print"*" 360 end if 370 end if 380 next i 390 waitc=waitc+1 400 if waitc>=waitsp then 410 waitc=0 420 draw0=0 430 for i=1 to stnum 440 if cx(i)<0 and draw0=0 then 450 draw0=1 460 cx(i)=37 470 cy(i)=int(rnd*21) 480 else 490 cx(i)=cx(i)-1 500 end if 510 next i 520 end if 530 pup=pad(1,3) 540 if pup>padnum and lup<=padnum and my>0 then my=my-1 550 lup=pup 560 pdw=pad(1,4) 570 if pdw>padnum and ldw<=padnum and my<20 then my=my+1 580 fsync 1 590 ldw=pdw 600 goto *main