YJ2 has asked for an explanation of the
TILES program on issue 22. Here is an
attempt to explain the one liner step
by step:
Text in RED is taken from the actual
program.
MODE1:CLG
Selects a four colour
mode and clears the screen.
FORx=20TO1230STEP62
This is the outer loop
which prints the columns
across the screen from left
to right.
FORy=20TO900STEP62
This is the inner loop
which prints each
individual column from
bottom to top.
This next section is responsible for
printing a single tile by drawing a
white box and filling it:
GCOL0,3
Select graphic colour white.
MOVEx,y
DRAWx,y+50
DRAWx+50,y+50
DRAWx+50,y
DRAWx,y
Draw the box.
GCOLRND(8)*RND(8),RND(4)
Select a graphic colour
at random.
PLOT133,x+10,y+10
Plot 133 flood fills
from point X,Y until
non background is found.
Therefore, if point
X,Y lies inside a box,
the box will be filled.
NEXT
End of column.
NEXT
End of screen.