- #include<bits/stdc++.h>
- #include<Windows.h>
- #include<conio.h>
- using namespace std;
- int up=100,zd=0,xb=1,q=0;
- int gjl[10]={1,2,3,4,5,6,7,8,9,10};
- int zx[4]={0,0,-1,1};
- int zy[4]={-1,1,0,0};
- char mat[101][101];
- int x,y,zrs=0,tt=0;
- void print(char a[]){
- int t=strlen(a);
- for(int i=0;i<=t;i++){
- cout<<a[i];
- Sleep(10);
- }
- cout<<endl;
- }
- void start();
- int main(){
- system("title !战火英雄!-额…………出品");
- MessageBox(NULL,"抵制不良游戏,拒绝盗版游戏 注意自我保护,谨防受骗上当 适度游戏益脑,过度游戏伤身 合理安排时间,享受健康生活","温馨提示",MB_OKCANCEL);
- cout<<
- "一个军事海岛突然遭受黑衣人的袭击,上面的军队抵挡不住,军事海岛最终被黑衣人控制。"<<
- "这向人们预示了灾难可能将要到来......"<<endl;
- system("pause");
- system("cls");
- cout<<
- "战火英雄1-新的征途"<<endl<<
- "版本号"<<endl;
- system("pause");
- start();
- cout<<"再来一次?输入1"<<endl;
- int ttttt;
- cin>>ttttt;
- if(ttttt==1)start();
- return 0;
- }
- void start(){
- bool flag=1;
- system("cls");
- print("地图大小?(n*n)");
- int n;
- cin>>n;
- print("(飞机的呼呼声)");
- print("长官:准备跳伞!祝你好运,新兵");
- print("落点x,y?");
- cout<<"x:";
- cin>>x;
- cout<<"y:";
- cin>>y;
- system("pause");
- system("cls");
- srand(time(NULL));
- for(int i=1;i<=n;i++)
- for(int j=1;j<=n;j++){
- int k=rand()%10+1;
- if(k==1)mat[i][j]='.';
- else if(k==2)mat[i][j]='H';
- else if(k==3)mat[i][j]='X';
- else if(k==4)mat[i][j]='P';
- else if(k==5)mat[i][j]='D';
- else if(k==6)mat[i][j]='.';
- else if(k==7)mat[i][j]='.';
- else mat[i][j]='.';
- }
- mat[x][y]='.';
- mat[x+1][y]='.';
- mat[x-1][y]='.';
- mat[x][y+1]='.';
- mat[x][y-1]='.';
- int bs=0,dp=0;
- while(1){
- bs++;
- if(bs==90||bs==190)cout<<"还有10步缩圈!"<<endl;
- if(bs==95||bs==195)cout<<"还有5步缩圈!"<<endl;
- if(bs==99||bs==199)cout<<"还有1步缩圈!"<<endl;
- if(bs==100){
- dp++;
- for(int i=1;i<=n;i++)mat[dp][i]='#',mat[n-dp+1][i]='#',mat[i][dp]='#',mat[i][n-dp+1]='#';
- }