500 DIM MATLOC(4,6):REM MATLOC stands for MATrix LOCation.›510 X=0:Y=0:VALUE=0:REM VALUE will equal the value of the number in the "box".›520 IF X>4 THEN X=0:Y=Y+1:REM If column number is >4 then reset column number to 0 and increase row value by one.›530 IF Y>6 THEN RETURN :REM RETURN to original program from subroutine, that is.›540 IF VALUE>30 THEN VALUE=-1:REM When it gets to the 30th room, set the left over matrix "boxes" to -1.›550 MATLOC(X,Y)=VALUE›560 X=X+1:IF VALUE<>-1 THEN VALUE=VALUE+1›570 GOTO 520›