def seg=&HB000:display 0:gosub 550 c$="Come back!":w$="Wall!" 1 randomize:cls:r=0:z$="":t=0 for i=1 to 5:z$=z$+chr$(4):next goto 190 3 x=14:y=4:locate y+1,x+1:print z$ xx=19:yy=4:xxx=-1:yyy=0:gosub 510 errwin 5,22,"Are you ready?" 10 for i=1 to 10:next:a$=inkey$ if a$="K" then xxx=-1:yyy=0 if a$="H" then yyy=-1:xxx=0 if a$="P" then yyy=1:xxx=0 if a$="M" then xxx=1:yyy=0 x=x+xxx:y=y+yyy if x<0 or x>39 then k$=c$:k=5:goto 500 if y<0 or y>7 then k$=c$:k=5:goto 500 m=2*x+y*160:if peek(m)=32 then 70 if peek(m)=6 then r=1:t=t+1:print @48,using "%3.0f";t:goto 300 if peek(m)=120 then k$="Poison!":k=3:goto 500 if peek(m)=4 then k$="It's me!":k=4:goto 500 k$=w$:k=3:goto 500 70 locate y+1,x+1:print chr$(4):if r=1 then r=0:goto 10 locate yy+1,xx+1:print " ":n=0 for o=-1 to 1:for p=-1 to 1 if n=1 then 130 if o<>0 and p<>0 then 130 if peek((xx+o)*2+(p+yy)*160)=4 then xx=xx+o:yy=yy+p:n=1 130 next:next:goto 10 190 a$="x":locate 1,1,0 191 for k=0 to 25 xa=int(rnd*40+1):xb=int(rnd*8+1) locate xb,xa:print a$:next if a$=chr$(6) then 200 a$=chr$(6):goto 191 200 box 1,1,3,13,1 print @41," Score: 0 ":goto 3 300 xa=int(rnd*38+1):xb=int(rnd*6+1) n=xa*2+xb*160:if peek(n)<>32 then 300 if xb=1 and xa<12 then 300 locate xb+1,xa+1:print chr$(6):goto 70 500 box 1,1,3,13,0 gosub 510:errwin 4,18-k,k$:locate 3,13,2 mc=menu(3,13,4,0,0,3,"Try again?","Yes","No") locate 0,0,0:if mc=0 then goto 1 cls:locate 5,16,2:print "Bye...":end 510 for i=1 to 10:a$=inkey$:next:a$="" return 550 cls:box 1,1,8,40,1:locate 1,1,0 print @91,"L T S H present:" print @166,"C A T E R P I L L A R V2.01" print @255,"(c) 1992":wait return