How to build a maze