Maze generation and solving