教程集 www.jiaochengji.com
教程集 >  脚本编程  >  C语言  >  正文 走迷宫

走迷宫

发布时间:2018-12-05   编辑:jiaochengji.com
教程集为您提供走迷宫等资源,欢迎您收藏本站,我们将为您提供最新的走迷宫资源

走迷宫

去年发表的<迷宫探路>系列的Windows版.

可执行文件在附件中(需要 Winrar 解压缩)

运行环境: 需要安装c builder6

 

下面是主要源文件 UnitMaze.cpp 另外,本人对单片机感兴趣,有谁知道上海那有便宜的 凌阳科技61板 卖,请告诉我. //作者:朱清  2004-11-18
//Email: cleanzhu2002@yahoo.com.cn
//--------------------------------------------------------------------------- #include <VCL.H>
#pragma hdrstop #include "UnitMaze.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
 
struct  pace{
   int pre;
   int ri;
   int rj;
  } ;   int bg[8][8];
  int M  ;
  int N  ;
  int step  ;
  int dir ;
  int i ;
  int j ;
  int x ;
  int y ;
  int w ;
  int h ;
  int count ;
  int le ;
  pace road[64] ;
  pace bestroad[64] ;
  int runnum ; void __fastcall  TForm1::init(TObject *Sender)
{
       int i,j;
       for (i=0;i<8;i )
 for (j=0;j<8;j )
    bg[i][j]=1;
step=30;
dir=2;
M=8;N=8;
x=5;y=5;
w=8;h=8;
setBg();
//--------
drawMaze(Sender);
findShortRoad(Sender);
count=0;
runnum=0;
}

您可能感兴趣的文章:
走迷宫:找出全部路径
老鼠走迷宫程序实例
走迷宫
迷宫探路
用栈实现迷宫问题求解
迷宫探路III(最短路径)
迷宫探路II
使用canvas实现迷宫游戏
数据结构演示(tc版)
迷宫探路IV(递归算法)

[关闭]
~ ~