Next, we made a slight change to get the for loop to display rectangles and circles in form that would make any Mayo supporter teary-eyed:
We then spent the rest of the class experimenting with different colors, animations, strokes, framerates, probabilities, etc to get some really interesting effects (often by accident!).
For anyone that’s interested, the classic program is below and it was amazing in that it did it in a single line on a commodore 64!:
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
There is a whole book out there on this line of code! It’s worth flicking through as it shows lots of other maze variants that are possible with some tweaking.
As usual, all the code is up on github! Happy creating!!