灵异电梯(必死)

#include<bits/stdc++.h>
#include<windows.h> 
using namespace std;
int a[15],a1[15][15],f[15],b[15];
int main()
{
    srand((unsigned)time(NULL)); 
    system("color 8E");
    int n,m,i,j,ij,nm,nmn,mnm=1;
    cout<<"请输入你的游戏模式。"<<endl;
    cout<<"1.简单。 2.普通。 3.困难。"<<endl;
    cin>>nmn;
    if(nmn>3)
    {
        cout<<"你是**吧。";
        return 0;
    }
    if(nmn==1)
    {
        mnm=2;
    }
    else if(mnm==3)
    {
        mnm=0;
    }
    system("cls");
    cout<<"你被神秘人扔到了电梯里,你要去那一层?"<<endl;
    for(i=mnm;i<=3;i++)
    {
        b[i]=rand()%10+1;
        Sleep(rand()%100+1);
        for(j=1;j<i;j++)
        {
            if(b[i]==b[j])
            {
                b[i]++;
                if(b[i]>10)
                {
                    b[i]==1;
                }
                if(b[i]==b[j])
                {
                    b[i]++;
                }
             }
        }
        if(i<=1)
        {
            if(nmn==3)
            {
                a1[i][2]=2;
             }
             else
             {
                a1[b[i]][2]=1;
             }
         } 
         else if(i==3)
         {
            if(nmn==1)
            {
                a1[i][2]=1;
             }
             else
             {
                a1[b[i]][2]=2;
             }
         }
         else
         {
            a1[b[i]][2]=3;
         }
    }
    for(i=1;i<=10;i++)
    {
        cout<<i<<" ";
    }
    cout<<endl;
    cin>>n;
    if(n>10||f[n]==1)
    {
        cout<<"你是**吧!";
        return 0;
    }
    f[n]=1;
    system("cls");
    while(1)
    {
        for(i=14;i>=0;i-=2)
        {
            for(ij=1;ij<=7;ij++)
            {
                for(j=i/2;j>=1;j--)
                {
                    cout<<"█";
                }
                for(j=1;j<=14-i;j++)
                {
                    cout<<" ";
                }
                for(j=i/2;j>=1;j--)
                {
                    cout<<"█";
                }
                cout<<endl;
            }
            Sleep(100);
            system("cls");
        }
        if(a1[n][2]==1)
        {
            Sleep(500);
            n=rand()%6+1;
            for(i=0;i<=n*2;i+=2)
            {
                for(ij=1;ij<=7;ij++)
                {
                    for(j=i/2;j>=1;j--)
                    {
                        cout<<"█";
                    }
                    for(j=1;j<=14-i;j++)
                    {
                        cout<<" ";
                    }
                    for(j=i/2;j>=1;j--)
                    {
                        cout<<"█";
                    }
                    cout<<endl;
                }
                Sleep(100);
                if(i<n*2)
                {
                    system("cls");
                }
            }
            system("cls");
            for(i=n*2;i>=0;i-=2)
            {
                for(ij=1;ij<=7;ij++)
                {
                    for(j=i/2;j>=1;j--)
                    {
                        cout<<"█";
                    }
                    for(j=1;j<=14-i;j++)
                    {
                        cout<<" ";
                    }
                    for(j=i/2;j>=1;j--)
                    {
                        cout<<"█";
                    }
                    cout<<endl;
                }
                Sleep(400);
                system("cls");
            }
            cout<<"  ■■■■■"<<endl;
            cout<<" ■■■■■■"<<endl;
            cout<<"■▓ ■■■▓ ■"<<endl;
            cout<<"■■■■■■■"<<endl;
            cout<<"■■■■■■■"<<endl;
            cout<<" ■▂ ▂ ▂ ▂ ■"<<endl;
            cout<<"  ■■■■■" <<endl;
            Sleep(500);
            system ("cls");
            system ("color 04");
            cout<<"随着你的尖叫,远处传来神秘人得意的笑声,你知道,你再也无法复仇了。"; 
            return 0;
        }
        if(a1[n][2]==0)
        {
            Sleep(500);
            for(i=0;i<=14;i+=2)
            {
                for(ij=1;ij<=7;ij++)
                {
                    for(j=i/2;j>=1;j--)
                    {
                        cout<<"█";
                    }
                    for(j=1;j<=14-i;j++)
                    {
                        cout<<" ";
                    }
                    for(j=i/2;j>=1;j--)
                    {
                        cout<<"█";
                    }
                    cout<<endl;
                }
                Sleep(100);
                system("cls");
            }
            Sleep(300);
            system("cls");
        }
        if(a1[n][2]==2)
        {
            cout<<"这里有一条路。"<<endl;
            cout<<"1.去。"<<endl<<"2.不去。"<<endl;
            cin>>m;
            if(m>2)
            {
                cout<<"你是**吧!";
                return 0;
            }
            system("cls");
            if(m==1)
            {
                Sleep(1000);
                system("cls");
                cout<<"  ■■■■■"<<endl;
                cout<<" ■■■■■■"<<endl;
                cout<<"■▓ ■■■▓ ■"<<endl;
                cout<<"■■■■■■■"<<endl;
                cout<<"■■■■■■■"<<endl;
                cout<<" ■▂ ▂ ▂ ▂ ■"<<endl;
                cout<<"  ■■■■■" <<endl;
                Sleep(500);
                system ("cls");
                system ("color 04");
                cout<<"随着你的尖叫,远处传来神秘人得意的笑声,你知道,是你的好奇心害了自己。"; 
                return 0;
             }
             else
             {
                nm=rand()%2+1;
                if(nm==1)
                {
                    for(i=0;i<=14;i+=2)
                    {
                        for(ij=1;ij<=7;ij++)
                        {
                            for(j=i/2;j>=1;j--)
                            {
                                cout<<"█";
                            }
                            for(j=1;j<=14-i;j++)
                            {
                                    cout<<" ";
                            }
                            for(j=i/2;j>=1;j--)
                            {
                                cout<<"█";
                            }
                            cout<<endl;
                        }
                        Sleep(100);
                        system("cls");
                    }
                    system("cls");
                }
                else
                {
                    n=rand()%6+1;
                    for(i=0;i<=n*2;i+=2)
                    {
                        for(ij=1;ij<=7;ij++)
                        {
                            for(j=i/2;j>=1;j--)
                            {
                                cout<<"█";
                            }
                            for(j=1;j<=14-i;j++)
                            {
                            cout<<" ";
                            }
                            for(j=i/2;j>=1;j--)
                            {
                                cout<<"█";
                            }
                            cout<<endl;
                        }
                        Sleep(100);
                        if(i<n*2)
                        {
                            system("cls");
                        }
                    }
                    system("cls");
                    for(i=n*2;i>=0;i-=2)
                    {
                        for(ij=1;ij<=7;ij++)
                        {
                            for(j=i/2;j>=1;j--)
                            {
                                cout<<"█";
                            }
                            for(j=1;j<=14-i;j++)
                            {
                                cout<<" ";
                            }
                            for(j=i/2;j>=1;j--)
                            {
                                cout<<"█";
                            }
                            cout<<endl;
                        }
                        Sleep(400);
                        system("cls");
                    }
                    cout<<"  ■■■■■"<<endl;
                    cout<<" ■■■■■■"<<endl;
                    cout<<"■▓ ■■■▓ ■"<<endl;
                    cout<<"■■■■■■■"<<endl;
                    cout<<"■■■■■■■"<<endl;
                    cout<<" ■▂ ▂ ▂ ▂ ■"<<endl;
                    cout<<"  ■■■■■" <<endl;
                    Sleep(500);
                    system ("cls");
                    system ("color 04");
                    cout<<"随着你的尖叫,远处传来神秘人得意的笑声,你知道,你再也无法复仇了。"; 
                    return 0;
                }
             }
        }
        if(a1[n][2]==3)
        {
            cout<<"这里有一条路。"<<endl;
            cout<<"1.去。"<<endl<<"2.不去。"<<endl;
            cin>>m;
            system("cls");
            if(m==1)
            {
                Sleep(1000);
                system("color 4E");
                cout<<"你逃了出来,原来神秘人是你的小学同桌,你一怒之下把他杀了,警察将你逮捕归案,你被执行死刑。";
                return 0;
            }
            if(m==2)
            {
                system("color 8F");
                cout<<"你被困在了电梯里,远处传来神秘人得意的笑声,你知道,你再也无法复仇了。";
                return 0;
            }
        }
        cout<<"现在你要去几楼?"<<endl;
        for(i=1;i<=10;i++)
        {
            if(f[i]==0)
            {
                cout<<i<<" ";
            }
        }
        cout<<endl;
        cin>>n;
        if(n>11||f[n]==1)
        {
            cout<<"你是**吧";
            return 0; 
         } 
        f[n]=1;
        system("cls");
    }
}

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值