1 'SNAYK (C)2024 LAUREN32 (4K) 10 CLEAR10 20 A=0:B=0:I=0:T=-1:LV=3:SC=0:DL=1 25 DX=-1:DY=-1'DOT 80 GOSUB1000:GOSUB700 170 QS=30:DIM Q(QS,1) 200 'BEGIN MAIN 205 CLS 0:GOSUB815:GOSUB800:GOSUB680 210 FOR I=TX TO X:SET(I,Y,1):NEXT 220 I=PEEK(135)'LOOP 230 IFI=87 AND HD<>1 AND HD<>3THENHD=1:GOTO255'W 235 IFI=65 AND HD<>2 AND HD<>4THENHD=2:GOTO255'A 240 IFI=83 AND HD<>3 AND HD<>1THENHD=3:GOTO255'S 245 IFI=68 AND HD<>4 AND HD<>2THENHD=4:GOTO255'D 247 IFI=76 THEN CLS:END'L 250 GOTO 285 255 A=(QW+1)-INT((QW+1)/QS)*QS'ENQUEUE 260 IFA=QR THEN 600'LEVEL UP 265 Q(QW,0)=X:Q(QW,1)=Y+32*HD:QW=A 285 IFHD=1 THEN Y=Y-1 ELSE IF HD=2 THEN X=X-1 ELSE IF HD=3 THEN Y=Y+1 ELSE IF HD=4 THEN X=X+1'UDPATE HEAD POS 300 A=POINT(X,Y) 305 IFA=-1 THEN335 ELSE IFA=0 THEN355 325 IFX=DX AND Y=DY THEN DX=-1:DY=-1:SC=SC+1:SOUND 210,1:GR=GR+5:T=DL:GOSUB800:GOTO355'SCORE UP 335 LV=LV-1:GOSUB 700:IF LV=0 THEN GOSUB900 ELSE SOUND 9,3'DIE 340 GOTO 200 355 SET(X,Y,1) 360 IF GR>0 THEN GR=GR-1:GOTO 220 ELSE RESET(TX,TY) 365 T=T-1:IF T=0 OR RND(150)<2 THEN GOSUB680 370 IF TD=1 THEN TY=TY-1 ELSE IF TD=2 THEN TX=TX-1 ELSE IF TD=3 THEN TY=TY+1 ELSE IF TD=4 THEN TX=TX+1 380 IFQR=QW THEN 220'Q EMPTY 400 IF NOT(Q(QR,0)=TX AND Q(QR,1)-32*INT(Q(QR,1)/32)=TY) THEN 220 410 TD=INT(Q(QR,1)/32):QR=(QR+1)-INT((QR+1)/QS)*QS'DEQUEUE 480 GOTO 220 490 END 600 DL=DL+1 620 ?@171,"LEVEL: "DL;:?@425,"PRESS ANY KEY"; 630 FOR I=100 TO 200 STEP 10:SOUND I,1:NEXT 650 EXEC44539:GOSUB 700:GOTO 200 680 IF DX>0 THEN RESET(DX,DY) 681 DX=RND(59)+2:DY=RND(27)+2:IFPOINT(DX,DY)=0THENSET(DX,DY,1)ELSEGOTO680'SUB:DOT 682 T=-1:RETURN 700 'SUB:SETUP 705 POKE 345,255:POKE 339,255:POKE 341,255:POKE 342,255 710 QW=0:QR=0:X=32:Y=15:TX=28:TY=15:GR=0:HD=4:TD=4 720 RETURN 800 ?@480,"SCORE:";SC,"LIVES:";LV;:RETURN'SUB:DRAWSCORE 815 'SUB:BORDER 820 FOR I=0TO31:?" ";:NEXT 825 FOR I=1TO14:?@I*32," ";:?@(I*32)+31," ";:NEXT 827 ?@480,"";:FOR I=0TO30:?" ";:NEXT:POKE 1535,96 830 RETURN 900 SOUND 200,5:SOUND 100,5:SOUND 50,5'SUB:GAMEOVER 910 ?@169,"YOU LOST!";:?@355,"PRESS ENTER TO PLAY AGAIN"; 920 EXEC44539 925 IF PEEK(135)<>13 THEN CLS:END 930 LV=3:SC=0 940 RETURN 1000 CLS:?@164,"LAUREN32 PRESENTS SNAYK":?@198,"MOVE: WASD QUIT: L":?@232,"PRESS SPACEBAR"'SUB:TITLE 1030 EXEC44539:IF PEEK(135)<>32 THEN 1030 1040 RETURN