|
|
@ -239,3 +239,27 @@ void win()
|
|
|
|
printf("\n ¨€ ¨€ ¨€¨€¨€ ¨€ ¨€ ");
|
|
|
|
printf("\n ¨€ ¨€ ¨€¨€¨€ ¨€ ¨€ ");
|
|
|
|
system("pause");
|
|
|
|
system("pause");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void end()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
system("mode con cols=50 lines=15");
|
|
|
|
|
|
|
|
system("cls");
|
|
|
|
|
|
|
|
printf("\n\n\n\n\n\n\n\n\n\n\n\n 谢谢使用!\n\n\n\n");
|
|
|
|
|
|
|
|
printf(" 计算机1812班\n 184018001207\n 向理\n") ;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//以下为地图生成函数
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*准备生成的初始化*/
|
|
|
|
|
|
|
|
void chu()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int i,j;
|
|
|
|
|
|
|
|
for(i=0;i<n;i++)for(j=0;j<m;j++){
|
|
|
|
|
|
|
|
if(i%2==1&&j%2==1) map[i][j]=1;
|
|
|
|
|
|
|
|
else map[i][j]=0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
i=rand()%(n-3);
|
|
|
|
|
|
|
|
j=rand()%(m-3);
|
|
|
|
|
|
|
|
if(i%2==0) i++;
|
|
|
|
|
|
|
|
if(j%2==0) j++;
|
|
|
|
|
|
|
|
map[i][j]=2;
|
|
|
|
|
|
|
|
make(i,j);
|
|
|
|
|
|
|
|
}
|