10 INPUT "Enter skill level, 1-4 (1=Easy) ",k 20 h=1:sc=0:ge=7:e$=CHR$(27):DEF FNT$(x,y)=e$+"Y"+CHR$(32+x)+CHR$(31+y) 30 DATA Easy,.5,8,10,5,Medium,1,10,16,10,Hard,1.5,10,25,15,Outrageous,2.5,14,30,25 40 DATA 6,5,6,6,6,9,7,11,8,13,8,13,7,10,6,9,5,7,4,8,31,6,30,1,0,-1,1,0,0,1,-1 50 DATA 149,154,149,154,149,187,128,143 60 DIM ad[4,2],pt$[32,65],i[4,4],n[10,3] 70 FOR a=1 TO 4:READ t$[a]:FOR b=1 TO 4:READ i[a,b]:NEXT b,a:RANDOMIZE PEEK (64504!) 80 FOR a=1 TO 10:READ p,q:n[a,1]=3*p:n[a,2]=2*q:n[a,3]=2*a:NEXT a 90 FOR a=1 TO 4:READ ch[a]:NEXT a:FOR a=1 TO 4:FOR b=1 TO 2:READ ad[a,b]:NEXT b,a 100 FOR a=1 TO 5:READ q:a$[a]=CHR$(q):NEXT a:FOR a=1 TO 3:READ p:s$[a]=CHR$(p):NEXT a 110 m=i[k,1]:xc=2*i[k,2]:sd=2*i[k,3]:p=i[k,4]:PRINT e$+"f"+e$+"0" 120 PRINT e$+"E":PRINT FNT$(30,0)t$[k];FNT$(30,15)"Level";h:w=0:GOSUB 400:GOSUB 410 130 v=0:FOR a=0 TO xc+2:FOR b=0 TO sd+2:pt$[a,b]=" ":NEXT b,a 140 FOR a=1 TO 3:no=INT(xc*sd*m*n[h,a]/400):GOSUB 440:NEXT a 150 FOR a=2 TO xc STEP 2:FOR b=2 TO sd STEP 2:z=0:GOSUB 420:NEXT b,a 160 FOR a=3 TO xc-1 STEP 2:FOR b=3 TO sd-1 STEP 2:z=1:GOSUB 420:NEXT b,a 170 FOR a=2 TO sd STEP 2:pt$[1,a]=CHR$(154):pt$[xc+1,a]=CHR$(154):NEXT a 180 FOR a=2 TO xc STEP 2:pt$[a,1]=CHR$(149):pt$[a,sd+1]=CHR$(149):NEXT a 190 pt$[2,2]=" ":pt$[2,3]=" ":pt$[3,2]=" ":FOR a=1 TO xc+1 STEP 2:FOR b=1 TO sd+1 STEP 2 200 t=0:FOR c=1 TO 4:IF pt$[a+ad[c,1],b+ad[c,2]]<>" " THEN t=t+2^(4-c) 210 NEXT c:pt$[a,b]=CHR$(144+t):NEXT b,a 220 FOR a=1 TO xc+1:FOR b=1 TO sd+1:PRINT pt$[a,b];:NEXT b:PRINT:NEXT a:x=2:y=2 230 PRINT FNT$(x,y)CHR$(188):IF x=xc AND y=sd THEN h=h+1:IF h<11 THEN 120 ELSE 340 240 v=v+1:f$=INKEY$:IF INT(v/50)=v/50 THEN f$=CHR$(30) 250 IF f$="" THEN 240 ELSE f=ASC(f$):IF d>0 THEN d1=d 260 d=0:FOR a=1 TO 4:IF ch[a]=f THEN d=5-a 270 NEXT a:IF f=113 OR f=81 THEN r=143:GOTO 310 280 IF f=32 AND ge>2 THEN w=-3:GOSUB 400:i=x:j=y:GOSUB 350:GOTO 240 ELSE IF d=0 THEN 240 290 r=ASC(pt$[x+ad[d,1],y+ad[d,2]]):IF r=32 THEN 330 300 IF r=187 THEN w=1:GOSUB 400:pt$[x+ad[d,1],y+ad[d,2]]=" ":GOTO 330 310 IF r=143 THEN PRINT FNT$(30,35)"You're Dead!";e$+"e":END 320 IF r=128 AND ge>0 THEN w=-1:GOSUB 400:pt$[x+ad[d,1],y+ad[d,2]]=" ":GOTO 330 ELSE 240 330 PRINT FNT$(x,y)" ":x=x+ad[d,1]:y=y+ad[d,2]:GOTO 230 340 GOSUB 410:PRINT FNT$(30,35)"End of Skill Level";e$+"e":END 350 PRINT FNT$(i,j)" ":PRINT FNT$(x,y)CHR$(188):i=i+ad[d1,1]:j=j+ad[d1,2] 360 r=ASC(pt$[i,j]):IF r=128 THEN PRINT FNT$(i,j)" ":pt$[i,j]=" ":RETURN 370 IF r=149 OR r=154 THEN PRINT FNT$(i,j)CHR$(143):pt$[i,j]=CHR$(143):RETURN 380 IF r=32 THEN PRINT FNT$(i,j)"+":GOTO 350 390 PRINT FNT$(i,j)CHR$(128):pt$[i,j]=CHR$(128):RETURN 400 ge=ge+w:PRINT FNT$(30,60)"Gems:";ge;e$+"H":RETURN 410 IF v>0 THEN sc=sc+(ge*p)+INT(10^6/(v/m/m)):PRINT FNT$(30,75)"Score:"sc;e$+"H":RETURN 420 IF pt$[a-1,b]+pt$[a,b-1]+pt$[a+1,b]+pt$[a,b+1]<>" " THEN RETURN 430 g=INT(RND*4)+1:pt$[a+ad[g,1],b+ad[g,2]]=a$[g+z]:RETURN 440 FOR b=1 TO no:pt$[2*INT(0.5*RND*xc+1),2*INT(0.5*RND*sd+1)]=s$[a]:NEXT b:RETURN