×

Loading...

一个编程小项目给有兴趣的小同学:画迷宫 Draw a Maze

Draw a maze of size N x N. N is an integer parameter.

Requirements:

  1. There is one and only one path from the entrance (bottom-left) to the exit (top-right).
  2. There is no loop.
  3. Every cell is accessible.

An example of a 4x4 maze is below.

 
There is another example, a 5x5 maze, from internet:
Report