-
-
数据结构课程设计——迷宫问题
利用二维数组来表示迷宫,用1表示一堵墙,用0表示通路,为了不出界在迷宫的周围需添加一堵墙;先创建迷宫,然后给出要求通路的起点和终点,求出一条通路,通路在迷宫中以数字编号即1,2,3……给出,另外还给出了通路中各个点的坐标!
-
-
-
迷宫代码C++
... [500]; //最大成员500个,,迷宫大小,,,,,
int mg[ ... ,
int zx[8+1],zy[8+1]; //迷宫方向数组 九宫格,,, ... 8个方向
void printlj(int rear) //打印迷宫路径
{
int i;
i=rear; //保存当前节点 ... !=0); //i!=0表示通路
}
void mglj() //球迷宫最短路径
{
int i,j,x,y ...
-
-
-
-
-
-
数据结构严蔚敏C语言版 迷宫
数据结构 严蔚敏 C语言版 迷宫
status mazePath(seqStack *S, posType start, posType end)
{
posType curPos; //current positon
int curStep; //the ordinary number
sElemType e;
curPos = start;
curStep = 1;
do
{
if(pass(curPos)) //the current position is & ...
-