[Java program] maze generation and solution

CSDN Q & A 2022-02-13 07:54:41 阅读数:792

java program maze generation solution

Create a maze ( Complexity alpha Is the ratio of the wall to the total cells of the maze )
Maze to n×n Of 0-1 The matrix representation of , among 1 Represents a wall ,0 Means passable
The labyrinth entrance is (0,0), The exit is (n-1,n-1), The walking direction is up, down, left and right
It is required to output the shortest feasible path
If there are multiple shortest paths , Then output them all

copyright:author[CSDN Q & A],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130754396257.html