迷宫递归算法参考.pdfVIP

  • 5
  • 0
  • 约4.68千字
  • 约 4页
  • 2021-12-07 发布于福建
  • 举报
#include stdio.h #include stdlib.h #define W 80 //迷宫宽的最大值 #define H 60 //迷宫高的最大值 /* 迷宫单元格状态 : VIA: 已经过 ;BLOCK: 阻塞 ;EMPTY: 空的 . */ typedef enum {VIA,BLOCK,EMPTY} MazeCellStatus; typedef struct { int x,y; //单元格的坐标 } CellType; // 迷宫单元格的类型 typedef struct { CellType path[W*H]; // 经过路径 int length; // 经过长度 } MazePathType; // 迷宫路线类型 ///==================================================================== ========= void outSolution(MazePathType mazePath); // 输出迷宫问题的解

文档评论(0)

1亿VIP精品文档

相关文档