1 hz=50 2 lft$=CHR$(1):rht$=CHR$(6):up$=CHR$(31):dwn$=CHR$(30) 30 DEFINT a-z 40 a=PEEK(64504!):RANDOMIZE(a) 50 cls$=CHR$(27)+"E"+CHR$(27)+"H" 59 GOSUB 2000 60 PRINT CHR$(27)+"0":PRINT CHR$(27)+"f":PRINT cls$ 70 DIM area(80,27) 80 a1$=CHR$(134)+STRING$(80,CHR$(138))+CHR$(140) 90 a2$=CHR$(133)+SPACE$(80)+CHR$(133) 100 a3$=CHR$(131)+STRING$(80,CHR$(138))+CHR$(137) 110 PRINT a1$:FOR i=1 TO 25:PRINT a2$:NEXT i:PRINT a3$ 120 x=INT(RND(1)*21+30):y=INT(RND(1)*6+10):GOSUB 390:PRINT CHR$(187) 130 area(x,y)=1:score=1:x1=x:y1=y:x=0:y=28:GOSUB 390:PRINT "Score = 1" 140 x=x1:y=y1:GOSUB 390:di=INT(RND(1)*4+1):GOTO 200 150 a$=INKEY$:IF a$="" THEN pg=RND(1):GOTO 200 155 ds=0 160 IF a$=lft$ THEN di=4:GOTO 280 170 IF a$=rht$ THEN di=2:GOTO 260 180 IF a$=up$ THEN di=1:GOTO 210 190 IF a$=dwn$ THEN di=3:GOTO 270 200 ON di GOTO 210,260,270,280 210 y=y-1:ds=1:IF y=1 THEN 290 220 IF area(x,y)<>0 THEN 290 230 score=score+1:IF score/25=INT(score/25) THEN GOSUB 360 235 IF sc>600 THEN hz=0 240 x1=x:y1=y:x=8:y=28:IF ds=1 THEN GOSUB 1000:GOSUB 390:PRINT USING "####";score 250 x=x1:y=y1:GOSUB 390:PRINT CHR$(187):area(x,y)=1:GOTO 150 260 x=x+1:IF x=81 THEN 290:ELSE 220 270 y=y+1:ds=1:IF y=27 THEN 290:ELSE 220 280 x=x-1:IF x=0 THEN 290:ELSE 220 290 th=1:FOR i=1 TO 11:th=1-th:GOSUB 390:PRINT CHR$(188-th):FOR j=1 TO 100:NEXT j,i 300 IF score>hs THEN hs=score:x=13:y=28:GOSUB 390:PRINT "- a new high score!" 310 x=0:y=29:GOSUB 390:PRINT"You Crashed! Another game (y/n)?" 320 a$=INKEY$:IF a$="" THEN pg=RND(1):GOTO 320 330 IF UPPER$(a$)="N" THEN x=35:GOSUB 390:PRINT "No";:PRINT CHR$(27)+"e":RUN"menu 340 IF UPPER$(a$)="Y" THEN PRINT cls$:ERASE area:GOSUB 2000:GOTO 70 350 GOTO 320 360 x1=x:y1=y 370 x=INT(RND(1)*80+1):y=INT(RND(1)*25+2):IF area(x,y)<>0 THEN 370 380 area(x,y)=1:GOSUB 390:PRINT CHR$(27)+CHR$(3):x=x1:y=y1:RETURN 390 ok=FRE(" "):PRINT CHR$(27)+"Y"+CHR$(32+y)+CHR$(32+x);:FOR w=1 TO ps:NEXT w:RETURN 1000 FOR w=1 TO ps*hz 1010 NEXT w 1020 RETURN 2000 PRINT cls$ 2010 PRINT:PRINT" KEY FOR LEFT : ";lft$;:IF ASC(lft$)=1 THEN PRINT"left arrow" ELSE PRINT 2015 PRINT 2020 PRINT" KEY FOR RIGHT: ";rht$;:IF ASC(rht$)=6 THEN PRINT "right arrow" ELSE PRINT 2025 PRINT 2030 PRINT" KEY FOR UP : ";up$;:IF ASC(up$)=31 THEN PRINT "up arrow" ELSE PRINT 2035 PRINT 2040 PRINT" KEY FOR DOWN : ";dwn$;:IF ASC(dwn$)=30 THEN PRINT "down arrow" ELSE PRINT 2050 PRINT:PRINT"Do you want to redefine keys ?"; 2060 a$=INKEY$:IF a$="" THEN GOTO 2060 2070 IF UPPER$(a$)="Y" THEN GOTO 2160 2080 IF UPPER$(a$)="N" THEN GOTO 2100 2090 GOTO 2060 2100 PRINT cls$:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT" WHAT LEVEL OF DIFFICULTY (1-9) ?" 2110 a$=INKEY$:IF a$="" THEN GOTO 2110 2120 a=VAL(a$) 2130 a=10-a 2140 ps=((a-1)*50)+1 2150 PRINT cls$:RETURN 2160 ' redefine keys 2170 PRINT cls$ 2180 PRINT:PRINT:PRINT:PRINT 2190 PRINT "Press the key for left "; 2200 a$=INKEY$:IF a$="" THEN GOTO 2200 2210 lft$=a$ 2220 PRINT:PRINT"Press the key for right"; 2230 a$=INKEY$:IF a$="" THEN GOTO 2230 2240 rht$=a$ 2250 PRINT:PRINT"Press the key for up"; 2260 a$=INKEY$:IF a$="" THEN GOTO 2260 2270 up$=a$ 2280 PRINT:PRINT"Press the key for down"; 2290 a$=INKEY$:IF a$="" THEN GOTO 2290 2300 dwn$=a$ 2310 GOTO 2000