Algorithm to generate a segment maze
问题 I want to generate a maze that looks like this: That is, it consists of paths in one direction that are then connected. I have looked for an algorithm to generate mazes like this without success. Specifically, I don't want a maze like this: because it doesn't "run" in only one direction. Also, it would be nice if the solution of this maze required the player to "backtrack" -- i.e. not just move upwards all the time. 回答1: create a random path between point A and B randomly add walls as long as