At first, I wanted to write a simple rectangular space-filling maze generator. Primarily as an exercise in learning Java, but also to create mazes for my Mother-in-Law to use for kids when she was tutoring them.

Part way through, I realized that the basic questions relating to geometry where really a kind of Strategy pattern.

Note that parts of this little demo predate the maze-related examples in the Gang-of-Four design patterns book. However, the design patterns information gave me a much better design.

I wrote this “the hard way” without an IDE or anything helpful like that about a decade ago. Now that I have NetBeans, I plan on doing some more cleanup just to fix the packages and finish the javadocs.


The complete source.