A game for 1K: run over the digits 0 to 9 in order without crossing your own trail or leaving the field. A W marks a win.
I, J, K and M move. The variables the article has you enter by hand are saved with the program, so start with GOTO 1, not RUN or CLEAR. If one digit was printed over another, start again, as the article says. It needs 1K to 3K, because it counts on a collapsed display file: with 4K or more the first move down loses. Grey prints as dark as solid in LISTing, so the graphics in lines 1 and 31 follow the article’s own graphics notes.
Reprinted from SYNC, November/December 1982.
Published in LISTing January 1989 (Just for Fun).
Source Code
1 REM \.'=Y\!::=NOT $4 UNPLOT YV\ .NOT ( PAUSE TAN
3 RAND USR R
5 FOR A=B TO C
7 PRINT AT RND*S+O,RND*S+O;CHR$ A
9 NEXT A
11 LET X=NOT PI
13 LET Y=X
15 FOR A=B TO C
17 PRINT AT X,Y;CHR$ A
19 LET I$=INKEY$
21 PRINT AT X,Y;"\::"
23 IF I$<"I" OR I$>"M" THEN GOTO S+O
25 LET X=X+(I$="M")-(I$="I")
27 LET Y=Y+(I$="K")-(I$="J")
29 LET L=K+X*21+Y
31 IF PEEK L=CODE "\!:" THEN GOTO S+O
33 IF PEEK L=A THEN NEXT A
35 IF A>C THEN POKE L,CODE "W"
Entered in immediate mode before GOTO 1
LET R=16514
LET B=156
LET C=165
LET S=15
LET O=2
LET K=1+PEEK 16396+256*PEEK 16397Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.



