#QY0044. Game For Peace - Lite version

Game For Peace - Lite version

Game For Peace - Lite version

最近 @ 迷上了和平精英这款游戏

决定用C++做一款和平精英

源码:

#include <iostream>
#include <cstdlib>
#include <unistd.h>
#include <iomanip>
#include <stdio.h>
#include <string.h>
#include <bits/stdc++.h>
using namespace std;
void jun()
{
   system("export TERM=xterm && clear");
   sleep(1.5);
   cout << "╔══════════════════════════╗"<< endl;
   cout << "║         光子出品         ║" << endl;
   cout << "║                          ║" << endl;
   cout << "║                          ║" << endl;
   cout << "╚══════════════════════════╝"<< endl;
   sleep(1);
   system("export TERM=xterm && clear"); 
   cout << "╔══════════════════════════╗"<< endl;
   cout << "║        光子 出品         ║" << endl;
   cout << "║     军                   ║" << endl;
   cout << "║                          ║" << endl;
   cout << "╚══════════════════════════╝"<< endl;
   sleep(1);
   system("export TERM=xterm && clear"); 
   cout << "╔══════════════════════════╗"<< endl;
   cout << "║       光子 出品          ║" << endl;
   cout << "║     军  事               ║" << endl;
   cout << "║                          ║" << endl;
   cout << "╚══════════════════════════╝"<< endl;
   sleep(1);
   system("export TERM=xterm && clear"); 
   cout << "╔══════════════════════════╗"<< endl;
   cout << "║       光子 出品           ║" << endl;
   cout << "║     军  事  演           ║" << endl;
   cout << "║                          ║" << endl;
   cout << "╚══════════════════════════╝"<< endl;
   sleep(1);
   system("export TERM=xterm && clear"); 
   cout << "╔══════════════════════════╗"<< endl;
   cout << "║       光子  出品         ║" << endl;
   cout << "║     军  事  演  习       ║" << endl;
   cout << "║                          ║" << endl;
   cout << "╚══════════════════════════╝"<< endl;
   sleep(3);
 
   cout << "\033[1;32m\033[1;42m\033[1;36m抵制不良游戏,拒绝盗版游戏。\n注意自我保护,谨防受骗上当。\n适度游戏益脑,沉迷游戏伤身。\n合理安排时间 享受健康生活 \n\033[0m";
   sleep(2);
   system("export TERM=xterm && clear");
   cout << "加载中" << endl;
}
 
 
int main()
{
    system("export TERM=xterm && clear"); 
   cout<<"声明:感谢大家的支持!军事演习正式成立为绝地求生,感谢参与测试的所有玩家。";
    sleep(4);
    system("export TERM=xterm && clear"); 
    cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<" "<<"\033[1;37m"<<"                   "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
    cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"  "<<"\033[1;37m"<<"                  "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
   cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"   "<<"\033[1;37m"<<"                 "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
 cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"    "<<"\033[1;37m"<<"                "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
   cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"     "<<"\033[1;37m"<<"               "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
   cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"      "<<"\033[1;37m"<<"              "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
 cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"       "<<"\033[1;37m"<<"             "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
    cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"        "<<"\033[1;37m"<<"            "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
    cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"         "<<"\033[1;37m"<<"           "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"          "<<"\033[1;37m"<<"          "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
  cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"           "<<"\033[1;37m"<<"         "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
 cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"            "<<"\033[1;37m"<<"        "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"             "<<"\033[1;37m"<<"       "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
   cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"              "<<"\033[1;37m"<<"      "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
   cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"               "<<"\033[1;37m"<<"     "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
   cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"                "<<"\033[1;37m"<<"    "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
 cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"                 "<<"\033[1;37m"<<"   "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
 cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"                  "<<"\033[1;37m"<<"  "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
    cout<<"加载中···\n";
    cout<<"\033[1;36m"<<"\033[1;7m"<<"                   "<<"\033[1;37m"<<" "<<endl;
    usleep(50000);
    system("export TERM=xterm && clear");
    usleep(250000);
    cout<<"\033[0m";
    system("export TERM=xterm && clear"); 
  
        system("export TERM=xterm && clear"); 
  
         system("export TERM=xterm && clear"); 
         cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<" "<<"\033[1;37m"<<"                                                 "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
         cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"  "<<"\033[1;37m"<<"                                                "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
        cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"        "<<"\033[1;37m"<<"                                          "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
 cout<<"\033[0m”下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"         "<<"\033[1;37m"<<"                                         "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
        cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"          "<<"\033[1;37m"<<"                                        "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
        cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                "<<"\033[1;37m"<<"                                  "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
 cout<<"\033[0m”下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                 "<<"\033[1;37m"<<"                                 "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
         cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                  "<<"\033[1;37m"<<"                                "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
         cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                        "<<"\033[1;37m"<<"                          "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
cout<<"\033[0m”下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                         "<<"\033[1;37m"<<"                         "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
  cout<<"\033[0m”下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                          "<<"\033[1;37m"<<"                        "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
 cout<<"\033[0m”下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                                "<<"\033[1;37m"<<"                  "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                                 "<<"\033[1;37m"<<"                 "<<endl;
         usleep(660000);
         system("expor TERM=xterm && clear");
        cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                                  "<<"\033[1;37m"<<"                "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
        cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                                        "<<"\033[1;37m"<<"          "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
        cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                                         "<<"\033[1;37m"<<"         "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
 cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                                          "<<"\033[1;37m"<<"        "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
 cout<<"\033[0m下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                                                "<<"\033[1;37m"<<"  "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
         cout<<"\033[0m”下载中···\n";
         cout<<"\033[1;36m"<<"\033[1;7m"<<"                                                 "<<"\033[1;37m"<<" "<<endl;
         usleep(660000);
         system("export TERM=xterm && clear");
         usleep(2660000);
 
cout<<"\033[0m";
 
    cout << "欢迎来到军事演习\n\n\n\n";
    sleep(2.5);
	//cout << "稍等`````````````````````\n1.0.2版本\n1.添加雨林地图\n2.雨林地图升级(内测)";
//	sleep(2.5);
	system("export TERM=xterm && clear"); 
	cout<<"\033[31m"<<"\n\n\n\n\n      警告?!\n版权归属ypa 出品 "<<"\033[31m"<<"请勿抄袭!\n如有冒犯您的版权,请及时与我们联系!敬谢!";
	sleep(5.5);
	cout<<"\033[31m";
	jun();
	system("export TERM=xterm && clear");
    cout<<"  1、微信登陆   2、QQ登陆"<<endl;
    cout<<"??  开始表示我以详细阅读并同意  游戏许可\033[1;36m《用户使用权与用户##权》\033[1;37m 政策"<<endl;
    int r;
    cout<<"请选择:模式\n\n";
    usleep(300000);
    cout<<"演习模式=1  练习模式=2  特种兵任务模式=3\n";
    int q;
    cin>>q;
    if(q==1)
    {
        cout<<"请选择实战目的地";
    
    cout<<"1=乡村小道   2=沙漠之战   3.热带雨林";
    int r1;
    cin>>r1;
    if(r1==1)
    {
        srand(time(0));
      int cz=rand()%2;
      if(cz==1) 
      {
        cout<<"你以上飞机,跳哪里?"<<endl;
        sleep(1);
        cout<<"跳学校的选1;跳防空洞的选2;跳出生岛选3"<<endl;
        int s;
        cin>>s;
        if(s==3)
        {
            cout<<"你成功落地,突然到了1v1的时刻,原来那位得对手是挂,你武装自己找到了AWM+M249,这是次发现了他,但他没有发现你,用M249打人的用1;AWM选2;"<<endl;
        }
        else
        {
            cout<<"你落地成盒,原来遇到挂了";
            return 0;
        }
        int t;
        cin>>t;
        if(t==1)
        {
            cout<<"由于后坐力太大,没有打准;他发现了你,你m249没子弹了,你刚想用AWM被他打死了";
            cout<<"2/99";
            return 0;
        }
        else if(t==2)
        {
            cout<<"你打死了挂,为了国家的守卫,你竭尽全力!";
            cout<<"大吉大利,国家精英";
            cout<<"1/99";
            return 0;
        }
      }
    }
    else if(r1==2)
    {
        cout << "  你跳下去了,你开不开伞?开回1,不开回2." << endl;
        int u;
        cin >> u;
        if(u==1)
        {
            cout << "  你刚刚打开伞,落地成盒(系统有BUG).\n99/99" << endl;
            sleep(3);
            return 0;
        }
        else if(u==2)
        {
            cout << "  系统帮你打开了伞,你落到了地上." << endl;
            sleep(3);
        }
        else
        {
            cout << "  请重做!" << endl;
            sleep(2);
            return 0;
        }    
    cout << "  你落在了一座房子前,你进不进去?进回1,不进回2." << endl;
    int v;
    cin >> v;
    if(v==1)
    {
        cout << "  房子里有许多武器,但是里面也有许多敌人,因为那是敌人的圈套,你中了圈套,你挂了." << endl;
        sleep(5);
        return 0;
    }
    else if(v==2)
    {
        cout << "  原来,那是敌人的圈套,恭喜你,你活了下来." << endl;
        sleep(3);
    }
    else
    {
        cout << "  请重做!" << endl;
        sleep(2);
        return 0;
    }    
    cout << "  这时,一个全副武装的人进去了,并在里面扔了一个手榴弹." << endl;
    sleep(3);
    cout << "  那个人和里面的敌人都死了." << endl;
    sleep(2);
    cout << "  现在你进不进去?进回1,找个地方躲起来看看还有没有人回2." << endl;
    int w;
    cin >> w;
    if(w==1)
    {
        cout << "  你真幸运,你捡到了三级包,三级甲,三级头,平底锅,AWM,3个手榴弹,好多发AWM子弹." << endl;
        sleep(5);
    }
    else if(w==2)
    {
        cout << "  你在找地方的过程中被敌人干死了." << endl;
        sleep(3);
        return 0;
    }
    else
    {
        cout << "  请重做!" << endl;
        sleep(2);
        return 0;
    }    
    cout << "  现在,你要去跑毒." << endl;
    sleep(2);
    cout << "  你发现离你不远有辆车,车在轰炸区里,去跑安全区回1,到那辆车那回2." << endl;
    int x;
    cin >> x;
    if(x==1)
    {
        cout << "  你跑到了轰炸区,你挂了." << endl;
        sleep(2);
        return 0;
    }
    else if(x==2)
    {
        cout << "  你在向车跑时捡到一个医疗包,之后上了车,抵达了安全区." << endl;
        sleep(3);
    }    
    else
    {
        cout << "  请重做!" << endl;
        sleep(2);
        return 0;
    }
    cout << "  你下车了,轰炸区也散了." << endl;
    sleep(2);
    cout << "  你治好了自己,你是向东走,还是向西,还是向北,还是向南?向东回1,向西回2,向北回3,向南回4." << endl;
    int y;
    cin >> y;
    if(y==1)
    {
        cout << "  你真不幸,你跑到了轰炸区,你凉了." << endl;
        sleep(3);
        return 0;
    }
    else if(y==2)
    {
        cout << "  你好倒霉,你遇见了堵路的,你成死了." << endl;
        sleep (3);
        return 0;
    }
    else if(y==3)
    {
        cout << "  你往北跑,什么也没发生." << endl;
        sleep(3);
    }
    else if(y==4)
    {
        cout << "  我的天,你被空投砸死了." << endl;
        sleep(3);
        return 0;
    }
    else
    {
        cout << "  请重做!" << endl;
        sleep(2);
        return 0;
    }
    cout << "  这时,空投砸脸了." << endl;
    sleep(2);
    cout << "  很多人都去了,你去不去?去回1,不去回2." << endl;
    int z;
    cin >> z;
    if(z==1)
    {
        cout << "  你在抢空投大战中牺牲了." << endl;
        sleep(3);
        return 0;
    }
    else if(z==2)
    {
        cout << "  你躲过了抢空投大战,你活了下来." << endl;
        sleep(3);
    }
    else
    {
        cout << "  请重做!" << endl;
        sleep(2);
        return 0;
    }
    cout << "  抢空投大战中有一个胜利者." << endl;
    sleep(3);
    cout << "  现在只有2个人了,除了你,就是那个胜利者." << endl;
    sleep(3);
    cout << "  那个胜利者是你的敌人." << endl;
    sleep(2);
    cout << "  你直接拿kar-98K跟他干回1,逃跑回2." << endl;
    int aa;
    cin >> aa;
    if(aa==1)
    {
        cout << "  你们俩激战……" << endl;
        sleep(2);
        cout << "  突然,他跑了,你追不追他?追回1,不追回2." << endl;
        int ab;
        cin >> ab;
        if(ab==1)
        {
            cout << "  你被他带到了轰炸区,你凉了,差一点就吃鸡了." << endl;
            sleep(3);
            return 0;
        }
        else if(ab==2)
        {
            cout << "  他自己跑到了轰炸区,把自己弄死了." << endl;
            sleep(3);
        }
        else
        {
            cout << "  请重做!" << endl;
            sleep(2);
            return 0;
        }
    }
    else if(aa==2)
    {
        cout << " 轰炸区,你凉了." << endl;
        sleep(2);
        return 0;
    }
    else
    {
        cout << "  请重做!" << endl;
        sleep(2);
        return 0;
    }
    cout<<"你为了国家的守卫,你竭尽全力!";
    cout<<"大吉大利,国家精英";
    cout<<"1/99";
    }
    else if(r1==3)
    {
    int y;
    cin>>y;
    cout<<"";
    cout<<"你一上飞机";
    cout<<"跳那?(1==码头 2==天堂度假村 3==靶场)";
    int ca;
    cin>>ca;
    if(ca==2)
    {
        cout<<"你的飞行速度165km/S,开伞吗?(开伞==1 不开伞==2)";
        int cb;
        cin>>cb;
        if(cb==2)
        {
            cout<<"不开伞,你死了\n100/101";
        }
        else if(cb==1)
        {
            cout<<"你成功落地.\n在油桶里搜集物质==1,c字楼选2";
        }
        int cc;
        cin>>cc;
        if(cc==2)
        {
            cout<<"你找到了一把DP-28轻机枪与P29.\n你刚来到的外面就被一个赤手空拳的人打死你\n80/99";
            return 0;
        }
        else if(cc==1)
        {
            cout<<"你找到UZI冲锋枪与Kar-98K";
            cout<<"你现在去哪?1==码头 2==靶场";
            int ad;
            cin>>ad;
            if(ad==1)
            {
                cout<<"那是##,你死了";
                return 0;
            }
            else if(ad==2)
            {
                cout<<"你在路上跑的,被一个人使用AWM狙击式步枪淘汰!9/101";
                return 0;
            }
        }
    }
    //
    else if(ca==3)
    {
        cout<<"你找到了AKM突击步枪";
        cout<<"保护区在坐标123,432-234,234海拔222m。去吗?yes/no";
        string ae;
        cin>>ae;
        if(ae=="yes")
        {
            cout<<"你到达了";
            cout<<"\033[31m"<<"您已进入前三,您已胜利继续游戏吗?(yes/ no)";
            {
                string af;
                cin>>af;
                if(af=="yes")
                {
                   cout<<"\033[37m";
                   cout<<"到了紧张的1V1的环节,您发现他在115方向,扔雷==1 摸过去==2"; 
                   int ag;
                   cin>>ag;
                    cout<<"\033[31m";
                   if(ag==1)
                   {
                       cout<<"你为了国家的守卫,你竭尽全力!";
    cout<<"大吉大利,国家精英";
    cout<<"1/101";
                       cout<<"";
                   }
                   else
                   {
                       cout<<"";
                cout<<"大吉大利,国家精英";
                cout<<"2/101";
                   }
                }
                else
                {
                    cout<<"大吉大利,国家精英";
                cout<<"3/101";
                }
            //cout<<"\033[37m";
            }
        }
        else
        {
            cout<<"##以来,Game Ove,6/101";
            return 0;
        }
    }
    else if(ca==1)
    {
        cout<<"你什么也没捡到,被人突突死了 88/101";
        return 0;
    }
    }
    }
    else if(q==2)
    {
        cout<<"敬请期待~";
        return 0;
    }
    else if(q==3)
    {
        cout<<"敬请期待~";
        return 0;
    }
    return 0;
}

以上仅供参考,测试数据如下:

输出格式

只有一个整数,表示 @ 666

输入数据 1

no input!

输出数据 1

Ура666

下期再见!