10 DEFINT a-z:CLS:MODE 1:BORDER 2:ink 0,0:INK 1,24:ink 2,8:SY=249:T=0:x=20:y=13:pen 1:for i=1 to 40:locate i,1:? chr$(143):locate i,2:? chr$(207):locate i,23:? chr$(143):locate i,24:? chr$(207):next i:PX=20:PY=2:f=0:s=1:if sc>=schi then schi=sc

11 for i=1 to 23:locate 1,i:?chr$(143):locate 40,i:?chr$(143):next i:locate 20,1:?"  ":locate 20,2:?"  ":locate 20,24:?"  ":locate 20,23:?"  ":locate 17,12:?"BAD DOC":Call&BB06:locate 17,12:?"       ":sc=0:locate 1,1:?"SCORE 0":locate 1,24:?"HISCORE";schi


45 if M=0 then MY=(INKEY(0)=0 AND y>3)-(INKEY(2)=0 AND y<22):IF MY<>0 THEN FRAME:LOCATE x,y:PRINT " ":y=y+My:TE=(INKEY(47)=0):IF (TE<>0 AND F=0) THEN F=1:DX=0:XF=x:yF=Y:D=MY:pen 1:locate 6,1:? sc

50 if MY=0 then M =(INKEY(8)=0 AND x>2)-(INKEY(1)=0 AND x<39): IF M<>0 THEN FRAME:LOCATE x,y:PRINT" ":x=x+M:TEM=(INKEY(47)=0):IF (TEM<>0 AND F=0) THEN f=1:D=0:xf=x:yf=y:DX=M:pen 1:locate 6,1:? sc

52 if (x=PX and y=PY) then SOUND 1,0,50,15,,,31:cls:z=0:goto 10 else if (x=PX-1 and y=PY-1) then SOUND 1,0,50,15,,,31:cls:z=0:goto 10 else if (x=PX+1 and y=PY+1) then SOUND 1,0,50,15,,,31:cls:z=0:goto 10

55 pen 1:LOCATE x,y:PRINT CHR$(SY):T=T+1:IF t=1 THEN SY=249 ELSE IF t=2 THEN SY=250 ELSE IF t=3 THEN SY=249 ELSE IF t=4 THEN SY=251 ELSE IF t>4 THEN t=0

57 if (g=2 or z=1) then pen 2:SOUND 1,700,1:locate PX,PY:print " ":if (PY<y) then PY=PY+s:locate PX,PY:print Chr$(sz) else if (PY>=Y) then PY=PY-s:locate PX,PY:print Chr$(sz)

58 if (g=1 or z=1) then pen 2:SOUND 1,700,1:locate PX,PY:print " ":if (PX<X) then PX=PX+s:locate PX,PY:print Chr$(sz) else if (PX>=X) then PX=PX-s:locate PX,PY:print Chr$(sz)

59 IF F THEN pen 3:LOCATE xf,yf:? " ":yF=yF+D:xf=xf+DX:locate xf,yf:? ".":IF (xf<3 OR xf>38 OR yf<4 OR yf>21) THEN f=0:D=0:DX=0:LOCATE xf,yf:? " " else if (xf=px and yf=py) then PX=20:PY=23:F=0:D=0:DX=0:z=1:LOCATE xf,yf:? " ":sc=sc+10

65 g=g+1:if (g=1 and z) then s=0:SZ=224:ink 2,4:GOTO 45 else if (g=1) then SZ=224:ink 2,4:GOTO 45 else if g=2 then SZ=225:ink 2,8:s=1:goto 45 else if g>2 then g=0:goto 45