Got the maze generating working, using a version of Prim's algorithm.