C语言、双向链表实现的迷宫巡径程序,包括课程设计和全部源代码。模块化附注释,方便改为其他数据结构实现。
}
}
existL=0; finish=0; mindistance=0;
//迷宫求解。。
status seek() {
int allfinished=0;
if(entrancex==exitx&&entrancey==exity)//入口和出口重合的特殊情况。
L=(linklist)malloc(sizeof(node));//建立存储脚步的链表. L->next=NULL; L->pre=NULL; L->stepsum=0; existL=1;
//初始化nowstep,令其在入口处。 nowstep=(node *)malloc(sizeof(node)); nowstep->x=entrancex; nowstep->y=entrancey; nowstep->pre=L; nowstep->next=NULL; nowstep->di=0; nowstep->stepsum=1;
return 2;
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库数据结构 课程设计 迷宫程序(11)在线全文阅读。
相关推荐: