迷宫小游戏相关内容

来几个迷宫小游戏网址?

5650

简单的迷宫小游戏 C语言程序源代码

内容来自用户:那个初恋的年代

#include
#include
#include
#include
#defineHeight31//迷宫的高度,必须为奇数
#defineWidth25//迷宫的宽度,必须为奇数
#defineWall1
#defineRoad0
#defineStart2
#defineEnd3
#defineEsc5
#defineUp1
#defineDown2
#defineLeft3
#defineRight4
intmap[Height+2][Width+2];
voidgotoxy(intx,inty)//移动坐标
{
COORDcoord;
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
voidhidden()//隐藏光标
{
HANDLEhOut=GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFOcci;
GetConsoleCursorInfo(hOut,&cci);
cci.bVisible=0;//赋1为显示,赋0为隐藏
SetConsoleCursorInfo(hOut,&cci);
voidcreate(intx,inty)//随机生成迷宫
{
intc[4][2]={0,1,1,0,0,-1,-1,0;//四个方向
inti,j,t;
//将方向打乱
for(i=0;i<4;i++)
{
j=rand()%4;
t=c[i][0];c[i][0]=c[j][0];c[j][0]=t;
t=c[i][1];c[i][1]=c[j][1];c[j][1]=t;
map[x][y]=Road;
for(i=0;i<4;i++)
if(map[x+2*c[i][0]][y+2*c[i][1]]==Wall)
{
map[x+c[i][0]][y+c[i][1]]=Road;
create(x+2*c[i][0],y+2*c[i][1]);
intget_key()//接收按键
{
charc;
while(c=getch())
{
if(c==27)returnEsc;//Esc
if(c!=-32)continue;
c=getch();
if(c==72)returnUp;//上
if(c==80)returnDown;//下...

14253

matlab编写的迷宫小游戏

内容来自用户:且自逍遥1994

function maze
row = 20;
col = 39;
rand('state',sum(100*clock))
[cc,rr] = meshgrid(1:col,1:row);
state = reshape([1:row*col],row,col);
id = reshape([1:row*col],row,col);
ptr_left = zeros(size(id));
ptr_up = zeros(size(id));
ptr_right = zeros(size(id));
ptr_down = zeros(size(id));
ptr_left(:,2:size(id,2)) = id(:,1:size(id,2)-1);
ptr_up(2:size(id,1),:) = id(1:size(id,1)-1,:);
ptr_right(:,1:size(id,2)-1) = id(:,2:size(id,2));
ptr_down(1:size(id,1)-1,:) = id(2:size(id,1),:);
the_maze = cat(2,reshape(id,row*col,1),reshape(rr,row*col,1),reshape(cc,row*col,1),reshape(state,row*col,1),...
reshape(ptr_left,row*col,1),reshape(ptr_up,row*col,1),reshape(ptr_right,row*col,1),reshape(ptr_down,row*col,1) );
the_maze = sortrows(the_maze);
id = the_maze(:,1);
rr = the_maze(:,2);
cc = the_maze(:,3);
state = the_maze(:,4);
ptr_left = the_maze(:,5);
ptr_up = the_maze(:,6);
ptr_right = the_maze(:,7);
ptr_down = the_maze(:,8);
clear the_maze;
[state, ptr_left, ptr_up, ptr_right, ptr_down]=...
make_pattern(row,col,rr, cc, state, ptr_left, ptr_up, ptr_right, ptr_down);
f = figure('Name','迷宫',... %显示图形窗口的标题<...

658

最好玩的走迷宫小游戏是什么?

9307

好玩3d网页de游戏推荐? 最近玩2d的腻了,有没有3d的推荐下啊!谢谢

17978

求几款迷宫类的单机游戏

4451