Home » Personal collection » Acorn ADFS disks » Greaseweazled » adfs_Programs.adf » Games/SnakeV1
Games/SnakeV1
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn ADFS disks » Greaseweazled » adfs_Programs.adf |
Filename: | Games/SnakeV1 |
Read OK: | ✔ |
File size: | 0F29 bytes |
Load address: | FFFF1D00 |
Exec address: | FFFF8023 |
Duplicates
There are 5 duplicate copies of this file in the archive:
- Personal collection » Acorn ADFS disks » Electron » Programs_B.ADF » Games/SnakeV1
- Personal collection » Acorn ADFS disks » Electron » Programs.ADF » Games/SnakeV1
- Personal collection » Acorn ADFS disks » Electron » Programs_V2.ADF » Games/SnakeV1
- Personal collection » Acorn ADFS disks » Greaseweazled » adfs_Programs.adf » Games/SnakeV1
- Personal collection » Acorn hard disk » misc » misc2 » dcfprogs/Games/SnakeV1
- Personal collection » Acorn hard disk » misc » misc3 » dcfprog3/Games/SnakeV1
File contents
100REM Snazzy Snake, by David Vines. 110ON ERROR GOTO 250 120MODE6 130VDU23,1,0;0;0;0;:*FX4,1 140PROCINIT 150REPEAT 160PROCSETUP:PROCSCREEN 170REPEAT:PROCSNAKE:PROCNUMBER 180UNTIL FINISHED% OR TIME>6000 190PROCENDGAME 200UNTIL FNEND 210PROCCLEANUP:MODE6 220END 230 240REM ERROR HANDLING 250PROCCLEANUP 260REPORT:IF ERL>0 THEN PRINT" at line ";ERL 270END 280 290DEFPROCINIT 300HIGHSCORE%=0:*FX11,0 310max%=500:DIMxpos%(max%),ypos%(max%),D$(4) 320VDU 23,255,255,255,255,255,255,255,255,255 330VDU 23,235,24,60,126,219,24,24,24,0:D$(1)=CHR$(235) 340VDU 23,234,0,24,24,24,219,126,60,24:D$(3)=CHR$(234) 350VDU 23,233,8,12,6,127,6,12,8,0:D$(2)=CHR$(233) 360VDU 23,232,16,48,96,254,96,48,16,0:D$(4)=CHR$(232) 370PROCINSTRUCTIONS 380ENDPROC 400DEFPROCINSTRUCTIONS 410CLS 420PRINT''SPC(5)"SNAZZY SNAKE, By David Vines" 430PRINT''" This is a game for one player. The" 440PRINT"game represents a snake, trapped in an" 450PRINT"enclosed area, who has to keep eating" 460PRINT"in order to survive. The snake eats" 470PRINT"his food by hitting it." 480PRINT" The snake is controlled by the cursor" 490PRINT"keys. The """;D$(4);""" key turns the snake to" 500PRINT"its left, the """;D$(2);""" key turns it to" 510PRINT"its right. The snake initially has one" 520PRINT"minute to survive, but each piece of" 530PRINT"food he eats means that he can live" 540PRINT"longer. The score is the total value of" 550PRINT"food eaten by the snake." 560PRINT'''SPC(9)"PRESS ANY KEY TO START"; 570DUMMY=GET 580ENDPROC 590 600DEFPROCSETUP 610SCORE%=0:TIME=0:NX%=4:NY%=4:value%=0:Head%=2 620Length%=2:Real_Length%=2:Tail%=0:DIR%=1 630FINISHED%=FALSE:REASON$="" 640xpos%(Head%)=19:ypos%(Head%)=10:xpos%(Head%-1)=19 650 ypos%(Head%-1)=11:xpos%(Tail%)=19:ypos%(Tail%)=12 660ENDPROC 670 680DEFPROCSCREEN 690CLS:PROCTOPLINE:PRINT 700FOR I=1 TO 39:VDU255:NEXT 710FOR J=2 TO 21:VDU31,0,J,255,31,38,J,255:NEXT 720PRINTTAB(0,22);:FORI%=1 TO 39:VDU255:NEXT 730VDU 31,19,10,235,31,19,11,42,31,19,12,42 740ENDPROC 750 760DEFPROCSNAKE 770PROCTOPLINE 780I$=INKEY$(0):IF I$<>"" THEN PROCNEWDIR(I$) 790IF Length%=Real_Length% THEN PROCPOKE(xpos%(Tail%),ypos%(Tail%)," "):Tail%=Tail%+1:IF Tail%>max% THEN Tail%=0 800IF Length%>Real_Length% THEN Real_Length%=Real_Length%+1 810OHead%=Head%:Head%=Head%+1:IF Head%>max% THEN Head%=0 820IF DIR%=1 THEN PROCadd(0,-1) ELSE IF DIR%=2 THEN PROCadd(1,0) ELSE IF DIR%=3 THEN PROCadd(0,1) ELSE PROCadd(-1,0) 830A%=FNPEEK(xpos%(Head%),ypos%(Head%)) 840IF A%=255 THEN FINISHED%=TRUE:REASON$="WALL" ELSE IF A%=126 THEN FINISHED%=TRUE:REASON$="SELF" 850PROCPOKE(xpos%(OHead%),ypos%(OHead%),"*") 860PROCPOKE(xpos%(Head%),ypos%(Head%),D$(DIR%)) 870IF A%<>48 THEN ENDPROC 880FOR I%=value%-1 TO 0 STEP -1 890PROCPOKE(NX%,NY%,STR$(I%)):Length%=Length%+1 900PROCWAIT(0.05):SCORE%=SCORE%+1 910TIME=TIME-57:PROCTOPLINE 920NEXT 930value%=0 940ENDPROC 950 960DEFPROCNEWDIR(I$) 970IF I$=CHR$(&89)THENDIR%=DIR%+1:IF DIR%=5 THEN DIR%=1 980IF I$=CHR$(&88)THENDIR%=DIR%-1:IF DIR%=0 THEN DIR%=4 990ENDPROC 1000 1010DEFPROCadd(x%,y%) 1020xpos%(Head%)=xpos%(OHead%)+x%:ypos%(Head%)=ypos%(OHead%)+y% 1030ENDPROC 1040 1050DEFPROCNUMBER 1060IF value%<>0 AND RND(120)<>1 THEN ENDPROC 1070FOR I%=-1 TO 1:FOR J%=-1 TO 1 1080IF NX%+I%<>xpos%(Head%) OR NY%+J%<>ypos%(Head%) THEN PROCPOKE(NX%+I%,NY%+J%," ") 1090NEXT, 1100REPEAT 1110 NX%=RND(35)+1:NY%=RND(16)+2:valid%=TRUE 1120FOR I%=-1 TO 1:FOR J%=-1 TO 1 1130valid%=valid% AND (FNPEEK(NX%+I%,NY%+J%)=0) 1140NEXT, 1150UNTIL valid% OR TIME>6000 1160IF TIME>6000 THEN ENDPROC 1170value%=RND(9) 1180FOR I%=-1 TO 1:FOR J%=-1 TO 1 1190PROCPOKE(NX%+I%,NY%+J%,"`") 1200NEXT, 1210PROCPOKE(NX%,NY%,STR$(value%)) 1220ENDPROC 1230 1240DEFPROCENDGAME 1250VDU28,4,17,36,8:CLS 1260PRINTTAB(10,3);" GAME OVER " 1270IF REASON$="WALL" THEN PRINTTAB(0,1);" YOU'VE HIT A SIDE - OH DEAR ! " 1280 IF REASON$="SELF" THEN PRINTTAB(0,1);" YOU'VE HIT YOURSELF - A BAD MOVE " 1290IF TIME>6000 THEN PRINTTAB(11,1);" TIME UP " 1300PROCWAIT(1):IF SCORE%>HIGHSCORE% THEN HIGHSCORE%=SCORE% 1310ENDPROC 1320 1330DEF FNEND:LOCAL B$ 1340PRINTTAB(0,6);" ANOTHER GAME? (PRESS 'Y' OR 'N') " 1350PRINTTAB(0,8);" (PRESS 'I' FOR INSTRUTIONS) ":VDU 26 1360REPEAT 1370B$=GET$ 1380IF B$="I" OR B$="i" THEN PROCINSTRUCTIONS:B$="Y" 1390UNTIL INSTR("YyNn",B$) 1400=B$="N" OR B$="n" 1420DEFPROCTOPLINE 1430PRINTTAB(0,1);"SCORE= ";SCORE%;" TIME= "; 1440@%=&20205:PRINT;60-TIME/100;:@%=10 1450PRINT" HIGH SCORE=";HIGHSCORE%;" "; 1460 ENDPROC 1470 1480DEF FNPEEK(X%,Y%)=?(HIMEM+Y%*320+X%*8+2) 1490 1500DEFPROCPOKE(X%,Y%,X$) 1510VDU31,X%,Y%,ASC(X$) 1520ENDPROC 1530 1540DEFPROCWAIT(T):LOCAL oldtime 1550oldtime=TIME 1560REPEAT UNTIL TIME-oldtime>T*100 1570ENDPROC 1580 1590DEFPROCCLEANUP 1600*FX 12,0 1610*FX4,0 1620@%=10 1630ENDPROC
d#� Snazzy Snake, by David Vines. n� � � �dz@ x�6 ��23,1,0;0;0;0;:*FX4,1 � �INIT �� ��SETUP:�SCREEN ��:�SNAKE:�NUMBER �� FINISHED% � �>6000 ��ENDGAME � � �END ��CLEANUP:�6 �� � �� ERROR HANDLING ��CLEANUP �:� �>0 � �" at line ";� � " ��INIT ,HIGHSCORE%=0:*FX11,0 6+max%=500:�xpos%(max%),ypos%(max%),D$(4) @,� 23,255,255,255,255,255,255,255,255,255 J2� 23,235,24,60,126,219,24,24,24,0:D$(1)=�(235) T2� 23,234,0,24,24,24,219,126,60,24:D$(3)=�(234) ^-� 23,233,8,12,6,127,6,12,8,0:D$(2)=�(233) h1� 23,232,16,48,96,254,96,48,16,0:D$(4)=�(232) r�INSTRUCTIONS |� ���INSTRUCTIONS �� �+�''�(5)"SNAZZY SNAKE, By David Vines" �-�''" This is a game for one player. The" �-�"game represents a snake, trapped in an" �,�"enclosed area, who has to keep eating" �*�"in order to survive. The snake eats" ��"his food by hitting it." �.�" The snake is controlled by the cursor" �5�"keys. The """;D$(4);""" key turns the snake to" �2�"its left, the """;D$(2);""" key turns it to" �-�"its right. The snake initially has one" +�"minute to survive, but each piece of" *�"food he eats means that he can live" .�"longer. The score is the total value of" &�"food eaten by the snake." 0%�'''�(9)"PRESS ANY KEY TO START"; :DUMMY=� D� N X��SETUP b-SCORE%=0:�=0:NX%=4:NY%=4:value%=0:Head%=2 l+Length%=2:Real_Length%=2:Tail%=0:DIR%=1 vFINISHED%=�:REASON$="" �5xpos%(Head%)=19:ypos%(Head%)=10:xpos%(Head%-1)=19 �6 ypos%(Head%-1)=11:xpos%(Tail%)=19:ypos%(Tail%)=12 �� � ���SCREEN ��:�TOPLINE:� �� I=1 � 39:�255:� �(� J=2 � 21:�31,0,J,255,31,38,J,255:� ��0,22);:�I%=1 � 39:�255:� �*� 31,19,10,235,31,19,11,42,31,19,12,42 �� � ���SNAKE �TOPLINE "I$=�(0):� I$<>"" � �NEWDIR(I$) f� Length%=Real_Length% � �POKE(xpos%(Tail%),ypos%(Tail%)," "):Tail%=Tail%+1:� Tail%>max% � Tail%=0 8� Length%>Real_Length% � Real_Length%=Real_Length%+1 *5OHead%=Head%:Head%=Head%+1:� Head%>max% � Head%=0 4T� DIR%=1 � �add(0,-1) � � DIR%=2 � �add(1,0) � � DIR%=3 � �add(0,1) � �add(-1,0) >'A%=�PEEK(xpos%(Head%),ypos%(Head%)) HQ� A%=255 � FINISHED%=�:REASON$="WALL" � � A%=126 � FINISHED%=�:REASON$="SELF" R*�POKE(xpos%(OHead%),ypos%(OHead%),"*") \-�POKE(xpos%(Head%),ypos%(Head%),D$(DIR%)) f� A%<>48 � � p� I%=value%-1 � 0 � -1 z*�POKE(NX%,NY%,�(I%)):Length%=Length%+1 ��WAIT(0.05):SCORE%=SCORE%+1 ��=�-57:�TOPLINE �� �value%=0 �� � ���NEWDIR(I$) �-� I$=�(&89)�DIR%=DIR%+1:� DIR%=5 � DIR%=1 �-� I$=�(&88)�DIR%=DIR%-1:� DIR%=0 � DIR%=4 �� � ���add(x%,y%) �?xpos%(Head%)=xpos%(OHead%)+x%:ypos%(Head%)=ypos%(OHead%)+y% � ��NUMBER $� value%<>0 � �(120)<>1 � � .� I%=-1 � 1:� J%=-1 � 1 8L� NX%+I%<>xpos%(Head%) � NY%+J%<>ypos%(Head%) � �POKE(NX%+I%,NY%+J%," ") B�, L� V% NX%=�(35)+1:NY%=�(16)+2:valid%=� `� I%=-1 � 1:� J%=-1 � 1 j,valid%=valid% � (�PEEK(NX%+I%,NY%+J%)=0) t�, ~� valid% � �>6000 �� �>6000 � � �value%=�(9) �� I%=-1 � 1:� J%=-1 � 1 ��POKE(NX%+I%,NY%+J%,"`") ��, ��POKE(NX%,NY%,�(value%)) �� � � ��ENDGAME ��28,4,17,36,8:� ��10,3);" GAME OVER " �?� REASON$="WALL" � �0,1);" YOU'VE HIT A SIDE - OH DEAR ! " C � REASON$="SELF" � �0,1);" YOU'VE HIT YOURSELF - A BAD MOVE " "� �>6000 � �11,1);" TIME UP " 4�WAIT(1):� SCORE%>HIGHSCORE% � HIGHSCORE%=SCORE% � ( 2� �END:� B$ </�0,6);" ANOTHER GAME? (PRESS 'Y' OR 'N') " F/�0,8);" (PRESS 'I' FOR INSTRUTIONS) ":� 26 P� ZB$=� d,� B$="I" � B$="i" � �INSTRUCTIONS:B$="Y" n� �"YyNn",B$) x=B$="N" � B$="n" � ��TOPLINE �&�0,1);"SCORE= ";SCORE%;" TIME= "; �@%=&20205:�;60-�/100;:@%=10 �#�" HIGH SCORE=";HIGHSCORE%;" "; � � � �%� �PEEK(X%,Y%)=?(�+Y%*320+X%*8+2) � ���POKE(X%,Y%,X$) ��31,X%,Y%,�(X$) �� � ��WAIT(T):� oldtime oldtime=� � � �-oldtime>T*100 "� , 6 ��CLEANUP @*FX 12,0 J *FX4,0 T @%=10 ^� �
00000000 0d 00 64 23 f4 20 53 6e 61 7a 7a 79 20 53 6e 61 |..d#. Snazzy Sna| 00000010 6b 65 2c 20 62 79 20 44 61 76 69 64 20 56 69 6e |ke, by David Vin| 00000020 65 73 2e 0d 00 6e 0e ee 20 85 20 e5 20 8d 64 7a |es...n.. . . .dz| 00000030 40 0d 00 78 06 eb 36 0d 00 82 19 ef 32 33 2c 31 |@..x..6.....23,1| 00000040 2c 30 3b 30 3b 30 3b 30 3b 3a 2a 46 58 34 2c 31 |,0;0;0;0;:*FX4,1| 00000050 0d 00 8c 09 f2 49 4e 49 54 0d 00 96 05 f5 0d 00 |.....INIT.......| 00000060 a0 12 f2 53 45 54 55 50 3a f2 53 43 52 45 45 4e |...SETUP:.SCREEN| 00000070 0d 00 aa 14 f5 3a f2 53 4e 41 4b 45 3a f2 4e 55 |.....:.SNAKE:.NU| 00000080 4d 42 45 52 0d 00 b4 18 fd 20 46 49 4e 49 53 48 |MBER..... FINISH| 00000090 45 44 25 20 84 20 91 3e 36 30 30 30 0d 00 be 0c |ED% . .>6000....| 000000a0 f2 45 4e 44 47 41 4d 45 0d 00 c8 0a fd 20 a4 45 |.ENDGAME..... .E| 000000b0 4e 44 0d 00 d2 0f f2 43 4c 45 41 4e 55 50 3a eb |ND.....CLEANUP:.| 000000c0 36 0d 00 dc 05 e0 0d 00 e6 05 20 0d 00 f0 14 f4 |6......... .....| 000000d0 20 45 52 52 4f 52 20 48 41 4e 44 4c 49 4e 47 0d | ERROR HANDLING.| 000000e0 00 fa 0c f2 43 4c 45 41 4e 55 50 0d 01 04 1c f6 |....CLEANUP.....| 000000f0 3a e7 20 9e 3e 30 20 8c 20 f1 22 20 61 74 20 6c |:. .>0 . ." at l| 00000100 69 6e 65 20 22 3b 9e 0d 01 0e 05 e0 0d 01 18 05 |ine ";..........| 00000110 20 0d 01 22 0a dd f2 49 4e 49 54 0d 01 2c 18 48 | .."...INIT..,.H| 00000120 49 47 48 53 43 4f 52 45 25 3d 30 3a 2a 46 58 31 |IGHSCORE%=0:*FX1| 00000130 31 2c 30 0d 01 36 2b 6d 61 78 25 3d 35 30 30 3a |1,0..6+max%=500:| 00000140 de 78 70 6f 73 25 28 6d 61 78 25 29 2c 79 70 6f |.xpos%(max%),ypo| 00000150 73 25 28 6d 61 78 25 29 2c 44 24 28 34 29 0d 01 |s%(max%),D$(4)..| 00000160 40 2c ef 20 32 33 2c 32 35 35 2c 32 35 35 2c 32 |@,. 23,255,255,2| 00000170 35 35 2c 32 35 35 2c 32 35 35 2c 32 35 35 2c 32 |55,255,255,255,2| 00000180 35 35 2c 32 35 35 2c 32 35 35 0d 01 4a 32 ef 20 |55,255,255..J2. | 00000190 32 33 2c 32 33 35 2c 32 34 2c 36 30 2c 31 32 36 |23,235,24,60,126| 000001a0 2c 32 31 39 2c 32 34 2c 32 34 2c 32 34 2c 30 3a |,219,24,24,24,0:| 000001b0 44 24 28 31 29 3d bd 28 32 33 35 29 0d 01 54 32 |D$(1)=.(235)..T2| 000001c0 ef 20 32 33 2c 32 33 34 2c 30 2c 32 34 2c 32 34 |. 23,234,0,24,24| 000001d0 2c 32 34 2c 32 31 39 2c 31 32 36 2c 36 30 2c 32 |,24,219,126,60,2| 000001e0 34 3a 44 24 28 33 29 3d bd 28 32 33 34 29 0d 01 |4:D$(3)=.(234)..| 000001f0 5e 2d ef 20 32 33 2c 32 33 33 2c 38 2c 31 32 2c |^-. 23,233,8,12,| 00000200 36 2c 31 32 37 2c 36 2c 31 32 2c 38 2c 30 3a 44 |6,127,6,12,8,0:D| 00000210 24 28 32 29 3d bd 28 32 33 33 29 0d 01 68 31 ef |$(2)=.(233)..h1.| 00000220 20 32 33 2c 32 33 32 2c 31 36 2c 34 38 2c 39 36 | 23,232,16,48,96| 00000230 2c 32 35 34 2c 39 36 2c 34 38 2c 31 36 2c 30 3a |,254,96,48,16,0:| 00000240 44 24 28 34 29 3d bd 28 32 33 32 29 0d 01 72 11 |D$(4)=.(232)..r.| 00000250 f2 49 4e 53 54 52 55 43 54 49 4f 4e 53 0d 01 7c |.INSTRUCTIONS..|| 00000260 05 e1 0d 01 90 12 dd f2 49 4e 53 54 52 55 43 54 |........INSTRUCT| 00000270 49 4f 4e 53 0d 01 9a 05 db 0d 01 a4 2b f1 27 27 |IONS........+.''| 00000280 89 28 35 29 22 53 4e 41 5a 5a 59 20 53 4e 41 4b |.(5)"SNAZZY SNAK| 00000290 45 2c 20 20 20 42 79 20 44 61 76 69 64 20 56 69 |E, By David Vi| 000002a0 6e 65 73 22 0d 01 ae 2d f1 27 27 22 20 20 54 68 |nes"...-.''" Th| 000002b0 69 73 20 69 73 20 61 20 67 61 6d 65 20 66 6f 72 |is is a game for| 000002c0 20 6f 6e 65 20 70 6c 61 79 65 72 2e 20 54 68 65 | one player. The| 000002d0 22 0d 01 b8 2d f1 22 67 61 6d 65 20 72 65 70 72 |"...-."game repr| 000002e0 65 73 65 6e 74 73 20 61 20 73 6e 61 6b 65 2c 20 |esents a snake, | 000002f0 74 72 61 70 70 65 64 20 69 6e 20 61 6e 22 0d 01 |trapped in an"..| 00000300 c2 2c f1 22 65 6e 63 6c 6f 73 65 64 20 61 72 65 |.,."enclosed are| 00000310 61 2c 20 77 68 6f 20 68 61 73 20 74 6f 20 6b 65 |a, who has to ke| 00000320 65 70 20 65 61 74 69 6e 67 22 0d 01 cc 2a f1 22 |ep eating"...*."| 00000330 69 6e 20 6f 72 64 65 72 20 74 6f 20 73 75 72 76 |in order to surv| 00000340 69 76 65 2e 20 54 68 65 20 73 6e 61 6b 65 20 65 |ive. The snake e| 00000350 61 74 73 22 0d 01 d6 1e f1 22 68 69 73 20 66 6f |ats"....."his fo| 00000360 6f 64 20 62 79 20 68 69 74 74 69 6e 67 20 69 74 |od by hitting it| 00000370 2e 22 0d 01 e0 2e f1 22 20 20 54 68 65 20 73 6e |."....." The sn| 00000380 61 6b 65 20 69 73 20 63 6f 6e 74 72 6f 6c 6c 65 |ake is controlle| 00000390 64 20 62 79 20 74 68 65 20 63 75 72 73 6f 72 22 |d by the cursor"| 000003a0 0d 01 ea 35 f1 22 6b 65 79 73 2e 20 54 68 65 20 |...5."keys. The | 000003b0 22 22 22 3b 44 24 28 34 29 3b 22 22 22 20 6b 65 |""";D$(4);""" ke| 000003c0 79 20 74 75 72 6e 73 20 74 68 65 20 73 6e 61 6b |y turns the snak| 000003d0 65 20 74 6f 22 0d 01 f4 32 f1 22 69 74 73 20 6c |e to"...2."its l| 000003e0 65 66 74 2c 20 74 68 65 20 22 22 22 3b 44 24 28 |eft, the """;D$(| 000003f0 32 29 3b 22 22 22 20 6b 65 79 20 74 75 72 6e 73 |2);""" key turns| 00000400 20 69 74 20 74 6f 22 0d 01 fe 2d f1 22 69 74 73 | it to"...-."its| 00000410 20 72 69 67 68 74 2e 20 54 68 65 20 73 6e 61 6b | right. The snak| 00000420 65 20 69 6e 69 74 69 61 6c 6c 79 20 68 61 73 20 |e initially has | 00000430 6f 6e 65 22 0d 02 08 2b f1 22 6d 69 6e 75 74 65 |one"...+."minute| 00000440 20 74 6f 20 73 75 72 76 69 76 65 2c 20 62 75 74 | to survive, but| 00000450 20 65 61 63 68 20 70 69 65 63 65 20 6f 66 22 0d | each piece of".| 00000460 02 12 2a f1 22 66 6f 6f 64 20 68 65 20 65 61 74 |..*."food he eat| 00000470 73 20 6d 65 61 6e 73 20 74 68 61 74 20 68 65 20 |s means that he | 00000480 63 61 6e 20 6c 69 76 65 22 0d 02 1c 2e f1 22 6c |can live"....."l| 00000490 6f 6e 67 65 72 2e 20 54 68 65 20 73 63 6f 72 65 |onger. The score| 000004a0 20 69 73 20 74 68 65 20 74 6f 74 61 6c 20 76 61 | is the total va| 000004b0 6c 75 65 20 6f 66 22 0d 02 26 1f f1 22 66 6f 6f |lue of"..&.."foo| 000004c0 64 20 65 61 74 65 6e 20 62 79 20 74 68 65 20 73 |d eaten by the s| 000004d0 6e 61 6b 65 2e 22 0d 02 30 25 f1 27 27 27 89 28 |nake."..0%.'''.(| 000004e0 39 29 22 50 52 45 53 53 20 41 4e 59 20 4b 45 59 |9)"PRESS ANY KEY| 000004f0 20 54 4f 20 53 54 41 52 54 22 3b 0d 02 3a 0b 44 | TO START";..:.D| 00000500 55 4d 4d 59 3d a5 0d 02 44 05 e1 0d 02 4e 05 20 |UMMY=...D....N. | 00000510 0d 02 58 0b dd f2 53 45 54 55 50 0d 02 62 2d 53 |..X...SETUP..b-S| 00000520 43 4f 52 45 25 3d 30 3a d1 3d 30 3a 4e 58 25 3d |CORE%=0:.=0:NX%=| 00000530 34 3a 4e 59 25 3d 34 3a 76 61 6c 75 65 25 3d 30 |4:NY%=4:value%=0| 00000540 3a 48 65 61 64 25 3d 32 0d 02 6c 2b 4c 65 6e 67 |:Head%=2..l+Leng| 00000550 74 68 25 3d 32 3a 52 65 61 6c 5f 4c 65 6e 67 74 |th%=2:Real_Lengt| 00000560 68 25 3d 32 3a 54 61 69 6c 25 3d 30 3a 44 49 52 |h%=2:Tail%=0:DIR| 00000570 25 3d 31 0d 02 76 1a 46 49 4e 49 53 48 45 44 25 |%=1..v.FINISHED%| 00000580 3d a3 3a 52 45 41 53 4f 4e 24 3d 22 22 0d 02 80 |=.:REASON$=""...| 00000590 35 78 70 6f 73 25 28 48 65 61 64 25 29 3d 31 39 |5xpos%(Head%)=19| 000005a0 3a 79 70 6f 73 25 28 48 65 61 64 25 29 3d 31 30 |:ypos%(Head%)=10| 000005b0 3a 78 70 6f 73 25 28 48 65 61 64 25 2d 31 29 3d |:xpos%(Head%-1)=| 000005c0 31 39 0d 02 8a 36 20 79 70 6f 73 25 28 48 65 61 |19...6 ypos%(Hea| 000005d0 64 25 2d 31 29 3d 31 31 3a 78 70 6f 73 25 28 54 |d%-1)=11:xpos%(T| 000005e0 61 69 6c 25 29 3d 31 39 3a 79 70 6f 73 25 28 54 |ail%)=19:ypos%(T| 000005f0 61 69 6c 25 29 3d 31 32 0d 02 94 05 e1 0d 02 9e |ail%)=12........| 00000600 05 20 0d 02 a8 0c dd f2 53 43 52 45 45 4e 0d 02 |. ......SCREEN..| 00000610 b2 10 db 3a f2 54 4f 50 4c 49 4e 45 3a f1 0d 02 |...:.TOPLINE:...| 00000620 bc 15 e3 20 49 3d 31 20 b8 20 33 39 3a ef 32 35 |... I=1 . 39:.25| 00000630 35 3a ed 0d 02 c6 28 e3 20 4a 3d 32 20 b8 20 32 |5:....(. J=2 . 2| 00000640 31 3a ef 33 31 2c 30 2c 4a 2c 32 35 35 2c 33 31 |1:.31,0,J,255,31| 00000650 2c 33 38 2c 4a 2c 32 35 35 3a ed 0d 02 d0 1e f1 |,38,J,255:......| 00000660 8a 30 2c 32 32 29 3b 3a e3 49 25 3d 31 20 b8 20 |.0,22);:.I%=1 . | 00000670 33 39 3a ef 32 35 35 3a ed 0d 02 da 2a ef 20 33 |39:.255:....*. 3| 00000680 31 2c 31 39 2c 31 30 2c 32 33 35 2c 33 31 2c 31 |1,19,10,235,31,1| 00000690 39 2c 31 31 2c 34 32 2c 33 31 2c 31 39 2c 31 32 |9,11,42,31,19,12| 000006a0 2c 34 32 0d 02 e4 05 e1 0d 02 ee 05 20 0d 02 f8 |,42......... ...| 000006b0 0b dd f2 53 4e 41 4b 45 0d 03 02 0c f2 54 4f 50 |...SNAKE.....TOP| 000006c0 4c 49 4e 45 0d 03 0c 22 49 24 3d bf 28 30 29 3a |LINE..."I$=.(0):| 000006d0 e7 20 49 24 3c 3e 22 22 20 8c 20 f2 4e 45 57 44 |. I$<>"" . .NEWD| 000006e0 49 52 28 49 24 29 0d 03 16 66 e7 20 4c 65 6e 67 |IR(I$)...f. Leng| 000006f0 74 68 25 3d 52 65 61 6c 5f 4c 65 6e 67 74 68 25 |th%=Real_Length%| 00000700 20 8c 20 f2 50 4f 4b 45 28 78 70 6f 73 25 28 54 | . .POKE(xpos%(T| 00000710 61 69 6c 25 29 2c 79 70 6f 73 25 28 54 61 69 6c |ail%),ypos%(Tail| 00000720 25 29 2c 22 20 22 29 3a 54 61 69 6c 25 3d 54 61 |%)," "):Tail%=Ta| 00000730 69 6c 25 2b 31 3a e7 20 54 61 69 6c 25 3e 6d 61 |il%+1:. Tail%>ma| 00000740 78 25 20 8c 20 54 61 69 6c 25 3d 30 0d 03 20 38 |x% . Tail%=0.. 8| 00000750 e7 20 4c 65 6e 67 74 68 25 3e 52 65 61 6c 5f 4c |. Length%>Real_L| 00000760 65 6e 67 74 68 25 20 8c 20 52 65 61 6c 5f 4c 65 |ength% . Real_Le| 00000770 6e 67 74 68 25 3d 52 65 61 6c 5f 4c 65 6e 67 74 |ngth%=Real_Lengt| 00000780 68 25 2b 31 0d 03 2a 35 4f 48 65 61 64 25 3d 48 |h%+1..*5OHead%=H| 00000790 65 61 64 25 3a 48 65 61 64 25 3d 48 65 61 64 25 |ead%:Head%=Head%| 000007a0 2b 31 3a e7 20 48 65 61 64 25 3e 6d 61 78 25 20 |+1:. Head%>max% | 000007b0 8c 20 48 65 61 64 25 3d 30 0d 03 34 54 e7 20 44 |. Head%=0..4T. D| 000007c0 49 52 25 3d 31 20 8c 20 f2 61 64 64 28 30 2c 2d |IR%=1 . .add(0,-| 000007d0 31 29 20 8b 20 e7 20 44 49 52 25 3d 32 20 8c 20 |1) . . DIR%=2 . | 000007e0 f2 61 64 64 28 31 2c 30 29 20 8b 20 e7 20 44 49 |.add(1,0) . . DI| 000007f0 52 25 3d 33 20 8c 20 f2 61 64 64 28 30 2c 31 29 |R%=3 . .add(0,1)| 00000800 20 8b 20 f2 61 64 64 28 2d 31 2c 30 29 0d 03 3e | . .add(-1,0)..>| 00000810 27 41 25 3d a4 50 45 45 4b 28 78 70 6f 73 25 28 |'A%=.PEEK(xpos%(| 00000820 48 65 61 64 25 29 2c 79 70 6f 73 25 28 48 65 61 |Head%),ypos%(Hea| 00000830 64 25 29 29 0d 03 48 51 e7 20 41 25 3d 32 35 35 |d%))..HQ. A%=255| 00000840 20 8c 20 46 49 4e 49 53 48 45 44 25 3d b9 3a 52 | . FINISHED%=.:R| 00000850 45 41 53 4f 4e 24 3d 22 57 41 4c 4c 22 20 8b 20 |EASON$="WALL" . | 00000860 e7 20 41 25 3d 31 32 36 20 8c 20 46 49 4e 49 53 |. A%=126 . FINIS| 00000870 48 45 44 25 3d b9 3a 52 45 41 53 4f 4e 24 3d 22 |HED%=.:REASON$="| 00000880 53 45 4c 46 22 0d 03 52 2a f2 50 4f 4b 45 28 78 |SELF"..R*.POKE(x| 00000890 70 6f 73 25 28 4f 48 65 61 64 25 29 2c 79 70 6f |pos%(OHead%),ypo| 000008a0 73 25 28 4f 48 65 61 64 25 29 2c 22 2a 22 29 0d |s%(OHead%),"*").| 000008b0 03 5c 2d f2 50 4f 4b 45 28 78 70 6f 73 25 28 48 |.\-.POKE(xpos%(H| 000008c0 65 61 64 25 29 2c 79 70 6f 73 25 28 48 65 61 64 |ead%),ypos%(Head| 000008d0 25 29 2c 44 24 28 44 49 52 25 29 29 0d 03 66 10 |%),D$(DIR%))..f.| 000008e0 e7 20 41 25 3c 3e 34 38 20 8c 20 e1 0d 03 70 1a |. A%<>48 . ...p.| 000008f0 e3 20 49 25 3d 76 61 6c 75 65 25 2d 31 20 b8 20 |. I%=value%-1 . | 00000900 30 20 88 20 2d 31 0d 03 7a 2a f2 50 4f 4b 45 28 |0 . -1..z*.POKE(| 00000910 4e 58 25 2c 4e 59 25 2c c3 28 49 25 29 29 3a 4c |NX%,NY%,.(I%)):L| 00000920 65 6e 67 74 68 25 3d 4c 65 6e 67 74 68 25 2b 31 |ength%=Length%+1| 00000930 0d 03 84 1f f2 57 41 49 54 28 30 2e 30 35 29 3a |.....WAIT(0.05):| 00000940 53 43 4f 52 45 25 3d 53 43 4f 52 45 25 2b 31 0d |SCORE%=SCORE%+1.| 00000950 03 8e 13 d1 3d 91 2d 35 37 3a f2 54 4f 50 4c 49 |....=.-57:.TOPLI| 00000960 4e 45 0d 03 98 05 ed 0d 03 a2 0c 76 61 6c 75 65 |NE.........value| 00000970 25 3d 30 0d 03 ac 05 e1 0d 03 b6 05 20 0d 03 c0 |%=0......... ...| 00000980 10 dd f2 4e 45 57 44 49 52 28 49 24 29 0d 03 ca |...NEWDIR(I$)...| 00000990 2d e7 20 49 24 3d bd 28 26 38 39 29 8c 44 49 52 |-. I$=.(&89).DIR| 000009a0 25 3d 44 49 52 25 2b 31 3a e7 20 44 49 52 25 3d |%=DIR%+1:. DIR%=| 000009b0 35 20 8c 20 44 49 52 25 3d 31 0d 03 d4 2d e7 20 |5 . DIR%=1...-. | 000009c0 49 24 3d bd 28 26 38 38 29 8c 44 49 52 25 3d 44 |I$=.(&88).DIR%=D| 000009d0 49 52 25 2d 31 3a e7 20 44 49 52 25 3d 30 20 8c |IR%-1:. DIR%=0 .| 000009e0 20 44 49 52 25 3d 34 0d 03 de 05 e1 0d 03 e8 05 | DIR%=4.........| 000009f0 20 0d 03 f2 10 dd f2 61 64 64 28 78 25 2c 79 25 | ......add(x%,y%| 00000a00 29 0d 03 fc 3f 78 70 6f 73 25 28 48 65 61 64 25 |)...?xpos%(Head%| 00000a10 29 3d 78 70 6f 73 25 28 4f 48 65 61 64 25 29 2b |)=xpos%(OHead%)+| 00000a20 78 25 3a 79 70 6f 73 25 28 48 65 61 64 25 29 3d |x%:ypos%(Head%)=| 00000a30 79 70 6f 73 25 28 4f 48 65 61 64 25 29 2b 79 25 |ypos%(OHead%)+y%| 00000a40 0d 04 06 05 e1 0d 04 10 05 20 0d 04 1a 0c dd f2 |......... ......| 00000a50 4e 55 4d 42 45 52 0d 04 24 1f e7 20 76 61 6c 75 |NUMBER..$.. valu| 00000a60 65 25 3c 3e 30 20 80 20 b3 28 31 32 30 29 3c 3e |e%<>0 . .(120)<>| 00000a70 31 20 8c 20 e1 0d 04 2e 1b e3 20 49 25 3d 2d 31 |1 . ...... I%=-1| 00000a80 20 b8 20 31 3a e3 20 4a 25 3d 2d 31 20 b8 20 31 | . 1:. J%=-1 . 1| 00000a90 0d 04 38 4c e7 20 4e 58 25 2b 49 25 3c 3e 78 70 |..8L. NX%+I%<>xp| 00000aa0 6f 73 25 28 48 65 61 64 25 29 20 84 20 4e 59 25 |os%(Head%) . NY%| 00000ab0 2b 4a 25 3c 3e 79 70 6f 73 25 28 48 65 61 64 25 |+J%<>ypos%(Head%| 00000ac0 29 20 8c 20 f2 50 4f 4b 45 28 4e 58 25 2b 49 25 |) . .POKE(NX%+I%| 00000ad0 2c 4e 59 25 2b 4a 25 2c 22 20 22 29 0d 04 42 06 |,NY%+J%," ")..B.| 00000ae0 ed 2c 0d 04 4c 05 f5 0d 04 56 25 20 4e 58 25 3d |.,..L....V% NX%=| 00000af0 b3 28 33 35 29 2b 31 3a 4e 59 25 3d b3 28 31 36 |.(35)+1:NY%=.(16| 00000b00 29 2b 32 3a 76 61 6c 69 64 25 3d b9 0d 04 60 1b |)+2:valid%=...`.| 00000b10 e3 20 49 25 3d 2d 31 20 b8 20 31 3a e3 20 4a 25 |. I%=-1 . 1:. J%| 00000b20 3d 2d 31 20 b8 20 31 0d 04 6a 2c 76 61 6c 69 64 |=-1 . 1..j,valid| 00000b30 25 3d 76 61 6c 69 64 25 20 80 20 28 a4 50 45 45 |%=valid% . (.PEE| 00000b40 4b 28 4e 58 25 2b 49 25 2c 4e 59 25 2b 4a 25 29 |K(NX%+I%,NY%+J%)| 00000b50 3d 30 29 0d 04 74 06 ed 2c 0d 04 7e 15 fd 20 76 |=0)..t..,..~.. v| 00000b60 61 6c 69 64 25 20 84 20 91 3e 36 30 30 30 0d 04 |alid% . .>6000..| 00000b70 88 10 e7 20 91 3e 36 30 30 30 20 8c 20 e1 0d 04 |... .>6000 . ...| 00000b80 92 0f 76 61 6c 75 65 25 3d b3 28 39 29 0d 04 9c |..value%=.(9)...| 00000b90 1b e3 20 49 25 3d 2d 31 20 b8 20 31 3a e3 20 4a |.. I%=-1 . 1:. J| 00000ba0 25 3d 2d 31 20 b8 20 31 0d 04 a6 1c f2 50 4f 4b |%=-1 . 1.....POK| 00000bb0 45 28 4e 58 25 2b 49 25 2c 4e 59 25 2b 4a 25 2c |E(NX%+I%,NY%+J%,| 00000bc0 22 60 22 29 0d 04 b0 06 ed 2c 0d 04 ba 1c f2 50 |"`").....,.....P| 00000bd0 4f 4b 45 28 4e 58 25 2c 4e 59 25 2c c3 28 76 61 |OKE(NX%,NY%,.(va| 00000be0 6c 75 65 25 29 29 0d 04 c4 05 e1 0d 04 ce 05 20 |lue%))......... | 00000bf0 0d 04 d8 0d dd f2 45 4e 44 47 41 4d 45 0d 04 e2 |......ENDGAME...| 00000c00 13 ef 32 38 2c 34 2c 31 37 2c 33 36 2c 38 3a db |..28,4,17,36,8:.| 00000c10 0d 04 ec 19 f1 8a 31 30 2c 33 29 3b 22 20 47 41 |......10,3);" GA| 00000c20 4d 45 20 4f 56 45 52 20 22 0d 04 f6 3f e7 20 52 |ME OVER "...?. R| 00000c30 45 41 53 4f 4e 24 3d 22 57 41 4c 4c 22 20 8c 20 |EASON$="WALL" . | 00000c40 f1 8a 30 2c 31 29 3b 22 20 59 4f 55 27 56 45 20 |..0,1);" YOU'VE | 00000c50 48 49 54 20 41 20 53 49 44 45 20 2d 20 4f 48 20 |HIT A SIDE - OH | 00000c60 44 45 41 52 20 21 20 22 0d 05 00 43 20 e7 20 52 |DEAR ! "...C . R| 00000c70 45 41 53 4f 4e 24 3d 22 53 45 4c 46 22 20 8c 20 |EASON$="SELF" . | 00000c80 f1 8a 30 2c 31 29 3b 22 20 59 4f 55 27 56 45 20 |..0,1);" YOU'VE | 00000c90 48 49 54 20 59 4f 55 52 53 45 4c 46 20 2d 20 41 |HIT YOURSELF - A| 00000ca0 20 42 41 44 20 4d 4f 56 45 20 22 0d 05 0a 22 e7 | BAD MOVE "...".| 00000cb0 20 91 3e 36 30 30 30 20 8c 20 f1 8a 31 31 2c 31 | .>6000 . ..11,1| 00000cc0 29 3b 22 20 54 49 4d 45 20 55 50 20 22 0d 05 14 |);" TIME UP "...| 00000cd0 34 f2 57 41 49 54 28 31 29 3a e7 20 53 43 4f 52 |4.WAIT(1):. SCOR| 00000ce0 45 25 3e 48 49 47 48 53 43 4f 52 45 25 20 8c 20 |E%>HIGHSCORE% . | 00000cf0 48 49 47 48 53 43 4f 52 45 25 3d 53 43 4f 52 45 |HIGHSCORE%=SCORE| 00000d00 25 0d 05 1e 05 e1 0d 05 28 05 20 0d 05 32 0f dd |%.......(. ..2..| 00000d10 20 a4 45 4e 44 3a ea 20 42 24 0d 05 3c 2f f1 8a | .END:. B$..</..| 00000d20 30 2c 36 29 3b 22 20 41 4e 4f 54 48 45 52 20 47 |0,6);" ANOTHER G| 00000d30 41 4d 45 3f 20 28 50 52 45 53 53 20 27 59 27 20 |AME? (PRESS 'Y' | 00000d40 4f 52 20 27 4e 27 29 20 22 0d 05 46 2f f1 8a 30 |OR 'N') "..F/..0| 00000d50 2c 38 29 3b 22 20 28 50 52 45 53 53 20 27 49 27 |,8);" (PRESS 'I'| 00000d60 20 46 4f 52 20 49 4e 53 54 52 55 54 49 4f 4e 53 | FOR INSTRUTIONS| 00000d70 29 20 22 3a ef 20 32 36 0d 05 50 05 f5 0d 05 5a |) ":. 26..P....Z| 00000d80 08 42 24 3d be 0d 05 64 2c e7 20 42 24 3d 22 49 |.B$=...d,. B$="I| 00000d90 22 20 84 20 42 24 3d 22 69 22 20 8c 20 f2 49 4e |" . B$="i" . .IN| 00000da0 53 54 52 55 43 54 49 4f 4e 53 3a 42 24 3d 22 59 |STRUCTIONS:B$="Y| 00000db0 22 0d 05 6e 11 fd 20 a7 22 59 79 4e 6e 22 2c 42 |"..n.. ."YyNn",B| 00000dc0 24 29 0d 05 78 14 3d 42 24 3d 22 4e 22 20 84 20 |$)..x.=B$="N" . | 00000dd0 42 24 3d 22 6e 22 0d 05 8c 0d dd f2 54 4f 50 4c |B$="n"......TOPL| 00000de0 49 4e 45 0d 05 96 26 f1 8a 30 2c 31 29 3b 22 53 |INE...&..0,1);"S| 00000df0 43 4f 52 45 3d 20 22 3b 53 43 4f 52 45 25 3b 22 |CORE= ";SCORE%;"| 00000e00 20 54 49 4d 45 3d 20 22 3b 0d 05 a0 1f 40 25 3d | TIME= ";....@%=| 00000e10 26 32 30 32 30 35 3a f1 3b 36 30 2d 91 2f 31 30 |&20205:.;60-./10| 00000e20 30 3b 3a 40 25 3d 31 30 0d 05 aa 23 f1 22 20 48 |0;:@%=10...#." H| 00000e30 49 47 48 20 53 43 4f 52 45 3d 22 3b 48 49 47 48 |IGH SCORE=";HIGH| 00000e40 53 43 4f 52 45 25 3b 22 20 22 3b 0d 05 b4 06 20 |SCORE%;" ";.... | 00000e50 e1 0d 05 be 05 20 0d 05 c8 25 dd 20 a4 50 45 45 |..... ...%. .PEE| 00000e60 4b 28 58 25 2c 59 25 29 3d 3f 28 93 2b 59 25 2a |K(X%,Y%)=?(.+Y%*| 00000e70 33 32 30 2b 58 25 2a 38 2b 32 29 0d 05 d2 05 20 |320+X%*8+2).... | 00000e80 0d 05 dc 14 dd f2 50 4f 4b 45 28 58 25 2c 59 25 |......POKE(X%,Y%| 00000e90 2c 58 24 29 0d 05 e6 13 ef 33 31 2c 58 25 2c 59 |,X$).....31,X%,Y| 00000ea0 25 2c 97 28 58 24 29 0d 05 f0 05 e1 0d 05 fa 05 |%,.(X$).........| 00000eb0 20 0d 06 04 17 dd f2 57 41 49 54 28 54 29 3a ea | ......WAIT(T):.| 00000ec0 20 6f 6c 64 74 69 6d 65 0d 06 0e 0d 6f 6c 64 74 | oldtime....oldt| 00000ed0 69 6d 65 3d 91 0d 06 18 17 f5 20 fd 20 91 2d 6f |ime=...... . .-o| 00000ee0 6c 64 74 69 6d 65 3e 54 2a 31 30 30 0d 06 22 05 |ldtime>T*100..".| 00000ef0 e1 0d 06 2c 05 20 0d 06 36 0d dd f2 43 4c 45 41 |...,. ..6...CLEA| 00000f00 4e 55 50 0d 06 40 0c 2a 46 58 20 31 32 2c 30 0d |NUP..@.*FX 12,0.| 00000f10 06 4a 0a 2a 46 58 34 2c 30 0d 06 54 09 40 25 3d |.J.*FX4,0..T.@%=| 00000f20 31 30 0d 06 5e 05 e1 0d ff |10..^....| 00000f29