首页 > 编程语言 > 详细

关于自动寻路简单算法

时间:2018-05-03 00:39:12      阅读:249      评论:0      收藏:0      [点我收藏+]
#include<stdio.h>
#define MAPX 8
#define MAPY 8
int printmap(int a[][MAPY],int x,int y)
{int i,j,m;
for(i=0;i<x;i++)
    {for(m=0;m<y;m++)
        printf("--");
    printf("\n");
    printf("|");
    for(j=0;j<y;j++)
        if(a[i][j]==0)
            printf("%c|", );
        else if(a[i][j]==1)
            printf("%c|",$);
    printf("\n");
    }
return 0;
}

 void main()
 {
     int map[MAPX][MAPY]={0},x,y;
     map[2][2]=1;
  printmap(map,MAPX,MAPY);
 }

 

关于自动寻路简单算法

原文:https://www.cnblogs.com/chengtou/p/8983238.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!