2D Maze

You are placed randomly within a maze and must work your way through to the end. The end of the maze is a flashing wall of color. Move forward using the joystick.
Collections
Program Listing
For fans of type-ins I have reproduced the listing below. If you used to read Antic or Page 6 back in the day you'll probably recognise the TYPO II/III checksum codes on the left side of the listing which you can use to check your typing as you go. The code word-wraps to the screen width but each line starting with a TYPO code and line number should be typed as a single line.
IM
10
GOTO 3000
CV
15
PRINT CHR$(125);"WAIT":DX=9:DY=9:XF=5:YF=9
OO
20
DIM MZ((DX,DY):COLOR 1
KG
30
RESTORE 50
PK
40
FOR I=0 TO DY:FOR J=0 TO DX:READ A:MZ((J,I)=A:NEXT J:NEXT I
MW
50
DATA 15,3,4,7,5,7,5,5,15,5,11,14,5,13,5,13,5,3,10,6,14,11,6,5,5,5,7,11,8,10
PI
60
DATA 10,8,10,6,3,6,11,12,7,9,12,5,9,8,6,12,15,5,13,3,5,5,3,6,15,3,10,2,6,13
OZ
70
DATA 7,5,9,10,10,12,9,10,12,5,14,7,5,9,12,5,5,15,5,1,11,14,5,7,7,5,3,10,4,5
BH
80
DATA 11,8,4,9,8,4,9,12,7,5
MR
85
GOTO 110
JD
90
LL=USR(ADR(MAND$),(X1*2),15):LL=LL+INT(USR(ADR(MAND$),X1,8)/8):RETURN
HM
100
RR=INT(X1/2)+(USR(ADR(MAND$),X1,1)*8):RETURN
BV
110
X=INT(RND(0)*6+2):Y=INT(RND(0)*5):D=2^INT(RND(0)*4):GRAPHICS 8:GOSUB 210
KP
120
B=STRIG(1):A=STICK(1):IF A=15 AND B=1 THEN 120
EX
130
IF A=11 THEN X1=D:GOSUB 100:D=RR:GOSUB 210:GOTO 120
TC
140
IF A=7 THEN X1=D:GOSUB 90:D=LL:GOSUB 210:GOTO 120
NY
150
IF USR(ADR(MAND$),D,MZ((X,Y))=1 THEN X=X-1:IF X<0 THEN X=DX
JX
160
IF USR(ADR(MAND$),D,MZ((X,Y))=2 THEN Y=Y+1:IF Y>DY THEN Y=0
CZ
170
IF USR(ADR(MAND$),D,MZ((X,Y))=4 THEN X=X+1:IF X>DX THEN X=0
HP
180
IF USR(ADR(MAND$),D,MZ((X,Y))=8 THEN Y=Y-1:IF Y<0 THEN Y=DY
IF
190
GOSUB 210:IF X=XF AND Y=YF THEN GRAPHICS 0:END
MD
200
GOTO 120
AG
210
GRAPHICS 8:XN=X:YN=Y:IF USR(ADR(MAND$),D,MZ((X,Y))=0 THEN RETURN
IU
220
IF USR(ADR(MAND$),D,MZ((X,Y))=1 THEN XN=X-1:IF XN<0 THEN XN=DX
DX
230
IF USR(ADR(MAND$),D,MZ((X,Y))=2 THEN YN=Y+1:IF YN>DY THEN YN=0
WT
240
IF USR(ADR(MAND$),D,MZ((X,Y))=4 THEN XN=X+1:IF XN>DX THEN XN=0
CS
250
IF USR(ADR(MAND$),D,MZ((X,Y))=8 THEN YN=Y-1:IF YN<0 THEN YN=DY
PW
260
PLOT 0,0:DRAWTO 87,57:PLOT 0,159:DRAWTO 87,130:PLOT 319,0:DRAWTO 232,57:PLOT 319,159:DRAWTO 232,130
QF
270
IF USR(ADR(MAND$),MZ((XN,YN),D)=0 THEN 300
FO
280
PLOT 157,103:DRAWTO 162,103:DRAWTO 162,107:DRAWTO 157,107:DRAWTO 157,103
UL
281
PLOT 157,103:DRAWTO 130,85:PLOT 162,103:DRAWTO 189,85
EK
290
PLOT 157,107:DRAWTO 130,116:PLOT 162,107:DRAWTO 189,116:GOTO 310
DO
300
PLOT 130,85:DRAWTO 189,85:PLOT 130,116:DRAWTO 189,116
DV
310
X1=D:GOSUB 100:IF USR(ADR(MAND$),MZ((XN,YN),RR)=0 THEN 340
NV
320
PLOT 87,57:DRAWTO 87,130:PLOT 130,85:DRAWTO 87,85:PLOT 130,116:DRAWTO 87,116
DZ
330
IF USR(ADR(MAND$),MZ((XN,YN),D)>0 THEN PLOT 130,85:DRAWTO 130,116
LJ
340
X1=D:GOSUB 90:IF USR(ADR(MAND$),MZ((XN,YN),LL)=0 THEN 370
WV
350
PLOT 232,57:DRAWTO 232,130:PLOT 189,85:DRAWTO 232,85:PLOT 189,116:DRAWTO 232,116
OH
360
IF USR(ADR(MAND$),MZ((XN,YN),D)>0 THEN PLOT 189,85:DRAWTO 189,116
ZR
370
X1=D:GOSUB 90:IF USR(ADR(MAND$),MZ((XN,YN),LL)>0 THEN 400
CU
380
PLOT 232,57:DRAWTO 189,85:PLOT 232,130:DRAWTO 189,116
ND
390
IF USR(ADR(MAND$),MZ((XN,YN),D)=0 THEN PLOT 189,85:DRAWTO 189,116
FT
400
X1=D:GOSUB 100:IF USR(ADR(MAND$),MZ((XN,YN),RR)>0 THEN 430
ZH
410
PLOT 87,57:DRAWTO 130,85:PLOT 87,130:DRAWTO 130,116
CO
420
IF USR(ADR(MAND$),MZ((XN,YN),D)=0 THEN PLOT 130,85:DRAWTO 130,116
LE
430
IF XN=XF AND YN=YF THEN GRAPHICS 0:PRINT "HOME"
ZI
440
RETURN
EN
3000
DATA 104,104,133,213,104,133,212
GR
3010
DATA 104,37,213,133,213,104,37,212,133,212,96
YD
3020
RESTORE 3000:DIM MAND$(18),MOR$(18)
XP
3030
FOR I=1 TO 18:READ A:MAND$(I,I)=CHR$(A):NEXT I
CS
3040
MOR$=MAND$:MOR$(9,9)=CHR$(5):MOR$(14,14)=CHR$(5)
HL
3050
REM A=USR(ADR(MAND$),X,Y) . A=X AND Y
TQ
3060
REM A=USR(ADR(MOR$),X,Y) .A= X OR Y
RX
3070
GOTO 15
Notes
Controller in Port2.

If it starts with a blank screen, you are probably facing a wall... turn!