I had received the, rather amazing, Mazes for Programmers book for my birthday and wanted to really explore what it had to offer. I also wanted to learn Python. Ultimately, this was an experiment to see how far I could get in a language I didn’t know in a month.
Details
Design Details
The most difficult part of this project was that the sample code was written in Ruby and I was implementing the code in Python and I didn’t know either language. In school we had so far focused on C++ but the sample code was both well written and usually well explained by the supporting text.
Everything was implemented via classes and supported multiple forms of output: ASCII, Unicode, PNG, and SVG. Different maze generator types could be used with the same base class and everything would just work but give completely different looking mazes. All of the image functions came from the Pillow library.
Conclusion
Python is an amazing language that is easy and fun to write in. Adding in libraries is simple and the package managers make maintaining dependencies much easier. When I have more time I look forward to implementing all of the algorithms in the book.