#include<bits/stdc++.h>
#include<windows.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME)&0x8000)?1:0)
using namespace std;
int size[24]={5,5,5,7,9,5,5,5,7,9,5,5,5,7,9,5,5,5,7,9,5,5,5,7},mirror[24]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,1,3,0,0,0,3},dx[5]={0,0,0,0,1},dy[5]={1,-1,0,0,0},dz[5]={0,0,1,-1,0};
bool gravity[24]={0,0,0,0,0,1,1,1,1,1,0,1,1,0,1,0,0,0,1,1,1,1,1,1};
char loop[4][26],gaming[9][9][9],maze[24][9][9][10]={{{
"#####",
"#####",
"#####",
"#####",
"#####"
},{
"#####",
"#...#",
"###.#",
"#E..#",
"#####"
},{
"#####",
"#####",
"#####",
"#####",
"#####"
},{
"#####",
"#####",
"#####",
"#####",
"#####"
},{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},{{
"#####",
"#####",
"#####",
"#####",
"#####"
},{
"#####",
"#...#",
"#####",
"#E..#",
"#####"
},
{
"#####",
"###.#",
"#####",
"###.#",
"#####"
},
{
"#####",
"###.#",
"###.#",
"###.#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#...#",
"#####",
"#E..#",
"#####"
},
{
"#####",
"#.#.#",
"#####",
"###.#",
"#####"
},
{
"#####",
"#.#.#",
"#.###",
"#...#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
},
{
"#######",
"#...#.#",
"#####.#",
"#.#.#.#",
"#.#.#.#",
"#.....#",
"#######"
},
{
"#######",
"#.#.#.#",
"#######",
"###.###",
"#######",
"#######",
"#######"
},
{
"#######",
"#.#...#",
"#######",
"#...#.#",
"#####.#",
"#.....#",
"#######"
},
{
"#######",
"#.###.#",
"#######",
"#.###.#",
"#######",
"#.#####",
"#######"
},
{
"#######",
"#...#.#",
"###.###",
"#.#...#",
"###.###",
"#E#...#",
"#######"
},
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
}
},
{
{
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########"
},
{
"#########",
"#...#...#",
"#####.###",
"#...#.#.#",
"#.#####.#",
"#.#...#.#",
"#.#####.#",
"#.......#",
"#########"
},
{
"#########",
"#.#.#####",
"#########",
"#####.###",
"#########",
"###.#.###",
"#########",
"###.#####",
"#########"
},
{
"#########",
"#.#.....#",
"#######.#",
"#...#.#.#",
"#.#.###.#",
"#.#.#...#",
"#.#####.#",
"#.#.#...#",
"#########"
},
{
"#########",
"#.#####.#",
"#########",
"#####.###",
"#########",
"###.#####",
"#########",
"###.#.###",
"#########"
},
{
"#########",
"#.#...#.#",
"#.###.###",
"#.#.#...#",
"#.#######",
"#.#.#...#",
"#.###.###",
"#...#.#.#",
"#########"
},
{
"#########",
"#.#.###.#",
"#########",
"###.###.#",
"#########",
"###.###.#",
"#########",
"###.###.#",
"#########"
},
{
"#########",
"#.#.#...#",
"#.#.#.###",
"#...#.#.#",
"#########",
"#...#...#",
"#.#######",
"#E#.....#",
"#########"
},
{
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#...#",
"###.#",
"#E..#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#..##",
"##..#",
"#...#",
"#####"
},
{
"#####",
"##E.#",
"###.#",
"#.###",
"#####"
},
{
"#####",
"##..#",
"##.##",
"#..##",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#...#",
"###.#",
"#...#",
"#####"
},
{
"#####",
"##..#",
"#E###",
"##.##",
"#####"
},
{
"#####",
"###.#",
"#...#",
"###.#",
"#####",
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
},
{
"#######",
"#.....#",
"##.#..#",
"#..#..#",
"##.#.##",
"##.#.##",
"#######"
},
{
"#######",
"#...#.#",
"#######",
"#.#...#",
"##.#.##",
"####.##",
"#######"
},
{
"#######",
"#.#.#.#",
"#.#####",
"#...#.#",
"##.####",
"####.##",
"#######"
},
{
"#######",
"#.#...#",
"###..##",
"##.#..#",
"####.##",
"#.....#",
"#######"
},
{
"#######",
"#.##..#",
"#....##",
"##..#E#",
"#######",
"#.#.#.#",
"#######"
},
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
}
},
{
{
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########"
},
{
"#########",
"#.....#.#",
"#####.#.#",
"#####.#.#",
"#####.#.#",
"#......E#",
"#####.###",
"#.......#",
"#########"
},
{
"#########",
"#.#.###.#",
"#########",
"#########",
"#########",
"#.#######",
"#########",
"#.#######",
"#########"
},
{
"#########",
"#.#...#.#",
"#####.###",
"#####...#",
"#######.#",
"#.###...#",
"#######.#",
"#.#####.#",
"#########"
},
{
"#########",
"#.#####.#",
"#########",
"#####.###",
"#####.###",
"#.###.#.#",
"#######.#",
"#.#######",
"#########"
},
{
"#########",
"#..####.#",
"##..#####",
"###...###",
"#######.#",
"#...###.#",
"###.#####",
"#.#.#####",
"#########"
},
{
"#########",
"#.#####.#",
"#########",
"#####.#.#",
"#######.#",
"#.#######",
"#########",
"#.#.#####",
"#########"
},
{
"#########",
"#.##....#",
"#.#..####",
"#...#...#",
"#..######",
"#.#######",
"#########",
"#...#####",
"#########"
},
{
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#.###",
"#.###",
"#####",
"#####"
},
{
"#####",
"###.#",
"#.*.#",
"##..#",
"#####"
},
{
"#####",
"#####",
"###E#",
"#####",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#..##",
"#####",
"#...#",
"#####"
},
{
"#####",
"#.*##",
"#.###",
"#.#.#",
"#####"
},
{
"#####",
"##.E#",
"##.##",
"#...#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#...#",
"##..#",
"#..!#",
"#####"
},
{
"#####",
"#.*.#",
"###!#",
"#.!E#",
"#####"
},
{
"#####",
"#...#",
"#!#.#",
"#.!.#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
},
{
"#######",
"#.#..##",
"#..!..#",
"#######",
"#######",
"#....E#",
"#######"
},
{
"#######",
"##..###",
"#.*.#.#",
"###.###",
"###.###",
"#.#####",
"#######"
},
{
"#######",
"#######",
"###...#",
"#.!####",
"#.#*.##",
"#.#####",
"#######"
},
{
"#######",
"#######",
"#######",
"#..####",
"##...##",
"##..###",
"#######"
},
{
"#######",
"#######",
"#######",
"##.####",
"##.####",
"#######",
"#######"
},
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
}
},
{
{
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########"
},
{
"#########",
"#.......#",
"#######.#",
"#########",
"#########",
"#########",
"#########",
"#.....###",
"#########"
},
{
"#########",
"#..######",
"#.#####.#",
"#..####.#",
"#########",
"###...###",
"###.#####",
"#.###*###",
"#########"
},
{
"#########",
"#..######",
"#!#######",
"#.*#..#.#",
"#.#####.#",
"#.###*###",
"###.#####",
"#.#.#.###",
"#########"
},
{
"#########",
"#..######",
"#!#######",
"#.....###",
"#######.#",
"#.###.#.#",
"#########",
"#.#.#.###",
"#########"
},
{
"#########",
"#..######",
"#!#######",
"#.....###",
"###!#.###",
"#.....#.#",
"#####.#.#",
"#.#.#.###",
"#########"
},
{
"#########",
"#..######",
"#!#######",
"##...####",
"#########",
"#......##",
"#!!!!##.#",
"#.#.#.#.#",
"#########"
},
{
"#########",
"#..######",
"#.#######",
"#.#######",
"#E#######",
"#.......#",
"#######.#",
"#.......#",
"#########"
},
{
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#...#",
"#####",
"#E..#",
"#####"
},
{
"#####",
"###.#",
"#####",
"###.#",
"#####"
},
{
"#####",
"#...#",
"#.###",
"#...#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#...#",
"#####",
"#E..#",
"#####"
},
{
"#####",
"###.#",
"#####",
"###.#",
"#####"
},
{
"#####",
"#...#",
"#.###",
"#...#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#...#",
"#####",
"#E..#",
"#####"
},
{
"#####",
"###.#",
"#####",
"###.#",
"#####"
},
{
"#####",
"#...#",
"#.###",
"#...#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
},
{
"#######",
"#.....#",
"##!####",
"#.....#",
"####!.#",
"#.....#",
"##!#!##"
},
{
"#######",
"#.....#",
"##!#!##",
"#.....#",
"##!#!##",
"#.....#",
"##!#!##"
},
{
"#######",
"#.....#",
"##!.!##",
"#.....#",
"##!#!##",
"#.....#",
"##!####"
},
{
"#######",
"#.....#",
"##!!!##",
"#.....#",
"##!#!##",
"#.....#",
"##!!!!#"
},
{
"#######",
"#.....#",
"#######",
"#.....#",
"#.!####",
"#....E#",
"#######"
},
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
}
},
{
{
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########"
},
{
"#########",
"#.#####.#",
"######..#",
"#...#..##",
"####..###",
"#....####",
"#########",
"#.......#",
"#########"
},
{
"#########",
"#.#####.#",
"#########",
"#.#.#####",
"#########",
"#.#.#####",
"#########",
"#.......#",
"#########"
},
{
"#########",
"#.*.*...#",
"###.#####",
"#.*.###.#",
"###.###E#",
"#.......#",
"##.######",
"#.#.....#",
"#########"
},
{
"#########",
"#.###.###",
"#########",
"#.#.###.#",
"#########",
"#.#.#.###",
"#########",
"#.......#",
"#########"
},
{
"#########",
"#.....###",
"#########",
"#.#.###.#",
"#.#######",
"#.#...###",
"#########",
"#.......#",
"#########"
},
{
"#########",
"#.#.#.###",
"#########",
"###.###.#",
"#########",
"#########",
"#########",
"#.......#",
"#########"
},
{
"#########",
"#.#.#.###",
"#.#.#!###",
"#.#.....#",
"#.#.#####",
"#.#.#####",
"#.#######",
"#.......#",
"#########"
},
{
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########",
"#########"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#...#",
"###.#",
"#E#O#",
"#####"
},
{
"#####",
"#####",
"#####",
"#O#O#",
"#####"
},
{
"#####",
"#...#",
"#.#.#",
"#O#O#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#..##",
"#####",
"#E#O#",
"#####"
},
{
"#####",
"##*##",
"#####",
"#O#O#",
"#####"
},
{
"#####",
"##..#",
"##..#",
"#OOO#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#####",
"#####",
"#####",
"#####",
"#####"
},
{
"#####",
"#...#",
"##OO#",
"##OO#",
"#####"
},
{
"#####",
"#.###",
"#.#*#",
"#.###",
"#####"
},
{
"#####",
"#E..#",
"##..#",
"##..#",
"#####"
},
{
"#####",
"#####",
"#####",
"#####",
"#####"
}
},
{
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
},
{
"#######",
"#..E#O#",
"##.####",
"#..##O#",
"##.####",
"##.####",
"#######"
},
{
"#######",
"##..#O#",
"#.#.###",
"#.#.#O#",
"#######",
"##....#",
"#######"
},
{
"#######",
"#...*O#",
"#.#.###",
"###.#O#",
"###OOO#",
"###*###",
"#######"
},
{
"#######",
"#.###O#",
"#######",
"#####O#",
"#######",
"###.###",
"#######"
},
{
"#######",
"#..#OO#",
"##OOO##",
"#######",
"#######",
"#######",
"#######"
},
{
"#######",
"#######",
"#######",
"#######",
"#######",
"#######",
"#######"
}
}
};
struct water{
int x,y,z;
};
queue<water>que;
char press()
{
for(char i=65;i<=90;i++)
if(KEY_DOWN(i))
return i;
return '\0';
}
int main()
{
char ch;
int x,y,z,game,top,eye;
bool box;
water t,r;
for(int i=0;i<=3;i++)
for(int j=0;j<=25;j++)
loop[i][j]=char(j+65);
swap(loop[1][0],loop[1][3]);
swap(loop[2][18],loop[2][22]);
swap(loop[3][2],loop[3][17]);
while(1)
{
system("cls");
cout<<"菜单"<<endl;
cout<<"按Z进入第一章:基础"<<endl;
cout<<"按X进入第二章:重力"<<endl;
cout<<"按C进入第三章:机关"<<endl;
cout<<"按V进入第四章:镜像"<<endl;
cout<<"按B进入第五章:水"<<endl;
ch='\0';
while(ch!='Z'&&ch!='X'&&ch!='C'&&ch!='V'&&ch!='B')
ch=press();
if(ch=='Z')
{
game=0;
top=5;
}
else if(ch=='X')
{
game=5;
top=10;
}
else if(ch=='C')
{
game=10;
top=15;
}
else if(ch=='V')
{
game=15;
top=20;
}
else
{
game=20;
top=24;
}
推荐,走迷宫,高级版
1-1343