高级天翼
#include<bits/stdc++.h>
#include<iostream>
#include<ctime>
#include<windows.h>
#include<string>
using namespace std;
int abc;
string asdf;
int main()
{
int qwertyuiop;
cout<<"你需要看前篇吗? 1.需要 2.不需要\n";
cin>>qwertyuiop;
if(qwertyuiop==2)
{
goto alsk;
}
system("cls");
system("color 01");
cout<<"\n\n\n\n系";
Sleep(200);
cout<<"统";
Sleep(200);
cout<<":";
Sleep(200);
cout<<" ";
Sleep(200);
cout<<" ";
Sleep(400);
cout<<"你";
Sleep(200);
cout<<"好";
Sleep(200);
cout<<"!";
Sleep(400);
cout<<"欢";
Sleep(200);
cout<<"迎";
Sleep(200);
cout<<"你";
Sleep(200);
cout<<"进";
Sleep(200);
cout<<"入";
Sleep(200);
cout<<"本";
Sleep(200);
cout<<"游";
Sleep(200);
cout<<"戏";
Sleep(200);
cout<<",";
Sleep(400);
cout<<"准";
Sleep(200);
cout<<"备";
Sleep(200);
cout<<"好";
Sleep(200);
cout<<"了";
Sleep(200);
cout<<"吗";
Sleep(200);
cout<<"?";
Sleep(400);
cout<<"开";
Sleep(200);
cout<<"始";
Sleep(200);
cout<<"!";
Sleep(2000);//等待1秒
system("cls");
cout<<"\n\n\n\n**: 还有 5 秒开始。";
Sleep(1000);
system("cls");
cout<<"\n\n\n\n**: 还有 4 秒开始。";
Sleep(1000);
system("cls");
cout<<"\n\n\n\n**: 还有 3 秒开始。";
Sleep(1000);
system("cls");
cout<<"\n\n\n\n**: 还有 2 秒开始。";
Sleep(1000);
system("cls");
cout<<"\n\n\n\n**: 还有 1 秒开始。";
Sleep(1000);
system("cls");
cout<<"\n\n\n\n**: 开始!";
Sleep(1000);
system("cls");
cout<<"\n\n\n\n欢";
Sleep(200);
cout<<"迎";
Sleep(200);
cout<<"来";
Sleep(200);
cout<<"到";
Sleep(200);
cout<<"本";
Sleep(200);
cout<<"游";
Sleep(200);
cout<<"戏";
Sleep(200);
cout<<"!";
Sleep(2000);
system("cls");
cout<<"\n\n\n\n这";
Sleep(200);
cout<<"里";
Sleep(200);
cout<<"是";
Sleep(200);
cout<<"猜";
Sleep(200);
cout<<"数";
Sleep(200);
cout<<"游";
Sleep(200);
cout<<"戏";
Sleep(200);
cout<<"5";
Sleep(200);
cout<<".";
Sleep(200);
cout<<"3";
Sleep(200);
cout<<"7";
Sleep(200);
cout<<"版";
Sleep(200);
cout<<",";
Sleep(400);
cout<<"祝";
Sleep(200);
cout<<"你";
Sleep(200);
cout<<"玩";
Sleep(200);
cout<<"的";
Sleep(200);
cout<<"开";
Sleep(200);
cout<<"心";
Sleep(200);
cout<<"!";
Sleep(400);
cout<<"\n ——";
Sleep(200);
cout<<"系";
Sleep(200);
cout<<"统";
Sleep(5000);
alsk:
system("cls");
system("color 03");
cout<<"\n\n**: 请输入您的名字:\n ";
cin>>asdf;
cout<<"\n\n**: 加油,"<<asdf<<"!";
Sleep(2345);
system("cls");
system("color 04");
system("cls");
cout<<"\n\n\n\n**: 正在为您准备主页 %"<<10;
Sleep(300);
system("cls");
cout<<"\n\n\n\n**: 正在为您准备主页 %"<<20;
Sleep(300);
system("cls");
cout<<"\n\n\n\n**: 正在为您准备主页 %"<<30;
Sleep(300);
system("cls");
cout<<"\n\n\n\n**: 正在为您准备主页 %"<<40;
Sleep(300);
system("cls");
cout<<"\n\n\n\n**: 正在为您准备主页 %"<<50;
Sleep(600);
system("cls");
cout<<"\n\n\n\n**: 正在为您准备游戏 %"<<60;
Sleep(300);
system("cls");
cout<<"\n\n\n\n**: 正在为您准备游戏 %"<<70;
Sleep(300);
system("cls");
cout<<"\n\n\n\n**: 正在为您准备游戏 %"<<80;
Sleep(300);
system("cls");
cout<<"\n\n\n\n**: 正在为您准备游戏 %"<<90;
Sleep(300);
system("cls");
cout<<"\n\n\n\n**: 正在为您准备游戏 %"<<100;
Sleep(300);
system("cls");
system("cls");
jk:
system("color 02");
cout<<"\n\n 主页";
Sleep(500);
cout<<"\n\n\n 1----猜数游戏(简单版)\n";
Sleep(500);
cout<<" 2----猜数游戏(困难版)\n";
Sleep(500);
cout<<" 3----猜数游戏(超困难版)\n";
Sleep(500);
cout<<" 4----猜数游戏(无敌困难版)\n";
Sleep(500);
cout<<" 5----猜数游戏(别玩了!'猜错会关机!')\n";
Sleep(500);
cout<<" 6----关机\n";
Sleep(500);
cout<<" 7----离开\n";
Sleep(500);
cout<<" 请输入:\n";
cout<<" ";
cin>>abc;
if(abc==1)
{
system("cls");
system("color 03");
int i;
cout<<" 欢迎来到本游戏!!!";
Sleep(2000);
system("cls");
for(int i=1;i<=100;i++)
{
system("cls");
cout<<" 正在载入游戏,请稍等 %"<<i;
Sleep(1);
}
cout<<endl<<" 游戏加载成功!";
Sleep(2000);
system("cls");
int hp=10;
cout<<endl<<" 欢迎来到“猜数游戏(简单版)”!!!"<<endl;
Sleep(2000);
system("cls");
while(1)
{
int a,MIN=1,MAX=100;
srand((int)time(NULL));
int ans=MIN+rand()%(MAX-MIN+1);
//随机生成一个整数,范围在MIN(1)-MAX(100)
cout<<" 猜数游戏(简单版)\n\n";
for(int i=1;i<=hp;i++)
{
cout<<" HP:"<<hp-i+1<<endl;
cout<<" 请输入一个在"<<MIN<<"~"<<MAX<<"间的数:"<<endl;
cin>>a;
if(a==0)
{
system("cls");
Sleep(1000);
cout<<" 恭喜你发现彩蛋!";
hp+=10;
i--;
continue;
}
if(a==ans&&i==1)
{
cout<<" 运气爆表!一次就对了!o(n_n)o~\n";
break;
}
else if(a==ans&&i>1)
{
cout<<" 猜到了!o(n_n)o-\n";
break;
}
else if(a>ans&&hp>0)
{
cout<<" 数字大了点!"<<endl;
}
else if(a<ans&&hp>0)
{
cout<<" 数字小了点!"<<endl;
}
}
cout<<" 是"<<ans<<"。";
Sleep(1000);
system("cls");
char jx;
cout<<" 想再玩么?(Y & N)"<<endl;
cin>>jx;
if(jx=='Y')
{
system("cls");
}
if(jx=='N')
{
cout<<" Bye~Bye~"<<endl;
system("pause");
system("cls");
goto jk;
}
}
}
else if(abc==2)
{
system("cls");
system("color 03");
int i;
cout<<" 欢迎来到本游戏!!!";
Sleep(2000);
system("cls");
for(int i=1;i<=100;i++)
{
system("cls");
cout<<" 正在载入游戏,请稍等 %"<<i;
Sleep(1);
}
cout<<endl<<" 游戏加载成功!";
Sleep(2000);
system("cls");
int hp=10;
cout<<endl<<" 欢迎来到“猜数游戏(困难版)”!!!"<<endl;
Sleep(2000);
system("cls");
while(1)
{
int a,MIN=1,MAX=5000;
srand((int)time(NULL));
int ans=MIN+rand()%(MAX-MIN+1);
cout<<" 猜数游戏(困难版)\n\n";
for(int i=1;i<=hp;i++)
{
cout<<" HP:"<<hp-i+1<<endl;
cout<<" 请输入一个在"<<MIN<<"~"<<MAX<<"间的数:"<<endl;
cin>>a;
if(a==0)
{
system("cls");
Sleep(1000);
cout<<" 恭喜你发现彩蛋!";
hp+=5;
i--;
continue;
}
if(a==ans&&i==1)
{
cout<<" 运气爆表!一次就对了!o(n_n)o~\n";
break;
}
else if(a==ans&&i>1)
{
cout<<" 猜到了!o(n_n)o-\n";
break;
}
else if(a>ans&&hp>0)
{
cout<<" 数字大了点!"<<endl;
}
else if(a<ans&&hp>0)
{
cout<<" 数字小了点!"<<endl;
}
}
cout<<" 是"<<ans<<"。";
Sleep(1000);
system("cls");
char jx;
cout<<" 想再玩么?(Y & N)"<<endl;
cin>>jx;
if(jx=='Y')
{
system("cls");
}
if(jx=='N')
{
cout<<" Bye~Bye~"<<endl;
system("pause");
system("cls");
goto jk;
}
}
}
else if(abc==3)
{
system("cls");
system("color 03");
int i;
cout<<" 欢迎来到本游戏!!!";
Sleep(2000);
system("cls");
for(int i=1;i<=100;i++)
{
system("cls");
cout<<" 正在载入游戏,请稍等 %"<<i;
Sleep(1);
}
cout<<endl<<" 游戏加载成功!";
Sleep(2000);
system("cls");
int hp=5;
cout<<endl<<" 欢迎来到“猜数游戏(超困难版)”!!!"<<endl;
Sleep(2000);
system("cls");
while(1)
{
int a,MIN=1,MAX=2000;
srand((int)time(NULL));
int ans=MIN+rand()%(MAX-MIN+1);
cout<<" 猜数游戏(超困难版)\n\n";
for(int i=1;i<=hp;i++)
{
cout<<" HP:"<<hp-i+1<<endl;
cout<<" 请输入一个在"<<MIN<<"~"<<MAX<<"间的数:"<<endl;
cin>>a;
if(a==0)
{
system("cls");
Sleep(1000);
cout<<" 恭喜你发现彩蛋!";
hp+=1;
i--;
continue;
}
if(a==ans&&i==1)
{
cout<<" 运气爆表!一次就对了!o(n_n)o~\n";
break;
}
else if(a==ans&&i>1)
{
cout<<" 猜到了!o(n_n)o-\n";
break;
}
else if(a>ans&&hp>0)
{
cout<<" 数字大了点!"<<endl;
}
else if(a<ans&&hp>0)
{
cout<<" 数字小了点!"<<endl;
}
}
cout<<" 是"<<ans<<"。";
Sleep(1000);
system("cls");
char jx;
cout<<" 想再玩么?(Y & N)"<<endl;
cin>>jx;
if(jx=='Y')
{
system("cls");
}
if(jx=='N')
{
cout<<" Bye~Bye~"<<endl;
system("pause");
system("cls");
goto jk;
}
}
}
else if(abc==4)
{
system("cls");
system("color 03");
int i;
cout<<" 欢迎来到本游戏!!!";
Sleep(2000);
system("cls");
for(int i=1;i<=100;i++)
{
system("cls");
cout<<" 正在载入游戏,请稍等 %"<<i;
Sleep(1);
}
cout<<endl<<" 游戏加载成功!";
Sleep(2000);
system("cls");
int hp=2;
cout<<endl<<" 欢迎来到“猜数游戏(无敌困难版)”!!!"<<endl;
Sleep(2000);
system("cls");
while(1)
{
int a,MIN=1,MAX=2000;
srand((int)time(NULL));
int ans=MIN+rand()%(MAX-MIN+1);
cout<<" 猜数游戏(无敌困难版)\n\n";
for(int i=1;i<=hp;i++)
{
cout<<" HP:"<<hp-i+1<<endl;
cout<<" 请输入一个在"<<MIN<<"~"<<MAX<<"间的数:"<<endl;
cin>>a;
if(a==ans&&i==1)
{
cout<<" 运气爆表!一次就对了!o(n_n)o~\n";
break;
}
else if(a==ans&&i>1)
{
cout<<" 猜到了!o(n_n)o-\n";
break;
}
else if(a>ans&&hp>0)
{
cout<<" 数字大了点!"<<endl;
}
else if(a<ans&&hp>0)
{
cout<<" 数字小了点!"<<endl;
}
}
cout<<" 是"<<ans<<"。";
Sleep(1000);
system("cls");
char jx;
cout<<" 想再玩么?(Y & N)"<<endl;
cin>>jx;
if(jx=='Y')
{
system("cls");
}
if(jx=='N')
{
cout<<" Bye~Bye~"<<endl;
system("pause");
system("cls");
goto jk;
}
}
}
else if(abc==5)
{
system("cls");
system("color 03");
int i;
cout<<" 欢迎来到本游戏!!!";
Sleep(2000);
system("cls");
for(int i=1;i<=100;i++)
{
system("cls");
cout<<" 正在载入游戏,请稍等 %"<<i;
Sleep(1);
}
cout<<endl<<" 游戏加载成功!";
Sleep(2000);
system("cls");
int hp=1;
cout<<endl<<" 欢迎来到“猜数游戏(别玩了)”!!!"<<endl;
Sleep(2000);
system("cls");
while(1)
{
int a,MIN=1,MAX=20;
srand((int)time(NULL));
int ans=MIN+rand()%(MAX-MIN+1);
cout<<" 猜数游戏(别玩了)\n\n";
for(int i=1;i<=hp;i++)
{
cout<<" HP:"<<hp-i+1<<endl;
cout<<" 请输入一个在"<<MIN<<"~"<<MAX<<"间的数:"<<endl;
cin>>a;
if(a==ans&&i==1)
{
cout<<" 运气爆表!对了!o(n_n)o~\n";
break;
}
else if(a>ans&&hp>0)
{
cout<<" 数字大了点!"<<endl;
cout<<"\n 是"<<ans<<"。";
Sleep(4000);
system("cls");
goto aaaabbbb;
}
else if(a<ans&&hp>0)
{
cout<<" 数字小了点!"<<endl;
cout<<"\n 是"<<ans<<"。";
Sleep(4000);
system("cls");
goto aaaabbbb;
}
}
cout<<"\n 是"<<ans<<"。";
Sleep(1000);
system("cls");
char jx;
cout<<" 想再玩么?(Y & N)"<<endl;
cin>>jx;
if(jx=='Y')
{
system("cls");
}
if(jx=='N')
{
cout<<" Bye~Bye~"<<endl;
system("pause");
system("cls");
goto jk;
}
}
}
else if(abc==6)
{
aaaabbbb:
system("color 01");
cout<<"请等待关机";
for(int cd=1;cd<=10;cd++)
{
Sleep(500);
cout<<".";
}
system("shutdown -s -t 1");
return 0;
}
else if(abc==7)
{
system("cls");
system("color 05");
cout<<endl<<endl<<" 正在退出游戏";
for(int dd=1;dd<=6;dd++)
{
Sleep(100);
cout<<".";
}
system("cls");
cout<<endl<<endl<<" 正在退出游戏";
for(int dd=1;dd<=6;dd++)
{
Sleep(100);
cout<<".";
}
system("cls");
cout<<endl<<endl<<" 正在退出游戏";
for(int dd=1;dd<=6;dd++)
{
Sleep(100);
cout<<".";
}
system("cls");
cout<<endl<<endl<<" 正在退出游戏";
for(int dd=1;dd<=6;dd++)
{
Sleep(100);
cout<<".";
}
system("cls");
cout<<endl<<endl<<" 正在退出游戏";
for(int dd=1;dd<=6;dd++)
{
Sleep(100);
cout<<".";
}
system("cls");
Sleep(800);
cout<<endl<<endl<<" 退出成功!";
Sleep(2000);
goto leader;
}
else
{
system("cls");
system("color 05");
cout<<"\n\n\n\n**: !!!未开放!!!";
Sleep(5000);
system("cls");
goto jk;
}
leader:
return 0;
}
新手光能
#include<bits/stdc++.h>
#include<windows.h>
#include<time.h>
#include<conio.h>
using namespace std;
int mzhg;
int zd;
int swhm;
int qxs;
int swx;
int sn;
int mp;
int tongguan;
int sw1;
int zd1;
int sn1;
int mz1;
int mp1;
int zbbj;
int ccg;
int mzzd;
int mz;
int tongguan1;
int sw;
int x;
int s;
int cdd;
int jg;
int qiang;
int gun;
int by;
int gjj[100];
int hjj[100];
int zjj[100];
void Slowsay(string a)
{
int l=a.size();
for(int i=0; i<l; i++)
{
cout<<a[i];
Sleep(30);
}
printf("\n");
}
int read()
{
char ch=_getch();
while(ch>'9'||ch<'0') ch=_getch();
return ch-48;
}
void qp()
{
system("cls");
printf("当前你的状态是\n");
printf("子弹 %d,食物 %d\n",zd,sw);
}
int esl()
{
system("cls");
char ch;
Slowsay("你因为食物短缺,饿**了。\n");
ch=_getch();
hjj[1]=1;
Slowsay("Bad End 1\n");
ch=_getch();
s++;
return 0;
}
int mzd()
{
hjj[2]=1;
system("cls");
char ch;
Slowsay("你遭遇了丧尸,因为子弹不足被咬**了。\n");
ch=_getch();
Slowsay("Bad End 2\n");
ch=_getch();
s++;
return 0;
}
int hd1()
{
system("cls");
Slowsay("在某一天,你家门口响起了敲门声,你打开门,外面的发现让你欣喜若狂\n");
Slowsay("**的**部队已经消灭了这个城市的丧尸,\n他们在这个城市的各个角落搜索着可能存在的**者.\n");
Slowsay("Happy End-----苟到最后\n");
if(hjj[3]==1&&gjj[1]==0)
{
Sleep(2000);
Slowsay("获得线索-----速度飘忽不定的**");
}
gjj[1]=1;
}
int hd2()
{
system("cls");
int sw;
char ch;
Slowsay("在与妹子相处的这些时间里,你与她相爱了\n");
Slowsay("你们的生活是那样的幸福\n");
Slowsay("直到有一天......\n");
Slowsay("基地首领希望你去执行一个任务,你选择\n");
Slowsay("1.独自一人前往\n");
Slowsay("2.和妹子一起去\n");
while(true)
{
int x;
x=read();
if(x<1||x>2)
{
Slowsay("请重新输入\n");
continue;
}
if(x==1)
{
Slowsay("当你完成任务回来的时候,发现——\n");
Slowsay("基地被丧尸攻破了\n");
Slowsay("这个基地的所有人都被丧尸杀了,一个人都没跑出来\n");
hjj[4]=1;
Slowsay("Bad End 4");
s++;
}
if(x==2)
{
Slowsay("当你和妹子完成任务回来时,\n");
Slowsay("基地已经变成一片废墟了\n");
Slowsay("你和妹子没有办法,只能到处流浪\n");
Slowsay("不过,两个人总比一个人要好\n");
gjj[2]=1;
Slowsay("Happy End------神仙眷侣");
}
break;
}
return 0;
}
int hd3()
{
system("cls");
char ch;
Slowsay("你就这样平静的生活在这个基地里\n");
Slowsay("直到某一天,大量的丧尸进攻了这里\n");
if(zd>9)
{
Slowsay("每个人都在尽自己的努力去守卫基地\n");
Slowsay("每个人都做到了自己能做到的\n");
Slowsay("最后,奇迹出现了\n");
Slowsay("大家成功守住了基地\n");
Slowsay("而你,也因为在守卫过程中立下大功成为了这个基地的英雄\n");
Slowsay("顺便说一句,到**了你也没女朋友\n");
gjj[3]=1;
Slowsay("Happy End-----英雄不朽");
return 0;
}
Slowsay("丧尸的数量实在太多了,\n");
Slowsay("尽管基地的大家都在尽全力防守\n");
Slowsay("可基地还是被攻破了\n");
Slowsay("而你,也**在了这里\n");
s++;
hjj[5]=1;
Slowsay("Bad End 5");
}
int hd4()
{
system("cls");
Slowsay("在于少年相处的这些时间里");
Slowsay("你尽力地保护着他");
Slowsay("而他也常常给你带来惊喜");
Slowsay("慢慢的,你开始认清你自己");
Slowsay("你是个gay");
Slowsay("于是,你就和少年**福快乐的生活在了一起");
Slowsay("Happy End-----认清自己");
gjj[4]=1;
}
int td()
{
system("cls");
char ch;
Slowsay("那箱饼干与你的枪一起发出了强光\n");
Slowsay("紧接着,他们融为了一体\n");
Slowsay("当光芒散去时,整个**发生了变化\n");
Slowsay("所有的丧尸都变回了人类\n");
Slowsay("True End-----一如既往");
if(zjj[1]!=1)
{
Slowsay("获得线索-----奇特的枪与饼干");
}
zjj[1]=1;
}
int td2()
{
system("cls");
char ch;
Slowsay("你的变异已经开始了");
Slowsay("你开始疯狂的进食,直到把自己的胃撑破");
Slowsay("然后,就眼前一黑失去意识");
Slowsay("再次醒来时,你已经是一个丧尸了");
Slowsay("奇怪的是,你还保留着自己的意识");
Slowsay("你感觉到自己的力气变得更大,速度变得更快");
Slowsay("或许变成丧尸也不错————你这样想着");
Slowsay("True End-----保持本我");
if(zjj[2]!=1)
{
Sleep(2000);
Slowsay("获得线索-----延迟变异的少年");
}
zjj[2]=1;
}
int bd8()
{
Slowsay("坐在椅子上的是一个15岁左右的少年");
Slowsay("正在你因为他的年龄而惊讶时");
Slowsay("少年却站了起来,看向了你身后的妹子");
Slowsay("“差不多了吧”,妹子这样说道");
Slowsay("“可以了”,这是少年的回答");
Slowsay("然后,你就感到脖子一阵剧痛");
Slowsay("在你失去意识前,眼中最后的场景是妹子咬着你的脖子");
s++;
Slowsay("Bad End 8");
if(hjj[8]==0)
{
Sleep(2000);
Slowsay("获得线索-----早已变异的妹子");
}
hjj[8]=1;
}
int td3()
{
system("cls");
Slowsay("你和妹子冲出了丧尸的围杀,");
Slowsay("可是当你们来到那个**者基地时");
Slowsay("却发现那个基地有一些不对");
Slowsay("所有人都**气沉沉的");
Slowsay("你们直接走向了首领的房间");
if(zjj[2]==1&&zjj[3]==1)
{
bd8();
return 0;
}
Slowsay("坐在椅子上的是一个30岁左右的男**");
Slowsay("他说,欢迎");
Slowsay("基地的首领表示可以用子弹交换你手中的食物");
Slowsay("请输入你需要的子弹数");
Slowsay("0");
Slowsay("基地首领希望你加入这个基地");
Slowsay("你的选择是");
Slowsay("1.留在这");
Slowsay("2.离开");
Slowsay("2");
Slowsay("你决定");
Slowsay("1.当天离开");
Slowsay("2.再停留一天");
Slowsay("1");
Slowsay("就在你快要离开的时候,妹子抓住了你的手");
Slowsay("“我喜欢你,别走”,她这样说");
Slowsay("于是,你留了下来");
Slowsay("你们的生活是那样的幸福");
Slowsay("直到有一天......");
Slowsay("基地首领希望你去执行一个任务,你选择");
Slowsay("1.独自一人前往");
Slowsay("2.和妹子一起去");
Slowsay("2");
Slowsay("在执行任务的过程中");
Slowsay("妹子曾被丧尸咬到过一口");
Slowsay("她以为你没有发现");
Slowsay("而你却在远处看到了这一幕");
Slowsay("奇怪的是,她却并没有变异");
Slowsay("当你和妹子完成任务回来时,");
Slowsay("基地已经变成一片废墟了");
Slowsay("你和妹子没有办法,只能到处流浪");
Slowsay("不过,两个人总比一个人要好");
Slowsay("Happy End------神仙眷侣");
Slowsay("???????????????????????????????????");
Slowsay("True End------幻觉");
if(zjj[3]==0)
{
Sleep(2000);
Slowsay("获得线索-----不变异的妹子");
}
zjj[3]=1;
}
int td4()
{
system("cls");
printf("当丧尸危机爆发时,你正呆在家里\n");
char ch=_getch();
ch=_getch();
for(int i=1; i<=50; i++)
{
printf("你的家里是个较为安全的地方,你可以选择搜索你家的物资或是去邻居家看看\n");
Sleep(250-5*i);
system("cls");
printf("********************************************************************\n");
system("cls");
}
printf("检测到不匹配!!!\a\a\a");
Sleep(2000);
ch=_getch();
Slowsay("有什么不对劲");
Slowsay("你这样想着");
Slowsay("过去了好多天,\n你还是一个人都没有遇到,\n除了丧尸就是丧尸");
Slowsay("这一切,就好像被废弃了一样");
Slowsay("\n");
Slowsay("True End------停服");
zjj[4]=1;
if(zbbj==0)
Slowsay("进阶线索-----逐步**近的真相"),zbbj=1;
}
int td5()
{
system("cls");
Slowsay("当少年**去后,整个世界好像变得不同了");
Slowsay("所有的活人在一瞬间消失");
Slowsay("所有的丧尸当场去世");
Slowsay("你的眼前只剩下了黑暗");
Slowsay("不知道过去了多久,你**了");
Slowsay("Bad End......");
system("cls");
printf("当少年**去后,整个世界好像变得不同了\n");
printf("所有的活人在一瞬间消失\n");
printf("所有的丧尸当场去世\n");
printf("你的眼前只剩下了黑暗\n");
printf("不知道过去了多久,你**了\n");
Slowsay("不,还没有结束");
Slowsay("虽然好像和往常**去之后的感觉一样");
Slowsay("但是。。。。。。");
Slowsay("True End-----姗姗来迟的**亡");
s++;
if(zjj[5]==0)
Slowsay("进阶线索-----**亡之后");
zjj[5]=1;
}
int tg3()
{
Slowsay("当你再次睁开眼时");
Slowsay("你发现自己躺在一个营养仓内");
Slowsay("你无比的确认这就是真实的世界");
Slowsay("你打碎了玻璃,跑出了营养仓");
Slowsay("脑中的一切开始明晰起来");
Slowsay("你认为自己知道了一切的真相");
Slowsay("去杀光人类吧!!!!");
Slowsay("你这样想着");
Slowsay("来到了外面这个被丧尸**得满目疮痍的世界");
Slowsay("你熟练的发出嘶吼,呼唤着周围的丧尸");
Slowsay("你指挥着他们,毁掉了一个又一个人类的基地");
Slowsay("虽然,在一个你不知道的地方");
Slowsay("一个个一样的营养仓中,装着一个个一样的你");
Slowsay("---------------游戏进阶剧情通关-------------");
tongguan1=1;
}
int tg2()
{
Slowsay("当你再次睁开眼时");
Slowsay("你发现自己躺在一个营养仓内");
Slowsay("你无比的确认这就是真实的世界");
Slowsay("你打碎了玻璃,跑出了营养仓");
Slowsay("脑中的一切开始明晰起来");
Slowsay("你认为自己知道了一切的真相");
Slowsay("去拯救世界吧!!!!");
Slowsay("你这样想着");
Slowsay("来到了外面这个被丧尸**得满目疮痍的世界");
Slowsay("虽然,在一个你不知道的地方");
Slowsay("一个一样的营养仓中,装着一个一样的你");
Slowsay("---------------游戏进阶剧情通关-------------");
tongguan1=1;
}
int td6()
{
Slowsay("一天以后,少年回来了");
Slowsay("一起回来的还有妹子");
Slowsay("少年的手中拿着你的铭牌");
Slowsay("此时,你才发现你的铭牌不见了");
Slowsay("“没想到是你”");
Slowsay("“妹子神色复杂的看了你一眼”");
Slowsay("“我们是一类人”");
Slowsay("“现在,让我把你带出去吧”");
if(qxs==1)
{
tg2();
return 0;
}
else
{
Slowsay("一股强烈的撕扯感出现到了你身上");
Slowsay("此时的你并不能接受如此巨大的伤害");
Slowsay("你**了");
Slowsay("Bad End 14");
if(hjj[14]==0)
Slowsay("进阶线索-----外面的世界");
hjj[14]=1;
s++;
}
}
int bd6()
{
system("cls");
Slowsay("你感觉到自己正在变异,");
Slowsay("意识开始逐渐模糊起来");
Slowsay("你的肚子正无比渴望着**");
Slowsay("接着,你眼前一黑,再也没有醒来");
s++;
hjj[6]=1;
Slowsay("Bad End 6");
}
int bd3()
{
system("cls");
char ch;
Slowsay("长久的等待终于让你失去了理智,你疯了。\n");
if(mp==-1)
{
Slowsay("当**的**队打开你家的门时,你嘶吼着扑了上去");
if(zd>0)
Slowsay("他们试图将你击毙,却被你提前一枪击倒");
else
{
Slowsay("你被他们击毙了");
Slowsay("Bad End 12");
s++;
hjj[12]=1;
return 0;
}
Slowsay("你如同一个熟练的猎手,狩猎着**队");
Slowsay("当他们全部**去后,你开始享用起你的大餐");
Slowsay("Bad End 13");
if(by==0)
Sleep(2000),Slowsay("进阶线索-----变异是什么时候的事呢"),by=1;
hjj[13]=1;
return 0;
}
Slowsay("Bad End 3\n");
s++;
if(hjj[3]==0&&gjj[1]==1)
{
Sleep(2000);
Slowsay("获得线索-----速度飘忽不定的**");
}
hjj[3]=1;
}
int bd7()
{
s++;
system("cls");
Slowsay("因为食物不足,你被狗咬**了");
Slowsay("Bad End 7");
hjj[7]=1;
}
int bd15()
{
Slowsay("你发现这笔迹有些不对");
Slowsay("就好像是新写上去的一样");
Slowsay("认字迹的话,好像还十分熟悉");
Slowsay("正当你想的入迷的时候,你的脖子被咬住了");
Slowsay("在**前,你隐约听到了少年的声音,“再来一次吧”");
Slowsay("Bad End 15");
if(hjj[15]==0)
{
Sleep(2000);
Slowsay("进阶线索-----真的,假的!");
}
hjj[15]=1;
}
int bd16()
{
system("cls");
Slowsay("你一枪打**了少年");
Slowsay("基地首领以为你疯了,开枪杀了你");
Slowsay("Bad End 16");
}
int bd17()
{
system("cls");
Slowsay("你试图开枪打**少年");
Slowsay("但是被少年发现了");
Slowsay("你被他一口咬**");
Slowsay("Bad End 17");
}
int tgg3()
{
system("cls");
Slowsay("你杀掉了少年,并吃掉了他的**");
Slowsay("世界开始崩塌");
tg3();
}
int bd9()
{
s++;
system("cls");
Slowsay("你进入大厦才发现这里藏着许多丧尸");
Slowsay("你一路且战且退来到了地下室");
Slowsay("诡异的是,当你杀光了跟来的丧尸后,发现地下室里并没有丧尸");
Slowsay("这里有的,只是一个穿着白大褂的**");
Slowsay("在**的衣服口袋中,你找到了一个笔记本");
Slowsay("****(无法辨认)1号****进展*****永生");
Slowsay("今********,*号诞生了,他比其*****更*");
Slowsay("有些不对,*****的发育有些太快了");
Slowsay("2号的**被***出有强感染**");
Slowsay("************************");
Slowsay("实验***瓶颈,或许我们因该**活体样本");
Slowsay("**,样本失去活**,但**在动");
if(mp==-1)
{
bd15();
return 0;
}
Slowsay("正当你看的入迷的时候,你的脖子被咬住了");
Slowsay("在**前,你隐约听到了少年的声音,“再来一次吧”");
Slowsay("Bad End 9");
if(hjj[9]==0)
{
Sleep(2000);
Slowsay("发现线索-----实验体1号与2号");
}
hjj[9]=1;
}
int tg()
{
system("cls");
Slowsay("不知为何,当你走到这里时,感到世界在一瞬间发生了变化");
Slowsay("你不知道这个变化发生在那里,你只知道,现在的世界十分违和");
Slowsay("或许,这个世界不是真实的");
Slowsay("当你的脑中出现了这个的时候,你眼前的世界,蹦塌了");
Slowsay("于此同时,大量记忆冲进了你的脑海");
Slowsay("不,它们只是回来了,这本身就是你的记忆");
Slowsay("他们在一开始被一些虚假的记忆所替换");
Slowsay("从记忆中,你得知你此时正在玩一个vr游戏");
Slowsay("少年与妹子则是游戏的gm");
Slowsay("这款游戏号称有着超强的代入感");
Slowsay("你在发售当天就买来玩了");
Slowsay("“这游戏真是了不起啊”,你这样想着,“再玩一次吧”");
Slowsay("可真的是这样吗");
Slowsay("躺在营养仓中的你自始至终都没有睁开眼");
Slowsay("正如你从一开始就没有怀疑那些记忆的真实**.......");
Slowsay("---------------游戏基**剧情通关-------------");
tongguan=1;
}
int zhxs()
{
system("cls");
Slowsay("你好奇的看着眼前的一切");
Slowsay("“看起来像某个**游戏的界面”,你这样想着");
Sleep(2000);
Slowsay("获得线索-----“结局?”");
}
int cg()
{
system("cls");
Slowsay("你感觉到违和感在不断加深");
Slowsay("世界好像不再是真实的");
Slowsay("你现在脑中只有一种想法");
Slowsay("活下去");
}
int cg2()
{
system("cls");
system("Color C");
Slowsay("违和感在此时已经聚集到了顶峰");
Slowsay("你的脑中想清楚了一切");
Slowsay("1.那么,下一步是 杀光他们");
Slowsay("2.那么,下一步是 团结起来");
x=read();
if(x==1)
Slowsay("本结局需要打通全badend"),swx=1;
system("Color F");
}
int bd10()
{
system("cls");
Slowsay("你发现了另一个基地");
Slowsay("弹尽粮绝的你选择加入了他们");
Slowsay("之后的每一天都十分单调");
Slowsay("外出寻找物资,然后天黑了回家睡觉");
Slowsay("应该是这样吗?");
Slowsay("也许吧");
Slowsay("Bad End 10");
hjj[10]=1;
}
int hd5()
{
Slowsay("没关系的,一切都会过去的");
Slowsay("你这样说的");
Slowsay("他似乎感觉到了你的善意,一点一点向你**近");
Slowsay("你紧紧的抱住了他");
Slowsay("我会保护好你的");
Slowsay("Happy End-----跨越物种的gay");
}
int sswj()
{
// SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
system("cls");
int w=0;
mp=0;
if(tongguan==1)
{
mp=0;
Slowsay("检测到你以通关,是否**特殊物品\n");
Slowsay("1.**");
Slowsay("2.不**");
while(true)
{
x=read();
if(x==1)
mp=-1;
if(x==2)
{
td4();
return 0;
}
break;
}
}
char ch;
if(cdd==1)
{
printf("是否读取存档\n");
printf("1.读取\n");
printf("2.不读取\n");
x=read();
if(x==1)
{
sw=sw1;
zd=zd1;
sn=sn1;
mz=mz1;
mp=mp1;
goto cddd1;
}
}
system("cls");
printf("当丧尸危机爆发时,你正呆在家里\n");
ch=_getch();
printf("你有10点物资可以分配到子弹和食物上\n");
ch=_getch();
int x,y;
int dd;
qiang=0;
gun=0;
zd=0;
sw=0;
sn=0;
mz=0;
mzzd=0;
sn=0;
mzhg=0;
dd=1;
printf("请输入你的选择(此次输入需键入回车)\n");
while(true)
{
scanf("%d%d",&x,&y);
zd=x;
sw=y;
if(x+y!=10||x<0||y<0)
{
if(x==882246&&y==461313)
{
sw=99;
zd=99;
printf("启用秘籍\n");
break;
}
printf("请重新输入\n");
w++;
if(w>10)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("行了行了,这只是第一个选择而已\n"),
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("有必要这么皮吗\n"),
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("自动分配食物3个子弹7个\n"),
ch=_getch();
ch=_getch();
sw=3,zd=7;
break;
}
}
else break;
}
printf("你的家里是个较为安全的地方,你可以选择搜索你家的物资或是去邻居家看看\n");
ch=_getch();
printf("1.留在家中\n");
printf("2.前往邻居家\n");
while(true)
{
x=read();
if(x!=1&&x!=2)
printf("请重新输入\n");
else if(x==1)
{
printf("在二楼,你发现了一些食物食物+3\n");
ch=_getch();
printf("在家里过了一夜,食物-1\n");
sw=sw+2;
break;
}
else
{
printf("在前往邻居家的路上,你遇到了丧尸\n");
ch=_getch();
if(zd<1)
{
printf("你朝他开了一枪,不过枪里没有子弹,你被他咬**了\n");
ch=_getch();
hjj[11]=1;
printf("Bad End 11\n");
s++;
ch=_getch();
Slowsay("另外在说一句,一个子弹都不带,还到处乱浪,你是真的作");
return 0;
}
else
{
printf("你用你手中的枪结束了他的生命,子弹-1\n");
zd=zd-1;
dd=2;
ch=_getch();
printf("邻居家里不知为何并没有人,你在仔细搜索后发现了一个弹夹,里面有4发子弹\n");
zd+=4;
ch=_getch();
printf("在邻居家过了一夜后,食物-2\n");
sw=sw-2;
if(sw<0)
{
esl();
return 0;
}
}
break;
}
}
ch=_getch();
printf("你回想起这附近有一座商场,你决定\n");
ch=_getch();
printf("1.前往商场\n");
printf("2.到处乱走\n");
printf("3.留在屋子里\n");
while(true)
{
x=read();
if(x!=1&&x!=2&&x!=3)
{
printf("请重新输入\n");
continue;
}
if(x==3)
{
if(sw<2)
{
esl();
return 0;
}
printf("无聊正在逐渐消磨你的意志,但你还是坚持了下来。食物-2\n");
sw=sw-2;
ch=_getch();
printf("之后的每一天你都是这样,独自一人在家中等待**\n");
ch=_getch();
printf("在过了好久之后\n");
if(sw<6)
{
esl();
return 0;
}
x=rand()%2;
if(x==1&&mp==0)
{
hd1();
return 0;
}
if(x==0)
{
bd3();
return 0;
}
}
if(x==2)
{
if(zd<2)
{
mzd();
return 0;
}
printf("在到处乱走的过程中,你遇到了来自纳克萨玛斯的丧尸,子弹-2\n");
zd=zd-2;
break;
}
if(x==1)
{
if(zd<4)
{
mzd();
return 0;
}
printf("在前往商场的过程中,你遇到了丧尸,子弹-4\n");
zd=zd-4;
dd=4;
ch=_getch();
printf("你在商场发现了食物与子弹,食物+3,子弹+2\n");
sw=sw+3;
zd=zd+2;
break;
}
}
printf("你在回家的路上发现了一个女**者\n");
ch=_getch();
printf("她试图向你讨要食物,你的选择是\n");
printf("1.不给\n");
printf("2.给她2份食物\n");
printf("3.给她2份子弹\n");
printf("4.给她一枪\n");
while(true)
{
x=read();
if(x<1||x>4)
{
printf("请重新输入。\n");
continue;
}
if(x==1)
{
printf("妹子生气的走了。\n");
ch=_getch();
}
if(x==2)
{
if(sw<2)
{
printf("食物不足\n");
continue;
}
sw=sw-2;
mzhg++;
printf("你的食物-2,妹子好感度+1\n");
ch=_getch();
}
if(x==3)
{
if(zd<2)
{
printf("子弹不足\n");
continue;
}
mzzd=1;
printf("你给了妹子两份子弹,妹子离开了\n"),zd=zd-2;
ch=_getch();
}
if(x==4)
{
if(zd<1)
{
printf("子弹不足\n");
continue;
}
zd=zd-1;
printf("你一枪杀**了妹子,并从她的**上找到了4份食物\n");
if(swx==2)
{
printf("你吃掉了妹子的**,子弹+10086\n");
zd=10086;
}
sw=sw+4;
mzhg=-1;
}
break;
}
printf("又过了一夜,你的食物-2\n");
sw=sw-2;
if(sw<0)
{
esl();
return 0;
}
if(mzhg>0)
{
printf("那个妹子又来找到了你,并邀请你加入他们的**者基地\n");
}
else printf("你在附近发现了一个**者基地\n");
printf("在前往基地的途中,你遇到了丧尸\n");
printf("你且战且退,大量丧尸把你**进了一家商店\n");
printf("门口的丧尸越来越多,你选择\n");
printf("1.杀出去(消耗较少子弹)\n");
printf("2.守在这(消耗大量子弹,但可以拿到稀有物品)\n");
while(true)
{
x=read();
if(x<1||x>2)
{
printf("请重新输入\n");
continue;
}
if(x==1)
{
int res=0;
if(mzhg>0)
res=1;
else res=3;
if(zd<res)
{
mzd();
return 0;
}
zd=zd-res;
printf("你消耗了一些子弹冲了出去,子弹-%d\n",res);
if(mzzd==1&&mp==-1)
{
printf("妹子在丧尸的**上找到了许多物资,子弹+7,食物+3\n");
zd=zd+7;
sw=sw+3;
mz=1;
break;
}
x=rand()%5;
if(res==1&&x!=3)
printf("妹子为了帮你突围,被丧尸咬到,然后自杀了。\n"),mzhg=-1;
if(x==3&&res==1)
{
td3();
return 0;
}
}
else if(x==2)
{
if(zd<5)
{
mzd();
return 0;
}
zd=zd-5;
printf("你守在这家商店里直到杀**了所有找来的丧尸,子弹-5\n");
if(mzhg==1)
{
printf("妹子在商店中发现了一把无限子弹的枪,子弹+10086\n");
zd=10086;
ch=_getch();
printf("但是妹子在翻找货架的时候被沾了丧尸血的货架划伤\n");
printf("妹子自杀了\n");
mzhg=-1;
}
}
break;
}
printf("你来到了这个**者基地\n");
printf("这个基地的首领表示可以用子弹交换你手中的食物\n");
printf("你还有%d份食物,%d份子弹\n",sw,zd);
ch=_getch();
printf("请输入你需要的子弹数\n");
while(true)
{
x=read();
if(x<0||x>sw)
{
printf("请重新输入\n");
continue;
}
sw=sw-x;
zd=zd+x;
if(x>=1)
{
printf("首领很开心你能提供稀缺的食物,多给了你1份子弹\n");
zd=zd+2;
}
break;
}
ch=_getch();
printf("又过了一天,食物-2");
sw=sw-2;
if(sw<0)
{
esl();
return 0;
}
ch=_getch();
system("cls");
printf("基地首领希望你加入这个基地\n");
Sleep(500);
printf("你的选择是\n");
Sleep(500);
printf("\n");
Sleep(500);
system("Color C");
Slowsay("1.留在这");
Slowsay("2.离开");
while(true)
{
x=read();
if(x<1||x>2)
{
printf("请重新输入\n");
continue;
}
system("Color F");
if(x==1)
{
if(mzhg>-1) hd2();
else hd3();
return 0;
}
if(x==2)
{
ch=_getch();
printf("你决定\n");
printf("1.当天离开\n");
printf("2.再停留一天\n");
while(true)
{
x=read();
if(x<1||x>2)
{
printf("请重新输入\n");
continue;
}
if(x==1) break;
if(x==2)
{
printf("这个基地的首领表示可以用子弹交换你手中的食物\n");
printf("你还有%d份食物,%d份子弹\n",sw,zd);
ch=_getch();
printf("请输入你需要的子弹数\n");
while(true)
{
x=read();
if(x<0||x>sw)
{
printf("请重新输入\n");
continue;
}
sw=sw-x;
zd=zd+x;
if(x>=3)
{
printf("首领很开心你能提供稀缺的食物,多给了你3份子弹\n");
zd=zd+3;
}
break;
}
sw=sw-2;
if(sw<0)
{
esl();
return 0;
}
printf("又过了一夜,食物-2\n");
}
break;
}
printf("在你离开的时候,一个少年跑了过来。\n");
printf("他说,他想要和你一起走\n");
printf("1.带上他\n");
printf("2.不带他\n");
while(true)
{
x=read();
if(x<1||x>2)
{
printf("请重新输入\n");
continue;
}
if(x==2)
{
printf("少年生气的离开了,当他走远了,你才发现\n");
printf("在刚刚的接触中,他偷走了你的枪和所有子弹\n");
zd=-1;
}
if(x==1)
{
printf("你选择上少年一起走\n");
printf("少年将他身上带着的一份食物交给了你\n");
sw=sw+1;
printf("食物消耗+1,少年入队\n");
sn=1;
}
break;
}
if(sn==1&&swx==2)
{
printf("1.杀了少年\n");
printf("2.忍一会\n");
x=read();
if(x==1)
{
bd16();
return 0;
}
}
}
break;
}
sw=sw-2-sn;
printf("你在路边的一座没人的房子里过了一夜,食物-%d\n",2+sn);
if(sn==1&&swx==2)
{
printf("1.杀了少年\n");
printf("2.忍一会\n");
x=read();
if(x==1)
{
bd17();
return 0;
}
}
ch=_getch();
if(sw<0)
{
esl();
return 0;
}
printf("是否存档?\n");
printf("1.存档(记录当前进度,只能有一个存档)\n");
printf("2.不存\n");
x=read();
if(x==1)
{
cdd=1;
sw1=sw;
zd1=zd;
mp1=mp;
mz1=mz;
sn1=sn;
Slowsay("存档成功");
}
cddd1:
if(sn==1)
{
printf("今天一早你就被少年叫醒了,\n");
ch=_getch();
printf("他在床底下发现了一箱方便面,食物+6\n");
sw=sw+6;
printf("少年向你讨要武器,你决定\n");
printf("1.把枪给他\n");
printf("2.把从厨房拆下的水管给他\n");
printf("3.什么都不给他\n");
while(true)
{
x=read();
if(x<1||x>3)
{
printf("请重新输入\n");
continue;
}
if(x==1)
qiang=2;
if(x==2)
gun=2;
break;
}
}
else
{
printf("你在冰箱里发现了几包巧克力\n");
ch=_getch();
printf("希望他们还没过期吧,食物+3\n");
sw=sw+3;
}
ch=_getch();
printf("今天你们来到了一家大商场\n");
printf("你决定\n");
printf("1.独自探索1楼\n");
printf("2.独自探索2楼\n");
if(sn==1)
{
Sleep(500);
Slowsay("3.和少年一起探索2楼");
}
while(true)
{
x=read();
if(x<1||x>3)
{
printf("请重新输入\n");
continue;
}
if(x==1)
{
printf("你在一楼发现了一些子弹,子弹+3\n");
zd=zd+3;
printf("奇怪的是,一只丧尸都没有看到\n");
ch=_getch();
if(sn>0)
{
if(qiang==2)
{
printf("当你来到二楼时,发现了一地**\n");
printf("少年就倒在这**中间,他**前手还紧紧握着枪\n");
printf("你把枪拿了回来,并在少年的**下面发现了一箱压缩饼干\n");
printf("食物+10086\n");
ch=_getch();
sw=10086;
if(sw>1000&&zd>1000)
{
td();
return 0;
}
sn=0;
qiang=1;
}
else
{
printf("当你来到二楼时,发现了少年的**\n");
ch=_getch();
sn=0;
printf("你紧紧握着手中的枪,猛地一回头\n");
printf("四周大量的僵尸向你涌来\n");
ch=_getch();
zd=zd-5;
if(zd<0)
{
mzd();
return 0;
}
printf("你杀光了这些丧尸,子弹-5\n");
ch=_getch();
printf("你在二楼找到了食物,食物+2\n");
sw+=2;
}
}
}
if(x==2)
{
printf("你来到了二楼,数之不尽的丧尸忽然从阴影中窜出\n");
printf("尽管你尽力抵抗,可丧尸的数量实在太多。\n");
if(qiang==2)
{
mzd();
return 0;
}
ch=_getch();
zd-=5;
if(zd<0)
{
mzd();
return 0;
}
printf("你杀光了这些丧尸,子弹-5\n");
ch=_getch();
printf("你在二楼找到了食物,食物+2\n");
sw+=2;
if(sn==1)
{
printf("少年在一楼找到了子弹,子弹+3\n");
zd=zd+3;
}
}
if(x==3&&sn==1)
{
system("cls");
printf("你们来到了二楼\n");
ch=_getch();
system("Color C");
Slowsay("数之不尽的丧尸从阴影中窜出");
Slowsay("尽管你们尽力抵抗,可丧尸的数量实在太多。");
if(gun!=2&&qiang!=2)
{
Slowsay("没有武器的少年被当场咬**。");
if(mp==-1&&mz==0)
{
td5();
return 0;
}
sn=0;
}
Slowsay("其中一只丧尸趁你不注意冲到了你的旁边");
if(gun==2)
Slowsay("就在你要被咬**的时候,少年扔出了手中的水管\n,救下了你");
else if(qiang!=2)
{
zd=zd-3;
if(zd<0)
{
mzd();
return 0;
}
Slowsay("你赶忙回头几枪补掉了这只丧尸,子弹-3");
}
zd=zd-3;
if(qiang==2||zd<0)
{
system("Color F");
mzd();
return 0;
}
system("Color F");
Slowsay("经过了一番苦战,你们终于战胜了所有丧尸,子弹-3");
ch=_getch();
}
break;
}
ch=_getch();
qp();
ch=_getch();
printf("又过了一夜,食物-%d\n",sn+2);
sw=sw-2-sn;
if(sw<0)
{
esl();
return 0;
}
qp();
printf("今天在出门的时候\n");
printf("你遇到了一条流浪狗\n");
printf("1.用枪打它\n");
printf("2.用食物引开它\n");
while(true)
{
x=read();
if(x<1||x>2)
{
printf("请重新输入\n");
continue;
}
if(x==1)
{
printf("你一枪打**了这条狗,子弹-1\n");
zd=zd-1;
ch=_getch();
printf("枪声引来了丧尸,子弹-2\n");
zd=zd-2;
if(zd<0)
{
mzd();
return 0;
}
if(sn==0) break;
printf("在消灭了丧尸之后,你忽然发现少年的脸色不太好\n");
ch=_getch();
Slowsay("原来,在昨天的商场中,少年早就被咬了一口");
Slowsay("他一直瞒着你,不敢说出来");
Slowsay("此时,他已经濒临变异了");
printf("你决定\n");
printf("1.杀了他(消耗大量子弹)\n");
printf("2.不杀他(消耗大量食物)\n");
if(gjj[4]==1&&zd<4)
{
printf("3.安抚他\n");
}
while(1)
{
x=read();
if(x<1||x>3)
{
printf("请重新输入\n");
continue;
}
if(x==1)
{
if(swx==2)
{
if(zd>1000) tgg3();
else mzd();
return 0;
}
printf("你试着向他开枪,不过却被他躲过了\n");
printf("你十分惊恐,疯狂地倾泻着手中的弹药\n");
printf("子弹-4\n");
ch=_getch();
zd=zd-4;
if(zd<0)
{
mzd();
return 0;
}
printf("终于,你杀**了他\n");
if(mp==-1&&mz==0)
{
td5();
return 0;
}
sn=0;
}
if(x==2)
{
Slowsay("你就站在旁边看着少年变异");
Slowsay("奇怪的是,他变异后并没有");
Slowsay("像其他的丧尸一样,向你扑过来");
Slowsay("而是躲在墙角瑟瑟发抖");
Slowsay("你慢慢的走过去");
Slowsay("就在你走近的时候,少年突然暴起");
Slowsay("狠狠地咬住了你的手臂");
Slowsay("你赶忙用枪打**他,可是为时已晚");
sn=0;
if(sw>=6)
{
td2();
return 0;
}
else
{
bd6();
return 0;
}
}
break;
}
if(x==3&&gjj[4]==1)
{
gjj[5]=1;
hd5();
return 0;
}
}
if(x==2)
{
sw=sw-2;
if(sw<0)
{
bd7();
return 0;
}
printf("你用两份食物引开了这条狗,食物-2\n");
}
break;
}
ch=_getch();
ch=_getch();
if(sn==1&&sw>=4&&gun==2&&zd>5)
{
hd4();
return 0;
}
if(sn==1)
{
printf("又过了一天,食物-2\n");
sw=sw-2;
if(sw<0)
{
esl();
return 0;
}
ch=_getch();
printf("今天早上,你发现少年不见了\n");
printf("你决定\n");
printf("1.去寻找他\n");
printf("2.不去找他\n");
while(true)
{
x=read();
if(x<1||x>2)
{
printf("请重新输入\n");
continue;
}
if(x==1)
{
printf("你通过蛛丝马迹一路追踪,来到了一座大厦前\n");
printf("在路上,你遭遇了丧尸,子弹-2\n");
zd=zd-2;
if(zd<0)
{
mzd();
return 0;
}
printf("你决定\n");
printf("1.进入大厦\n");
printf("2.离开\n");
while(true)
{
x=read();
if(x<1||x>2)
{
printf("请重新输入\n");
continue;
}
if(x==2)
{
printf("你在街边的商店中找到了食物,食物+2\n");
sw=sw+2;
}
if(x==1)
{
if(zd<=6)
{
mzd();
return 0;
}
else
{
bd9();
return 0;
}
}
break;
}
}
break;
}
}
qp();
ch=_getch();
if(mz==1&&sn==1&&swx==0)
{
td6();
return 0;
}
Slowsay("又过了一天,食物-2");
sw=sw-2;
if(sw<0)
{
esl();
return 0;
}
Sleep(500);
Slowsay("遭遇丧尸,子弹-3");
zd=zd-3;
if(zd<0)
{
mzd();
return 0;
}
Sleep(500);
Slowsay("又过了一天,食物-2");
sw=sw-2;
if(sw<0)
{
esl();
return 0;
}
Sleep(500);
Slowsay("遭遇丧尸,子弹-2");
zd=zd-2;
if(zd<0)
{
mzd();
return 0;
}
Sleep(500);
if(ccg==1)
{
tg();
return 0;
}
else
{
bd10();
return 0;
}
}
int main()
{
srand(time(0));
while(true)
{
int v=0;
char ch;
mp=0;
Sleep(1000);
ch=_getch();
system("cls");
printf("1.进行游戏\n");
printf("2.查看成就\n");
printf("3.查看线索(获得全部线索后通关游戏)\n");
printf("4.获得一条随机的提示\n");
printf("5.游戏相关\n");
printf("6.'退出游戏'\n");
x=read();
if(x==1)
{
sswj();
if(s>50&&swhm==0)
{
swhm=1;
Slowsay("又**了啊");
Slowsay("这已经是第几次了呢");
Slowsay("一个柔和的声音从耳边传来");
Slowsay("或许早该放弃了");
printf("\n");
Slowsay("进阶线索-----**亡?**亡!");
}
}
if(x==2)
{
int v1;
system("cls");
if(tongguan1==1)
{
printf("已通关进阶剧情");
if(swx==0)
printf("人类救星\n\n");
else
printf("群尸之首\n\n");
}
else if(tongguan==1)
{
printf("已通关基**剧情\n\n");
}
int v=0;
printf("Happy Bnd 达成\n");
if(gjj[1]==1)
printf("苟到最后\n"),v++;
else
printf("未达成\n");
if(gjj[2]==1)
printf("神仙眷侣\n"),v++;
else
printf("未达成\n");
if(gjj[3]==1)
printf("英雄不朽\n"),v++;
else
printf("未达成\n");
if(gjj[4]==1)
printf("认清自己\n"),v++;
else
printf("未达成\n");
if(gjj[5]==1)
printf("跨越物种的gay\n");
else
printf("未达成\n");
printf("\n");
printf("Bad End 达成(共15个)\n");
for(int i=1; i<=17; i++)
if(hjj[i]==1)
printf("%d ",i),v++,v1++;
printf("\n");
printf("当前**亡次数:%d",s);
printf("\n");
printf("True End 达成\n");
if(zjj[1]==1)
printf("一如既往\n"),v++;
else
printf("未达成\n");
if(zjj[2]==1)
printf("保持本我\n"),v++;
else
printf("未达成\n");
if(zjj[3]==1)
printf("幻觉\n"),v++;
else
printf("未达成\n");
if(zjj[4]==1)
printf("停服\n"),v++;
else
printf("未达成\n");
if(zjj[5]==1)
printf("珊珊来迟的**亡\n"),v++;
else
printf("未达成\n");
printf("\n");
if(v1==17&&swx==1)
swx=2,cdd=0;
if(v>15&&jg==0)
{
cdd=0;
zhxs();
jg=1;
}
char ch=_getch();
}
if(x==3)
{
system("cls");
int v=0;
printf("基**线索\n");
if(zjj[1]==1)
printf(" 奇特的枪与饼干\n"),v++;
else
printf(" ?????\n");
if(zjj[2]==1)
printf(" 延迟变异的少年\n"),v++;
else
printf(" ?????\n");
if(zjj[3]==1)
printf(" 不变异的妹子\n"),v++;
else
printf(" ?????\n");
if(hjj[3]==1&&gjj[1]==1)
printf(" 速度飘忽不定的**\n"),v++;
else
printf(" ?????\n");
if(hjj[8]==1)
printf(" 早已变异的妹子\n"),v++;
else
printf(" ?????\n");
if(hjj[9]==1)
printf(" 实验体1号与2号\n"),v++;
else
printf(" ?????\n");
if(jg==1)
printf(" “结局?”\n"),v++;
else
printf(" ?????\n\n");
printf("进阶线索\n");
if(swhm==1)
printf(" **亡?**亡!\n"),v++;
else
printf(" ?????\n");
if(zbbj==1)
printf(" 逐步**近的真相\n"),v++;
else
printf(" ?????\n");
if(by==1)
printf(" 变异是什么时候的事呢\n");
else
printf(" ?????(本线索可以不发现)\n");
if(zjj[5]==1)
printf(" **亡之后\n"),v++;
else
printf(" ?????\n");
if(hjj[14]==1)
printf(" 外面的世界\n"),v++;
else
printf(" ?????\n");
if(hjj[15]==1)
printf(" 真的,假的!"),v++;
else
printf(" ?????\n");
if(v>6&&ccg==0)
{
Sleep(2000);
cdd=0;
cg();
ccg=1;
}
if(v>=12&&qxs==0)
{
Sleep(2000);
qxs=1;
cg2();
cdd=0;
}
ch=_getch();
}
if(x==4)
{
system("cls");
x=rand()%11;
if(x==0)
printf("加了好感后,妹子是有几率不**的哦");
if(x==1)
printf("如果想要和少年在一起的话,就一定要十分富有");
if(x==2)
printf("有一些事不是没有发生,只是你没看到");
if(x==3)
printf("如果和首领交换子弹的话,他会很开心");
if(x==4)
printf("妹子的身上带着4份食物呢");
if(x==5)
printf("因为某不愿透露姓名juliudan的要求,有一些结局要脸好才能触发");
if(x==6)
printf("大多数时候,你认为一个地方没有好结局只是因为你食物/子弹不够");
if(x==7)
printf("有一些结局是有前置条件才能触发的,耐心一点吧");
if(x==8)
printf("绝大多数的线索来自结局");
if(x==9)
printf("进阶线索需要你走以前没走过的路");
if(x==10)
printf("完成所有坏结局会进入尸王线");
ch=_getch();
continue;
}
if(x==5)
{
system("cls");
Slowsay("作者:吕易航\n");
Slowsay("当前版本 2.1\n");
Slowsay("更新日志:");
Slowsay("5月27日 1.0:基**版,较为完善,难度较高");
Slowsay("6月14日 1.1:在1.0的基**上增加了通关后剧情并降低难度");
Slowsay("6月28日 1.2:把进阶剧情更新完了");
Slowsay("7月06日 1.4:增加存档,分支剧情,修复bug");
Slowsay("7月10日 1.5:修复bug");
}
if(x==6)
{
system("cls");
Slowsay("游戏退出中。。。。。。");
if(tongguan1!=1)
{
Slowsay("你**了");
s++;
}
else
{
Slowsay("你离开了这个世界");
return 0;
}
}
}
}
我最喜欢的
新手光能
#include<iostream>
#include<string>
#include<ctime>
#include<cstdlib>
#include<windows.h>
#include<conio.h>
using namespace std;
int block00[4][4] = { { 10,0,0,0 },{ 1,1,1,1 },{ 0,0,0,0 },{ 0,0,0,0 } };
int block01[4][4] = { { 11,0,1,0 },{ 0,0,1,0 },{ 0,0,1,0 },{ 0,0,1,0 } };
int block02[4][4] = { { 12,0,0,0 },{ 0,0,0,0 },{ 1,1,1,0 },{ 0,1,0,0 } };
int block03[4][4] = { { 13,0,0,0 },{ 0,1,0,0 },{ 1,1,0,0 },{ 0,1,0,0 } };
int block04[4][4] = { { 14,0,0,0 },{ 0,0,0,0 },{ 0,1,0,0 },{ 1,1,1,0 } };
int block05[4][4] = { { 15,0,0,0 },{ 0,1,0,0 },{ 0,1,1,0 },{ 0,1,0,0 } };
int block06[4][4] = { { 16,0,0,0 },{ 0,0,0,0 },{ 1,1,1,0 },{ 1,0,0,0 } };
int block07[4][4] = { { 17,0,0,0 },{ 1,1,0,0 },{ 0,1,0,0 },{ 0,1,0,0 } };
int block08[4][4] = { { 18,0,0,0 },{ 0,0,0,0 },{ 0,0,1,0 },{ 1,1,1,0 } };
int block09[4][4] = { { 19,0,0,0 },{ 0,1,0,0 },{ 0,1,0,0 },{ 0,1,1,0 } };
int block10[4][4] = { { 20,0,0,0 },{ 0,0,0,0 },{ 1,1,1,0 },{ 0,0,1,0 } };
int block11[4][4] = { { 21,0,0,0 },{ 0,1,0,0 },{ 0,1,0,0 },{ 1,1,0,0 } };
int block12[4][4] = { { 22,0,0,0 },{ 0,0,0,0 },{ 1,0,0,0 },{ 1,1,1,0 } };
int block13[4][4] = { { 23,0,0,0 },{ 0,1,1,0 },{ 0,1,0,0 },{ 0,1,0,0 } };
int block14[4][4] = { { 24,0,0,0 },{ 0,0,0,0 },{ 0,1,1,0 },{ 1,1,0,0 } };
int block15[4][4] = { { 25,0,0,0 },{ 1,0,0,0 },{ 1,1,0,0 },{ 0,1,0,0 } };
int block16[4][4] = { { 26,0,0,0 },{ 0,0,0,0 },{ 1,1,0,0 },{ 0,1,1,0 } };
int block17[4][4] = { { 27,0,0,0 },{ 0,0,1,0 },{ 0,1,1,0 },{ 0,1,0,0 } };
int block18[4][4] = { { 28,0,0,0 },{ 0,0,0,0 },{ 1,1,0,0 },{ 1,1,0,0 } };
void initialWindow(HANDLE hOut);//初始化窗口
void initialPrint(HANDLE hOut);//初始化界面
void gotoXY(HANDLE hOut, int x, int y);//移动光标
void roundBlock(HANDLE hOut, int block[4][4]);//随机生成方块并打印到下一个方块位置
bool collisionDetection(int block[4][4], int map[21][12], int x, int y);//检测碰撞
void printBlock(HANDLE hOut, int block[4][4], int x, int y);//打印方块
void clearBlock(HANDLE hOut, int block[4][4], int x, int y);//消除方块
void myLeft(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y);//左移
void myRight(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y);//右移
void myUp(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y);//顺时针旋转90度
int myDown(HANDLE hOut, int block[4][4], int map[21][12], int &x, int y);//加速下落
void myStop(HANDLE hOut, int block[4][4]);//游戏暂停
void gameOver(HANDLE hOut, int block[4][4], int map[21][12]);//游戏结束
void eliminateRow(HANDLE hOut, int map[21][12], int &val, int &fraction, int &checkpoint);//判断是否能消行并更新分值
int main()
{
int map[21][12];
int blockA[4][4];//候选区的方块
int blockB[4][4];//下落中的方块
int positionX, positionY;//方块左上角的坐标
bool check;//**方块还能不能下落
char key;//用来存储按键
int val;//用来控制下落速度
int fraction;//用来存储得分
int checkpoint;//用来存储关卡
int times;
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);//获取标准输出设备句柄
initialWindow(hOut);
initial:
gotoXY(hOut, 0, 0);
initialPrint(hOut);
check = true;
val = 50;
fraction = 0;
checkpoint = 1;
times = val;
for (int i = 0; i < 20; ++i)
{
for (int j = 1; j < 11; ++j)
{
map[i][j] = 0;
}
}
for (int i = 0; i < 20; ++i)
{
map[i][0] = map[i][11] = 1;
}
for (int i = 0; i < 12; ++i)
{
map[20][i] = 1;
}
srand((unsigned)time(NULL));
roundBlock(hOut, blockA);
while (true)
{
if (check)
{
eliminateRow(hOut, map, val, fraction, checkpoint);
check = false;
positionX = -3;
positionY = 4;
if (collisionDetection(blockA, map, positionX, positionY))
{
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
blockB[i][j] = blockA[i][j];
}
}
roundBlock(hOut, blockA);
}
else
{
gameOver(hOut, blockA, map);
goto initial;
}
}
printBlock(hOut, blockB, positionX, positionY);
if (_kbhit())
{
key = _getch();
switch (key)
{
case 72:
myUp(hOut, blockB, map, positionX, positionY);
break;
case 75:
myLeft(hOut, blockB, map, positionX, positionY);
break;
case 77:
myRight(hOut, blockB, map, positionX, positionY);
break;
case 80:
switch (myDown(hOut, blockB, map, positionX, positionY))
{
case 0:
check = false;
break;
case 1:
check = true;
break;
case 2:
gameOver(hOut, blockB, map);
goto initial;
default:
break;
}
break;
case 32:
myStop(hOut, blockA);
break;
case 27:
exit(0);
default:
break;
}
}
Sleep(20);
if (0 == --times)
{
switch (myDown(hOut, blockB, map, positionX, positionY))
{
case 0:
check = false;
break;
case 1:
check = true;
break;
case 2:
gameOver(hOut, blockB, map);
goto initial;
default:
break;
}
times = val;
}
}
cin.get();
return 0;
}
void initialWindow(HANDLE hOut)
{
SetConsoleTitle("**方块");
COORD size = { 80, 25 };
SetConsoleScreenBufferSize(hOut, size);
SMALL_RECT rc = { 0, 0, 79, 24 };
SetConsoleWindowInfo(hOut, true, &rc);
CONSOLE_CURSOR_INFO cursor_info = { 1, 0 };
SetConsoleCursorInfo(hOut, &cursor_info);
}
void initialPrint(HANDLE hOut)
{
SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
for (int i = 0; i < 20; ++i)
{
cout << "■ ■☆ ☆" << endl;
}
gotoXY(hOut, 26, 0);
cout << "☆☆☆☆☆☆☆☆☆☆☆";
gotoXY(hOut, 0, 20);
cout << "■■■■■■■■■■■■☆☆☆☆☆☆☆☆☆☆☆☆☆";
gotoXY(hOut, 26, 1);
cout << "分 数: ";
gotoXY(hOut, 26, 2);
cout << "关 卡: ";
gotoXY(hOut, 26, 4);
cout << "下一方块:";
gotoXY(hOut, 26, 9);
cout << "操作方法:";
gotoXY(hOut, 30, 11);
cout << "↑:旋转 ↓:速降";
gotoXY(hOut, 30, 12);
cout << "→:右移 ←:左移";
gotoXY(hOut, 30, 13);
cout << "空格键:开始/暂停";
gotoXY(hOut, 30, 14);
cout << "Esc 键:退出";
gotoXY(hOut, 26, 16);
cout << "关 于:";
gotoXY(hOut, 30, 18);
cout << "**方块V1.0";
gotoXY(hOut, 35, 19);
cout << "作者:潘约尔";
}
void gotoXY(HANDLE hOut, int x, int y)
{
COORD pos;
pos.X = x;
pos.Y = y;
SetConsoleCursorPosition(hOut, pos);
}
void roundBlock(HANDLE hOut, int block[4][4])
{
clearBlock(hOut, block, 5, 15);
switch (rand() % 19)
{
case 0:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block00[i][j];
}
}
break;
case 1:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block01[i][j];
}
}
break;
case 2:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block02[i][j];
}
}
break;
case 3:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block03[i][j];
}
}
break;
case 4:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block04[i][j];
}
}
break;
case 5:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block05[i][j];
}
}
break;
case 6:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block06[i][j];
}
}
break;
case 7:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block07[i][j];
}
}
break;
case 8:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block08[i][j];
}
}
break;
case 9:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block09[i][j];
}
}
break;
case 10:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block10[i][j];
}
}
break;
case 11:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block11[i][j];
}
}
break;
case 12:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block12[i][j];
}
}
break;
case 13:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block13[i][j];
}
}
break;
case 14:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block14[i][j];
}
}
break;
case 15:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block15[i][j];
}
}
break;
case 16:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block16[i][j];
}
}
break;
case 17:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block17[i][j];
}
}
break;
case 18:
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block18[i][j];
}
}
break;
default:
break;
}
printBlock(hOut, block, 5, 15);
}
bool collisionDetection(int block[4][4], int map[21][12], int x, int y)
{
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
if (x + i >= 0 && y + j >= 0 && map[x + i][y + j] == 1 && block[i][j] == 1)
{
return false;
}
}
}
return true;
}
void printBlock(HANDLE hOut, int block[4][4], int x, int y)
{
switch (block[0][0])
{
case 10:
case 11:
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN);
break;
case 12:
case 13:
case 14:
case 15:
SetConsoleTextAttribute(hOut, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
break;
case 16:
case 17:
case 18:
case 19:
SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
break;
case 20:
case 21:
case 22:
case 23:
SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY);
break;
case 24:
case 25:
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
break;
case 26:
case 27:
SetConsoleTextAttribute(hOut, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
break;
case 28:
SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_INTENSITY);
break;
default:
break;
}
for (int i = 0; i < 4; ++i)
{
if (i + x >= 0)
{
for (int j = 0; j < 4; ++j)
{
if (block[i][j] == 1)
{
gotoXY(hOut, 2 * (y + j), x + i);
cout << "■";
}
}
}
}
}
void clearBlock(HANDLE hOut, int block[4][4], int x, int y)
{
for (int i = 0; i < 4; ++i)
{
if (i + x >= 0)
{
for (int j = 0; j < 4; ++j)
{
if (block[i][j] == 1)
{
gotoXY(hOut, 2 * (y + j), x + i);
cout << " ";
}
}
}
}
}
void gameOver(HANDLE hOut, int block[4][4], int map[21][12])
{
SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_INTENSITY);
gotoXY(hOut, 9, 8);
cout << "** OVER";
gotoXY(hOut, 8, 9);
cout << "空格键:重来";
gotoXY(hOut, 8, 10);
cout << "ESC键:退出";
char key;
while (true)
{
key = _getch();
if (key == 32)
{
return;
}
if (key == 27)
{
exit(0);
}
}
}
int myDown(HANDLE hOut, int block[4][4], int map[21][12], int &x, int y)
{
if (collisionDetection(block, map, x + 1, y))
{
clearBlock(hOut, block, x, y);
++x;
return 0;
}
if (x < 0)
{
return 2;
}
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
if (block[i][j] == 1)
{
map[x + i][y + j] = 1;
SetConsoleTextAttribute(hOut, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY);
gotoXY(hOut, 2 * (y + j), x + i);
cout << "■";
}
}
}
return 1;
}
void myLeft(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y)
{
if (collisionDetection(block, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
--y;
}
}
void myRight(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y)
{
if (collisionDetection(block, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
++y;
}
}
void myUp(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y)
{
switch (block[0][0])
{
case 10:
if (collisionDetection(block01, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block01[i][j];
}
}
}
break;
case 11:
if (collisionDetection(block00, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block00[i][j];
}
}
}
else if (collisionDetection(block00, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block00[i][j];
}
}
--y;
}
else if (collisionDetection(block00, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block00[i][j];
}
}
++y;
}
else if (collisionDetection(block00, map, x, y - 2))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block00[i][j];
}
}
y = y - 2;
}
else if (collisionDetection(block00, map, x, y + 2))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block00[i][j];
}
}
y = y + 2;
}
break;
case 12:
if (collisionDetection(block03, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block03[i][j];
}
}
}
else if (collisionDetection(block03, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block03[i][j];
}
}
--y;
}
else if (collisionDetection(block03, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block03[i][j];
}
}
++y;
}
break;
case 13:
if (collisionDetection(block04, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block04[i][j];
}
}
}
else if (collisionDetection(block04, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block04[i][j];
}
}
--y;
}
else if (collisionDetection(block04, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block04[i][j];
}
}
++y;
}
break;
case 14:
if (collisionDetection(block05, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block05[i][j];
}
}
}
else if (collisionDetection(block05, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block05[i][j];
}
}
--y;
}
else if (collisionDetection(block05, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block05[i][j];
}
}
++y;
}
break;
case 15:
if (collisionDetection(block02, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block02[i][j];
}
}
}
else if (collisionDetection(block02, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block02[i][j];
}
}
--y;
}
else if (collisionDetection(block02, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block02[i][j];
}
}
++y;
}
break;
case 16:
if (collisionDetection(block07, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block07[i][j];
}
}
}
else if (collisionDetection(block07, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block07[i][j];
}
}
--y;
}
else if (collisionDetection(block07, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block07[i][j];
}
}
++y;
}
break;
case 17:
if (collisionDetection(block08, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block08[i][j];
}
}
}
else if (collisionDetection(block08, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block08[i][j];
}
}
--y;
}
else if (collisionDetection(block08, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block08[i][j];
}
}
++y;
}
break;
case 18:
if (collisionDetection(block09, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block09[i][j];
}
}
}
else if (collisionDetection(block09, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block09[i][j];
}
}
--y;
}
else if (collisionDetection(block09, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block09[i][j];
}
}
++y;
}
break;
case 19:
if (collisionDetection(block06, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block06[i][j];
}
}
}
else if (collisionDetection(block06, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block06[i][j];
}
}
--y;
}
else if (collisionDetection(block06, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block06[i][j];
}
}
++y;
}
break;
case 20:
if (collisionDetection(block11, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block11[i][j];
}
}
}
else if (collisionDetection(block11, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block11[i][j];
}
}
--y;
}
else if (collisionDetection(block11, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block11[i][j];
}
}
++y;
}
break;
case 21:
if (collisionDetection(block12, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block12[i][j];
}
}
}
else if (collisionDetection(block12, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block12[i][j];
}
}
--y;
}
else if (collisionDetection(block12, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block12[i][j];
}
}
++y;
}
break;
case 22:
if (collisionDetection(block13, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block13[i][j];
}
}
}
else if (collisionDetection(block13, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block13[i][j];
}
}
--y;
}
else if (collisionDetection(block13, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block13[i][j];
}
}
++y;
}
break;
case 23:
if (collisionDetection(block10, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block10[i][j];
}
}
}
else if (collisionDetection(block10, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block10[i][j];
}
}
--y;
}
else if (collisionDetection(block10, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block10[i][j];
}
}
++y;
}
break;
case 24:
if (collisionDetection(block15, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block15[i][j];
}
}
}
else if (collisionDetection(block15, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block15[i][j];
}
}
--y;
}
else if (collisionDetection(block15, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block15[i][j];
}
}
++y;
}
break;
case 25:
if (collisionDetection(block14, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block14[i][j];
}
}
}
else if (collisionDetection(block14, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block14[i][j];
}
}
--y;
}
else if (collisionDetection(block14, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block14[i][j];
}
}
++y;
}
break;
case 26:
if (collisionDetection(block17, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block17[i][j];
}
}
}
else if (collisionDetection(block17, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block17[i][j];
}
}
--y;
}
else if (collisionDetection(block17, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block17[i][j];
}
}
++y;
}
break;
case 27:
if (collisionDetection(block16, map, x, y))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block16[i][j];
}
}
}
else if (collisionDetection(block16, map, x, y - 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block16[i][j];
}
}
--y;
}
else if (collisionDetection(block16, map, x, y + 1))
{
clearBlock(hOut, block, x, y);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
block[i][j] = block16[i][j];
}
}
++y;
}
break;
default:
break;
}
}
void myStop(HANDLE hOut, int block[4][4])
{
clearBlock(hOut, block, 5, 15);
SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_INTENSITY);
gotoXY(hOut, 30, 7);
cout << "游戏暂停";
char key;
while (true)
{
key = _getch();
if (key == 32)
{
gotoXY(hOut, 30, 7);
cout << " ";
printBlock(hOut, block, 5, 15);
return;
}
if (key == 27)
{
exit(0);
}
}
}
void eliminateRow(HANDLE hOut, int map[21][12], int &val, int &fraction, int &checkpoint)
{
SetConsoleTextAttribute(hOut, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY);
for (int i = 19; i >= 0; --i)
{
int x = 0;
for (int j = 1; j < 11; ++j)
{
x += map[i][j];
}
if (x == 10)
{
fraction += 100;
if (val > 1 && fraction / 1000 + 1 != checkpoint)
{
checkpoint = fraction / 1000 + 1;
val -= 5;
}
for (int m = i; m > 0; --m)
{
for (int n = 1; n < 11; ++n)
{
map[m][n] = map[m - 1][n];
gotoXY(hOut, 2 * n, m);
if (map[m][n] == 1)
{
cout << "■";
}
else
{
cout << " ";
}
}
}
++i;
}
}
gotoXY(hOut, 36, 1);
cout << fraction;
gotoXY(hOut, 36, 2);
cout << checkpoint;
}
新手光能
#include<iostream>
#include<fstream>
#include<windows.h>
#include<cstdio>
#include<cstring>
#include<stdio.h>
#include<conio.h>
#include<time.h>
#include<vector>
#include<sstream>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
using namespace std;
string ckpf[10001];//仓库的皮肤
bool jiandang=0;//临时变量
int ckpfs=1;// 仓库的皮肤数量
void HideCursor(){
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
CursorInfo.bVisible = false; //隐藏控制台光标
SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void console()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO bInfo;
GetConsoleScreenBufferInfo(hOut, &bInfo );
SetConsoleTitle("XACRAFT 2.0 简体中文版"); // 设置窗口的标题
}
string pfd="XZ";//皮肤
long long jb=100;//金币数量
int a[20][5][256][2049],hand[20][50],x[20]={0},y[20];
int i,j,errortimes=0;
bool kn=0;
char cmmd;
string comd;
string tecpas,tecnam,tecpin;
char ch;
int seed;
void color(int corcorcor){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
}
bool kd(char ccc){
if(!KEY_DOWN(ccc)) return 0;
else return 1;
}
int rdm(int aaaaa,int bbbbb){
return rand()%(bbbbb-aaaaa+1)+aaaaa;
}
void cls(){//赟刑道提供,如有侵权请联系删除。
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
COORD coordScreen = { 0, 0 }; // home for the cursor
SetConsoleCursorPosition( hConsole, coordScreen );
}
char gl(){
if(kd('Q')) return 'Q';
if(kd('W')) return 'W';
if(kd('E')) return 'E';
if(kd('R')) return 'R';
if(kd('T')) return 'T';
if(kd('Y')) return 'Y';
if(kd('U')) return 'U';
if(kd('I')) return 'I';
if(kd('O')) return 'O';
if(kd('P')) return 'P';
if(kd('A')) return 'A';
if(kd('S')) return 'S';
if(kd('D')) return 'D';
if(kd('F')) return 'F';
if(kd('G')) return 'G';
if(kd('H')) return 'H';
if(kd('J')) return 'J';
if(kd('K')) return 'K';
if(kd('L')) return 'L';
if(kd('Z')) return 'Z';
if(kd('X')) return 'X';
if(kd('C')) return 'C';
if(kd('V')) return 'V';
if(kd('B')) return 'B';
if(kd('N')) return 'N';
if(kd('M')) return 'M';
if(kd('1')) return '1';
if(kd('2')) return '2';
if(kd('3')) return '3';
if(kd('4')) return '4';
if(kd('5')) return '5';
if(kd('6')) return '6';
if(kd('7')) return '7';
if(kd('8')) return '8';
if(kd('9')) return '9';
if(kd('0')) return '0';
}
string getTime(){
time_t timep;
time (&timep);
char tmp[64];
strftime(tmp, sizeof(tmp), "%m%d",localtime(&timep) );
return tmp;
}
string GetTime(){
time_t timep;
time (&timep);
char tmp[64];
strftime(tmp, sizeof(tmp), "%Y%m%d",localtime(&timep) );
return tmp;
}
void rightLine(string str){
int i,l,w;
w=80;
l=str.length();
for(i=0;i<80-l;i++)
cout<<" ";
cout<<str<<endl;
return ;
}
void Line(string str){
int i,l,w;
w=80;
l=str.length();
for(i=0;i<(w-l)/2;i++)
cout<<" ";
cout<<str<<endl;
return ;
}
void line(string str){
int i,l,w;
w=80;
l=str.length();
for(i=0;i<(w-l)/2;i++)
cout<<" ";
cout<<str;
return ;
}
void lin(string str){
int i,l,w;
w=80;
l=str.length();
for(i=0;i<(w-l)/2;i++)
cout<<" ";
cout<<str;
return ;
}
void nameline(string str){
int i,l,w;
w=50;
l=str.length();
for(i=0;i<(w-l)/2-1;i++)
cout<<" ";
cout<<str;
if((w-l)%2==0){
for(i=0;i<(w-l)/2-1;i++)
cout<<" ";
}else{
for(i=0;i<(w-l)/2;i++)
cout<<" ";
}
color(7);
cout<<"|";
return ;
}
void passline(string str){
int i,l,w;
w=50;
l=str.length();
for(i=0;i<(w-l)/2-1;i++)
cout<<" ";
for(i=0;i<str.length();i++) cout<<"*";
if((w-l)%2==0){
for(i=0;i<(w-l)/2-1;i++)
cout<<" ";
}else{
for(i=0;i<(w-l)/2;i++)
cout<<" ";
}
color(7);
cout<<"|";
return ;
}
bool Login_getpass(){
errortimes=0;
cp:;
if(errortimes>=3){
color(13);
cout<<endl;
lin("错误次数过多,登录失败!");
Sleep(3000);
color(7);
return 0;
}
tecpin="";
ch=0;
while(ch!=13){
system("cls");
color(14);
cout<<endl;
lin("登录 TEC 账号");
printf("\n\n\n\n\n\n");
color(7);
cout<<endl;
lin("==================================================");
cout<<endl;
cout<<" |";
color(11);
nameline("欢迎回来,"+tecnam);
cout<<endl;
lin("==================================================");
printf("\n\n\n");
color(10);
cout<<" >>输入密码";
color(7);
cout<<endl;
lin("==================================================");
cout<<endl;
cout<<" |";
passline(tecpin);
cout<<endl;
lin("==================================================");
ch=_getch();
tecpin+=ch;
if(ch==8){
tecpin=tecpin.substr(0,tecpin.length()-1);
tecpin=tecpin.substr(0,tecpin.length()-1);
}
}
stringstream in1;
in1<<tecpin;
in1>>tecpin;
if(tecpin!=tecpas){
cout<<endl;
color(12);
lin("密码错误");
errortimes++;
Sleep(1500);
goto cp;
}
system("cls");
return 1;
}
void getnam(){
tecpin="";
ch=0;
while(ch!=13){
system("cls");
color(14);
cout<<endl;
lin("注册 TEC 账号");
printf("\n\n\n\n\n\n");
color(10);
cout<<" >>用户名";
color(15);
cout<<" {请输入}";
if(tecpin.length()>45){
color(12);
cout<<" 用户名过长";
tecpin=tecpin.substr(0,tecpin.length()-1);
}
color(7);
cout<<endl;
lin("==================================================");
cout<<endl;
cout<<" |";
nameline(tecpin);
cout<<endl;
lin("==================================================");
printf("\n\n\n");
color(10);
cout<<" >>密码";
color(7);
cout<<endl;
lin("==================================================");
cout<<endl;
cout<<" | |";
cout<<endl;
lin("==================================================");
ch=_getch();
tecpin+=ch;
if(ch==8){
tecpin=tecpin.substr(0,tecpin.length()-1);
tecpin=tecpin.substr(0,tecpin.length()-1);
}
}
system("cls");
stringstream in1;
in1<<tecpin;
in1>>tecnam;
if(tecnam.length()==0) getnam();
return ;
}
void getpas(){
tecpin="";
ch=0;
while(ch!=13){
system("cls");
color(14);
cout<<endl;
lin("注册 TEC 账号");
printf("\n\n\n\n\n\n");
color(10);
cout<<" >>用户名 输入完成 √";
color(7);
cout<<endl;
lin("==================================================");
cout<<endl;
cout<<" |";
nameline(tecnam);
cout<<endl;
lin("==================================================");
printf("\n\n\n");
color(10);
cout<<" >>密码";
color(15);
cout<<" {请输入}";
if(tecpin.length()>45){
color(12);
cout<<" 密码过长";
tecpin=tecpin.substr(0,tecpin.length()-1);
}
color(7);
cout<<endl;
lin("==================================================");
cout<<endl;
cout<<" |";
passline(tecpin);
cout<<endl;
lin("==================================================");
ch=_getch();
tecpin+=ch;
if(ch==8){
tecpin=tecpin.substr(0,tecpin.length()-1);
tecpin=tecpin.substr(0,tecpin.length()-1);
}
}
system("cls");
tecpas=tecpin;
if(tecpas.length()==0) getpas();
return ;
}
void TEClogin(){
color(7);
ifstream fin("TEC账户.tecdata");
fin>>tecnam>>tecpas;
fin.close();
if(tecnam.length()!=0 && tecpas.length()!=0){
if(Login_getpass()==0){
i=0;
cout<<0/i;
}
return ;
}
getnam();
getpas();
ofstream fout("TEC账户.tecdata");
fout<<tecnam<<endl<<tecpas;
fout.close();
return ;
}
//逻辑锁部分(始)
bool end_day(){
string tmp=GetTime(),temp="20220101";
if(tmp>=temp) return 1;
else return 0;
}
bool fool_days(){
string tmp=getTime();
if(tmp=="0401") return 1;
else return 0;
}
//逻辑锁部分(终)
void Logical_Lock(){
if(fool_days()){
system("cls");
color(252);
system("cls");
cout<<endl;
Line("抱 歉");
cout<<endl<<endl;
color(240);
Line("出于特殊原因,XACRAFT已停止更新,非常抱歉。");
cmmd=getch();
int fk=0;
cout<<fk/fk;
}
if(end_day()){
system("cls");
color(252);
system("cls");
cout<<endl;
Line("XACRAFT 版本过低");
cout<<endl<<endl;
color(240);
Line("您现在使用的XACRAFT 2.0已于2022年1月1日过期,请更新至最新版本!");
cmmd=getch();
int fk=0;
cout<<fk/fk;
}
return ;
}
int print(int cor){
if(cor==1){
color(170);//草方块
printf("▉ ");
}
else if(cor==2){
color(34);//树叶
printf("▉ ");
}
else if(cor==3){
color(136);//石头
printf("▉ ");
}
else if(cor==4){
color(102);//泥土
printf("▉ ");
}
else if(cor==6){
color(96);//橡木
printf("WO");
}
else if(cor==7){
color(139);//钻石矿石
printf("∷");
}
else if(cor==8){
color(142);//黄金矿石
printf("∷");
}else if(cor==9){
color(207);//苹果
printf("AP");
}else if(cor==10){
color(239);//金苹果
printf("GA");
}else if(cor==11){
color(238);//沙子
printf("▉ ");
}else if(cor==12){
color(239);//砂岩
printf("==");
}else if(cor==13){
color(127);//雪块
printf("▓ ");
}else if(cor==14){
color(32);//仙人掌
printf("∷");
}else if(cor==15){
color(112);//白桦木
printf("BR");
}else{
color(255);//空气
cout<<" ";
}
}
int cangk()
{
cout<<"\n\n\n\n\n";
cout<<"\t\t你现在所拥有的皮肤:";
for(int i=1;i<=ckpfs;i++)
{
cout<<ckpfs<<"."<<ckpf[ckpfs]<<" ";
}
int bixk;
cin>>bixk;
pfd=ckpf[ckpfs];
cout<<"\n\t\t\t\t\t装备成功!";
Sleep(1000);
return 1;
}
int shang()//本市最繁华的商城
{
char gm;
while(1)
{
system("cls");
Line("此部分由极昼工坊制作");
cout<<"\n\n\n\n\n";
line("你现在有:");
cout<<jb<<"jb\n";
Line("1.行走纪念皮肤 :AW (99jb) ");
Line("2.XA**纪念皮肤:XA (99jb) ");
Line("3.MC致敬皮肤 :MC (99jb)");
Line("4.首发纪念皮肤 :┳ (666jb)");
Line("0.退出商城。=_= ");
line("您的选择是: ");
cin>>gm;
if(gm=='1'&&jb<99)
{
cout<<"\n\t\t\t\t\t买不起!";
Sleep(1000);
}
else if(gm=='1')
{
pfd="AW";
ckpfs++;
ckpf[ckpfs]="AW";
jb-=99;
}
if(gm=='2'&&jb<99)
{
cout<<"\n\t\t\t\t\t买不起!";
Sleep(1000);
}
else if(gm=='2')
{
pfd="XA";
ckpfs++;
ckpf[ckpfs]="XA";
jb-=99;
}
if(gm=='4'&&jb<666)
{
cout<<"\n\t\t\t\t\t买不起!";
Sleep(1000);
}
else if(gm=='4')
{
pfd="┳";
ckpfs++;
ckpf[ckpfs]="┳";
jb-=666;
}
if(gm=='3'&&jb<99)
{
cout<<"\n\t\t\t\t\t买不起!";
Sleep(1000);
}
else if(gm=='3')
{
pfd="MC";
ckpfs++;
ckpf[ckpfs]="MC";
jb-=99;
}
if(gm=='0')
{
system("cls");
return 1;
}
}
}
int nw(int com){
//1 定型
for(i=0;i<=2047;i++){
for(j=1;j<=255;j++){
a[com][1][j][i]=0;
}
}
for(i=1;i<=50;i++) hand[com][i]=0;
int ke=0;
cin>>seed;
srand((unsigned)seed);
y[com]=1024;
int top=0,tot=rdm(40,60);
for(i=0;i<2048;i++){
if(i==1024){
x[com]=tot;
do{
++x[com];
}while(a[com][1][x[com]][top]!=0);
x[com]+=20;
}
a[com][1][tot+1][top]=3;
a[com][1][tot+1][top-3]=3;
a[com][1][tot+1][top-2]=3;
a[com][1][tot+1][top-1]=3;
a[com][1][tot+1][top+1]=3;
a[com][1][tot+1][top+2]=3;
a[com][1][tot+1][top+3]=3;
a[com][1][tot+2][top-3]=3;
a[com][1][tot+2][top-2]=3;
a[com][1][tot+2][top]=3;
a[com][1][tot+2][top-1]=3;
a[com][1][tot+2][top+1]=3;
a[com][1][tot+2][top+2]=3;
a[com][1][tot+2][top+3]=3;
a[com][1][tot+3][top-2]=3;
a[com][1][tot+3][top]=3;
a[com][1][tot+3][top-1]=3;
a[com][1][tot+3][top+1]=3;
a[com][1][tot+3][top+2]=3;
a[com][1][tot+4][top]=3;
a[com][1][tot+4][top-1]=3;
a[com][1][tot+4][top+1]=3;
for(j=tot;j>=0;j--){
a[com][1][j][top]=3;
}
top++;
int u=rdm(0,10);
if(u>=9) tot++;
if(u<=1) tot--;
if(tot>=256)tot=255;
if(tot<10) tot=10;
int uu=rdm(0,8);
/* if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && ke+1<top && seed!=1234567890)||(seed==123456789)){
ke=top;
a[com][1][tot+1][top]=6;
a[com][1][tot+2][top]=6;
a[com][1][tot+3][top]=6;
int uuu=rdm(0,3);
if(uuu==1){
a[com][1][tot+4][top]=6;
a[com][1][tot+4][top-3]=2;
a[com][1][tot+4][top-2]=2;
a[com][1][tot+4][top-1]=2;
a[com][1][tot+4][top+1]=2;
a[com][1][tot+4][top+2]=2;
a[com][1][tot+4][top+3]=2;
a[com][1][tot+5][top-3]=2;
a[com][1][tot+5][top-2]=2;
a[com][1][tot+5][top]=2;
a[com][1][tot+5][top-1]=2;
a[com][1][tot+5][top+1]=2;
a[com][1][tot+5][top+2]=2;
a[com][1][tot+5][top+3]=2;
a[com][1][tot+6][top-2]=2;
a[com][1][tot+6][top]=2;
a[com][1][tot+6][top-1]=2;
a[com][1][tot+6][top+1]=2;
a[com][1][tot+6][top+2]=2;
a[com][1][tot+7][top]=2;
a[com][1][tot+7][top-1]=2;
a[com][1][tot+7][top+1]=2;
}else{
a[com][1][tot+3][top-3]=2;
a[com][1][tot+3][top-2]=2;
a[com][1][tot+3][top-1]=2;
a[com][1][tot+3][top+1]=2;
a[com][1][tot+3][top+2]=2;
a[com][1][tot+3][top+3]=2;
a[com][1][tot+4][top-3]=2;
a[com][1][tot+4][top-2]=2;
a[com][1][tot+4][top]=2;
a[com][1][tot+4][top-1]=2;
a[com][1][tot+4][top+1]=2;
a[com][1][tot+4][top+2]=2;
a[com][1][tot+4][top+3]=2;
a[com][1][tot+5][top-2]=2;
a[com][1][tot+5][top]=2;
a[com][1][tot+5][top-1]=2;
a[com][1][tot+5][top+1]=2;
a[com][1][tot+5][top+2]=2;
a[com][1][tot+6][top]=2;
a[com][1][tot+6][top-1]=2;
a[com][1][tot+6][top+1]=2;
}
}*/
}
//2 定系
int u=rdm(1,100),pl=0;
for(i=1;i<=2048;i++){
int tot;
for(j=256;j>=0;j--){
if(a[com][1][j][i]==3){
tot=j;
break;
}
}
if(u<=60){
a[com][1][tot][i]=1;
a[com][1][tot-1][i]=4;
a[com][1][tot-2][i]=4;
a[com][1][tot-3][i]=4;
int uu=rdm(0,8);
if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
top=i;
pl=i+1;
a[com][1][tot+1][top]=6;
a[com][1][tot+2][top]=6;
a[com][1][tot+3][top]=6;
int uuu=rdm(0,3);
if(uuu==1){
a[com][1][tot+4][top]=6;
a[com][1][tot+4][top-3]=2;
a[com][1][tot+4][top-2]=2;
a[com][1][tot+4][top-1]=2;
a[com][1][tot+4][top+1]=2;
a[com][1][tot+4][top+2]=2;
a[com][1][tot+4][top+3]=2;
a[com][1][tot+5][top-3]=2;
a[com][1][tot+5][top-2]=2;
a[com][1][tot+5][top]=2;
a[com][1][tot+5][top-1]=2;
a[com][1][tot+5][top+1]=2;
a[com][1][tot+5][top+2]=2;
a[com][1][tot+5][top+3]=2;
a[com][1][tot+6][top-2]=2;
a[com][1][tot+6][top]=2;
a[com][1][tot+6][top-1]=2;
a[com][1][tot+6][top+1]=2;
a[com][1][tot+6][top+2]=2;
a[com][1][tot+7][top]=2;
a[com][1][tot+7][top-1]=2;
a[com][1][tot+7][top+1]=2;
}else{
a[com][1][tot+3][top-3]=2;
a[com][1][tot+3][top-2]=2;
a[com][1][tot+3][top-1]=2;
a[com][1][tot+3][top+1]=2;
a[com][1][tot+3][top+2]=2;
a[com][1][tot+3][top+3]=2;
a[com][1][tot+4][top-3]=2;
a[com][1][tot+4][top-2]=2;
a[com][1][tot+4][top]=2;
a[com][1][tot+4][top-1]=2;
a[com][1][tot+4][top+1]=2;
a[com][1][tot+4][top+2]=2;
a[com][1][tot+4][top+3]=2;
a[com][1][tot+5][top-2]=2;
a[com][1][tot+5][top]=2;
a[com][1][tot+5][top-1]=2;
a[com][1][tot+5][top+1]=2;
a[com][1][tot+5][top+2]=2;
a[com][1][tot+6][top]=2;
a[com][1][tot+6][top-1]=2;
a[com][1][tot+6][top+1]=2;
}
}
}
else if(u<=80){
a[com][1][tot][i]=11;
a[com][1][tot-1][i]=11;
a[com][1][tot-2][i]=11;
a[com][1][tot-3][i]=12;
int uu=rdm(0,8);
if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
top=i;
pl=i+1;
int uuu=rdm(0,3);
if(uuu==1){
a[com][1][tot+1][top]=14;
a[com][1][tot+2][top]=14;
a[com][1][tot+3][top]=14;
a[com][1][tot+4][top]=14;
}else{
a[com][1][tot+1][top]=14;
a[com][1][tot+2][top]=14;
a[com][1][tot+3][top]=14;
}
}
}
else{
a[com][1][tot][i]=13;
a[com][1][tot-1][i]=4;
a[com][1][tot-2][i]=4;
a[com][1][tot-3][i]=4;
int uu=rdm(0,8);
if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
top=i;
pl=i+1;
a[com][1][tot+1][top]=15;
a[com][1][tot+2][top]=15;
a[com][1][tot+3][top]=15;
int uuu=rdm(0,3);
if(uuu==1){
a[com][1][tot+4][top]=15;
a[com][1][tot+4][top-3]=2;
a[com][1][tot+4][top-2]=2;
a[com][1][tot+4][top-1]=2;
a[com][1][tot+4][top+1]=2;
a[com][1][tot+4][top+2]=2;
a[com][1][tot+4][top+3]=2;
a[com][1][tot+5][top-3]=2;
a[com][1][tot+5][top-2]=2;
a[com][1][tot+5][top]=2;
a[com][1][tot+5][top-1]=2;
a[com][1][tot+5][top+1]=2;
a[com][1][tot+5][top+2]=2;
a[com][1][tot+5][top+3]=2;
a[com][1][tot+6][top-2]=2;
a[com][1][tot+6][top]=2;
a[com][1][tot+6][top-1]=2;
a[com][1][tot+6][top+1]=2;
a[com][1][tot+6][top+2]=2;
a[com][1][tot+7][top]=2;
a[com][1][tot+7][top-1]=2;
a[com][1][tot+7][top+1]=2;
}else{
a[com][1][tot+3][top-3]=2;
a[com][1][tot+3][top-2]=2;
a[com][1][tot+3][top-1]=2;
a[com][1][tot+3][top+1]=2;
a[com][1][tot+3][top+2]=2;
a[com][1][tot+3][top+3]=2;
a[com][1][tot+4][top-3]=2;
a[com][1][tot+4][top-2]=2;
a[com][1][tot+4][top]=2;
a[com][1][tot+4][top-1]=2;
a[com][1][tot+4][top+1]=2;
a[com][1][tot+4][top+2]=2;
a[com][1][tot+4][top+3]=2;
a[com][1][tot+5][top-2]=2;
a[com][1][tot+5][top]=2;
a[com][1][tot+5][top-1]=2;
a[com][1][tot+5][top+1]=2;
a[com][1][tot+5][top+2]=2;
a[com][1][tot+6][top]=2;
a[com][1][tot+6][top-1]=2;
a[com][1][tot+6][top+1]=2;
}
}
}
if(i%128==0 && i!=1024) u=rdm(1,100);
}
//
for(i=1;i<=2048;i++){
for(j=1;j<=16;j++){
if(a[com][1][j][i]==3){
int uuu=rdm(1,1000);
if(uuu<=5){
a[com][1][j][i]=7;
}
}
}
for(j=4;j<=32;j++){
if(a[com][1][j][i]==3){
int uuu=rdm(1,1000);
if(uuu<=10){
a[com][1][j][i]=8;
}
}
}
for(j=1;j<=256;j++){
if(a[com][1][j][i]==2){
int uuu=rdm(1,1000);
if(uuu<=5){
int uuuu=rdm(1,1000);
if(uuuu>200) a[com][1][j][i]=9;
else a[com][1][j][i]=10;
}
}
}
}
}
int cun(int com)
{
while(cmmd!='P' && cmmd!='p'){
cls();
for(i=x[com]+10;i>=x[com]-10;i--){
for(j=y[com]-19;j<=y[com]+19;j++){
if(i==-1 || j<0 || j>2048){
color(15);
printf("▓");
}
else if(i!=x[com] || j!=y[com]){
print(a[com][1][i][j]);
}else{
color(240);
cout<<pfd;
}
}
cout<<endl;
}
if(x[com]<=1){
x[com]=1;
}
if(x[com]>256){
x[com]=256;
}
if(y[com]<0){
y[com]=0;
}
if(y[com]>2048){
y[com]=2048;
}
color(7);
printf(">>状态栏 坐标: x:%d y:%d ",x[com],y[com]-1024);
cout<<"后位方块:";
print(a[com][1][x[com]][y[com]]);
color(7);
cout<<" **模式:";
if(kn){
cout<<"开启";
} else cout<<"关闭";
cout<<" P-退出至标题画面";
cout<<endl;
color(7);
cout<<"\t\t\t ";
for(i=1;i<=50;i++){
if(hand[com][i]>0){
print(i);
}
}
color(7);
cout<<endl<<"\t\t\t ";
for(i=1;i<=50;i++){
if(hand[com][i]>0){
printf("%02d",hand[com][i]);
}
}
cmmd=gl();
if(cmmd=='/'){
cls();
color(12);
Line("命令");
bool flag=0;
while(comd!="esc"){
color(7);
cout<<"/";
cin>>comd;
if(comd=="tp"){
cout<<"/tp @s ";
cin>>i>>j;
flag=1;
x[com]=i;
y[com]=j;
comd="esc";
}
if(!flag){
color(12);
cout<<">>语法错误"<<endl;
color(7);
}
}
comd="?";
}
if((cmmd=='W' || cmmd=='w')&& a[com][1][x[com]-1][y[com]]!=0){
if((a[com][1][x[com]+1][y[com]]==0) && (a[com][1][x[com]+2][y[com]]==0)){
x[com]+=3;
}
if((a[com][1][x[com]+1][y[com]]==0) && (a[com][1][x[com]+2][y[com]]!=0)){
x[com]+=2;
}
}
//if(cmmd=='S' || cmmd=='s') x[com]--;
if(a[com][1][x[com]-1][y[com]]==0){
Sleep(10);
x[com]--;
}
if(cmmd=='A' || cmmd=='a'){
if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]==0){
x[com]--;
y[com]--;
}
if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]!=0){
y[com]--;
}
if(a[com][1][x[com]][y[com]-1]!=0 && a[com][1][x[com]+1][y[com]-1]==0 && a[com][1][x[com]+1][y[com]]==0){
x[com]++;
y[com]--;
}
} //y[com]--;
if(cmmd=='D' || cmmd=='d'){
if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]==0){
x[com]--;
y[com]++;
}
if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]!=0){
y[com]++;
}
if(a[com][1][x[com]][y[com]+1]!=0 && a[com][1][x[com]+1][y[com]+1]==0 && a[com][1][x[com]+1][y[com]]==0){
x[com]++;
y[com]++;
}
} //y[com]++;
if(cmmd=='J' || cmmd=='j'){
kn=!kn;
Sleep(100);
}
if(kn){
if(cmmd=='Y' || cmmd=='y'){
hand[com][a[com][1][x[com]+1][y[com]-1]]++;
a[com][1][x[com]+1][y[com]-1]=0;
}
if(cmmd=='U' || cmmd=='u'){
hand[com][a[com][1][x[com]+1][y[com]]]++;
a[com][1][x[com]+1][y[com]]=0;
}
if(cmmd=='I' || cmmd=='i'){
hand[com][a[com][1][x[com]+1][y[com]+1]]++;
a[com][1][x[com]+1][y[com]+1]=0;
}
if(cmmd=='H' || cmmd=='h'){
hand[com][a[com][1][x[com]][y[com]-1]]++;
a[com][1][x[com]][y[com]-1]=0;
}
if(cmmd=='K' || cmmd=='k'){
hand[com][a[com][1][x[com]][y[com]+1]]++;
a[com][1][x[com]][y[com]+1]=0;
}
if(cmmd=='B' || cmmd=='b'){
hand[com][a[com][1][x[com]-1][y[com]-1]]++;
a[com][1][x[com]-1][y[com]-1]=0;
}
if(cmmd=='N' || cmmd=='n'){
hand[com][a[com][1][x[com]-1][y[com]]]++;
a[com][1][x[com]-1][y[com]]=0;
}
if(cmmd=='M' || cmmd=='m'){
hand[com][a[com][1][x[com]-1][y[com]+1]]++;
a[com][1][x[com]-1][y[com]+1]=0;
}
}
color(7);
}
cmmd='?';
return 0;
}
void fm(){
while(cmmd!='G' && cmmd!='g'){
system("cls");
color(240);
system("cls");
cout<<endl;
Line("XACRAFT 2.0");
cout<<endl<<endl;
color(249);
Line(" **组团队\n");
color(240);
Line("创意/营销/策划 王子逸");
Line("核心程序/外观设计 沙宸安");
cout<<endl;
color(249);
Line(" 特别鸣谢名单\n");
color(240);
Line(" 注:以上排名不分先后\n");
cout<<endl;
Line("吴庞茂旭 武 建 豪 刘 英 杰 杜 文 博 侯 平 仄");
Line("欧阳语聪 张 帆 赵 逸 凡 赵 奕 帆 陈 曦");
Line("许 金 夫 江 齐 悦 王 文 博 宣 海 宁 王 子 耀");
Line("陈 喆 鹏 包 涵 宇 潘 孝 宇 曹 灿 阳 朱 优 扬");
Line("郑 泓 毅 陈 家 傲 冮 欢 赵 泰 来 秦 子 乐");
color(252);
cout<<endl;
Line("注:所有在鸣谢名单上的人可以申请移出,达到光能级别及以上的人可以申请加入。");
color(240);
Line("[1/2]");
Line("G-切换下一页");
cmmd=getch();
}
while(cmmd!='S' && cmmd!='s'){
system("cls");
color(240);
system("cls");
cout<<endl;
Line("XACRAFT 2.0");
cout<<endl<<endl;
color(249);
Line(" 本版本更新内容\n");
color(240);
Line("这是XACRAFT的第2个版本");
Line("本版本更新内容如下:");
cout<<endl;
Line("随机地形生成美化");
Line("重力场更新");
Line("加入新生物群系:雪地、沙漠");
cout<<endl;
color(252);
Line(" XACRAFT**组团队预祝您游玩愉快!\n");
color(249);
Line(" 版权声明\n");
color(240);
Line("本游戏由兴安科技与极昼游戏工坊联合制作");
Line("版权所有 未经授权严禁转载 保留所有权利");
Line("Copyright XAscience & JizhouGameWorkshop All Rights Reserved");
cout<<endl;
color(240);
Line("[2/2]");
Line("S-开始游戏");
cmmd=getch();
}
while(cmmd!='Q' && cmmd!='q'){
system("cls");
color(240);
system("cls");
if(tecnam.empty()) rightLine("未登录TEC账号 L-登录");
else rightLine(tecnam+",欢迎您!");
color(240);
cout<<" ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ "<<endl;
cout<<" ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ "<<endl;
cout<<" ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ "<<endl;
cout<<" ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ "<<endl;
cout<<" ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" F-单人游戏 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" G-多人游戏 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" H-中心商城 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" J-教程 ";
color(240);
cout<<" ";
color(143);
cout<<" Q-退出 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" XACRAFT 2.0 Copyright XAscience & JizhouGameWorkshop Do not distribute!";
cmmd=getch();
if(cmmd=='F' || cmmd=='f'){
if(jiandang){
color(7);
cun(1);
cmmd='?';
}else{
system("cls");
color(252);
system("cls");
Line("我的存档");
color(240);
Line("新的世界");
cout<<endl<<endl;
line("输入种子: ");
color(7);
nw(1);
cun(1);
cmmd='?';
jiandang=1;
}
}
if(cmmd=='G' || cmmd=='g'){
system("cls");
color(252);
system("cls");
Line("非常抱歉");
cout<<endl;
color(240);
cout<<" 因为XACRAFT**组未能掌握联机游戏的技术,所以暂时不能体验多人游戏,给 "<<endl;
cout<<" 您带来不便,敬请谅解!";
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(cmmd=='H' || cmmd=='h') shang();
if(cmmd=='L' || cmmd=='l') TEClogin();
if(cmmd=='J' || cmmd=='j'){
system("cls");
color(240);
system("cls");
Line("新手教程");
cout<<endl;
color(240);
Line(" 注:以下键位操作大小写皆可\n");
Line(" W-跳 跃 A-左 走 D-右 走\n");
Line(" J-打开/关闭**模式\n");
Line(" YUIHKBNM 依次为:**{左上角,上方,右上角,左边,右边,左下角,下方,右下角}的方块\n");
Line(" 游戏区域的正下方会统计您**的方块\n");
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(cmmd=='#'){
system("cls");
color(12);
system("cls");
Line("除错模式");
cout<<endl;
color(7);
Line("注:本模式仅供XACRAFT内部人员使用,如果您不是XACRAFT技术人员,在使用XACRAFT除错模式后因操作不当出现问题,兴安科技和极昼工坊将不承担任何责任。");
cout<<endl<<endl;
cout<<"方块外观:";
for(i=1;i<=35;i++){
print(i);
color(7);
}
color(7);
cout<<endl<<"方块UI值:";
for(i=1;i<=35;i++){
if(i%2==1) color(9);
printf("%02d",i);
color(7);
}
cout<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
}
Sleep(1000);
return ;
}
int main(){
HideCursor();
console();
Logical_Lock();
fm();
return 0;
}
初级光能
#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include <time.h>
/*
*迷宫的高度
*/
#define Height 230
/*
*迷宫的宽度
*/
#define Width 39
#define Esc 5
#define Up 1
#define Down 2
#define Left 3
#define Right 4
#define Wall 1
#define Road 0
#define Start 2
#define End 3
int map[Height+2][Width+2];
/*
*随机生成迷宫
*/
void create(int x,int y)
{
int c[4][2]={0,1,1,0,0,-1,-1,0}; /*四个方向*/
int i,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]);
}
}
/*
*移动坐标
*/
void gotoxy(int x,int y)
{
COORD coord;
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), coord );
}
/*
*隐藏光标
*/
void hidden()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO cci;
GetConsoleCursorInfo(hOut,&cci);
cci.bVisible=0;/*赋1为显示,赋0为隐藏*/
SetConsoleCursorInfo(hOut,&cci);
}
void paint(int x,int y)
{
gotoxy(2*y-2,x-1);
switch(map[x][y])
{
case Start:
printf("进");break; /*画入口*/
case End:
printf("出");break; /*画出口*/
case Wall:
printf("■");break; /*画墙*/
case Road:
printf(" ");break; /*画路*/
}
}
/*
*接收按键
*/
int get_key()
{
char c;
while(c=getch())
{
if(c==27) return Esc; /*Esc*/
// if(c!=-32)continue;
// c=getch();
if(c==72) return Up; /*上*/
if(c==80) return Down; /*下*/
if(c==75) return Left; /*左*/
if(c==77) return Right; /*右*/
}
return 0;
}
/*
*画迷宫
*/
void game()
{
int x=2,y=1; /*玩家当前位置,刚开始在入口处*/
int c; /*用来接收按键*/
while(1)
{
gotoxy(2*y-2,x-1);
printf("★"); /*画出玩家当前位置*/
if(map[x][y]==End) /*判断是否到达出口*/
{
gotoxy(30,24);
printf("到达终点,按任意键结束");
getch();
break;
}
c=get_key();
if(c==Esc)
{
gotoxy(0,24);
break;
}
switch(c)
{
case Up: /*向上走*/
if(map[x-1][y]!=Wall)
{
paint(x,y);
x--;
}
break;
case Down: /*向下走*/
if(map[x+1][y]!=Wall)
{
paint(x,y);
x++;
}
break;
case Left: /*向左走*/
if(map[x][y-1]!=Wall)
{
paint(x,y);
y--;
}
break;
case Right: /*向右走*/
if(map[x][y+1]!=Wall)
{
paint(x,y);
y++;
}
break;
}
}
}
int main()
{
int i,j;
system("color 2b");
srand((unsigned)time(NULL)); /*初始化随即种子*/
hidden(); /*隐藏光标*/
for(i=0;i<=Height+1;i++)
for(j=0;j<=Width+1;j++)
if(i==0||i==Height+1||j==0||j==Width+1) /*初始化迷宫*/
map[i][j]=Road;
else map[i][j]=Wall;
create(2*(rand()%(Height/2)+1),2*(rand()%(Width/2)+1)); /*从随机一个点开始生成迷宫*/
for(i=0;i<=Height+1;i++) /*边界处理*/
{
map[i][0]=Wall;
map[i][Width+1]=Wall;
}
for(j=0;j<=Width+1;j++) /*边界处理*/
{
map[0][j]=Wall;
map[Height+1][j]=Wall;
}
map[2][1]=Start; /*给定入口*/
map[Height-1][Width]=End; /*给定出口*/
for(i=1;i<=Height;i++)
for(j=1;j<=Width;j++) /*画出迷宫*/
paint(i,j);
game(); /*开始游戏*/
return 0;
}
初级光能
#include <stdio.h>
#include <windows.h>
#include <time.h>
//里规格:长39*2=78 (真坐标)(假坐标宽为39) 高39
//外规格:长41*2=82 (真坐标)(假坐标宽为41) 高41
#define UP 1
#define DOWN 2
#define LEFT 3
#define RIGHT 4
#define MAX_LEVEL 8
#define BULLET_NUM 20
#define MAX_LIFE 4
//程序中未写入函数参数表中且未说明的变量只有map二维数组,level_info数组和level
/*
此程序中涉及的x,y类的坐标值,分为以下两种:
假坐标:这里的坐标指的是以一个■长度为单位的坐标,而不是真正的coord坐标 (用于map数组的坐标)
真坐标:头文件自带的坐标结构coord中的坐标(也可以说是控制台里的真正坐标值)
区别:纵坐标y两值一致,假横坐标x值与真正coord横坐标(真坐标)关系是 x * 2 = coord 横坐标
coord横坐标既指GoTo函数中的x参数,因为本程序游戏界面以一个■长度为基本单位,
可以说涉及的coord横坐标全是偶数。既假坐标要变真坐标(变真坐标才能发挥真正作用),横坐标须乘以2
*/
typedef struct //这里的出现次序指的是一个AI_tank变量中的次序,游戏共有四个AI_tank变量
{ //∵设定每个AI_tank每种特殊坦克只出现一次 ∴fast_tank & firm_tank 最多出现次数不超过1
int fast_tank_order; //fast_tank出现的次序(在第fast_tank_order次复活出现,从第0次开始),且每个AI_tank只出现一次
int firm_tank_order; //firm_tank出现的次序,同上
} LevInfo; //关卡信息(准确说是该关出现的坦克信息)
LevInfo level_info [MAX_LEVEL] = {{-1,-1},{3,-1},{-1,3},{2,3},{2,3},{2,3},{2,3},{2,3}}; //初始化,-1代表没有该类型坦克
typedef struct //子弹结构体
{
int x,y; //子弹坐标,假坐标
int direction; //子弹方向变量
bool exist; //子弹存在与否的变量,1为存在,0不存在
bool initial; //子弹是否处于建立初状态的值,1为处于建立初状态,0为处于非建立初状态
bool my; //区分AI子弹与玩家子弹的标记,0为AI子弹,1为玩家(我的)子弹
} Bullet;
Bullet bullet [BULLET_NUM]; //考虑到地图上不太可能同时存在20颗子弹,所以数组元素设置20个
typedef struct //坦克结构体
{
int x,y; //坦克中心坐标
int direction; //坦克方向
int color; //颜色参方向数,1到6分别代表不同颜色,具体在PrintTank函数定义有说明
int model; //坦克图案模型,值为1,2,3,分别代表不同的坦克图案,0为我的坦克图案,AI不能使用
int stop; //只能是AI坦克使用的参数,非0代表坦克停止走动,0为可以走动
int revive; //坦克复活次数
int num; //AI坦克编号(固定值,为常量,初始化函数中定下)0~3
int CD; //发射子弹冷却计时
bool my; //是否敌方坦克参数,我的坦克此参数为1,为常量
bool alive; //存活为1,不存活为0
} Tank;
Tank AI_tank[4] , my_tank; //my_tank为我的坦克,Ai_tank 代表AI坦克
//∵所有的函数都有可能对全局变量map进行读写(改变),
//∴函数中不另说明是否会对全局变量map读写
//基本操作与游戏辅助函数
void GoToxy(int x,int y); //光标移动
void HideCursor(); //隐藏光标
void keyboard (); //接受键盘输入
void Initialize(); //初始化(含有对多个数据的读写)
void Stop(); //暂停
void Getmap(); //地图数据存放与获取
void Frame (); //打印游戏主体框架
void PrintMap(); //打印地图(地图既地图障碍物)(含对level的读取)
void SideScreen (); //副屏幕打印
void GameCheak(); //检测游戏输赢
void GameOver( bool home ); //游戏结束
void ClearMainScreen(); //主屏幕清屏函数∵system("cls")后打印框架有一定几率造成框架上移一行的错误∴单独编写清屏函数
void ColorChoose(int color); //颜色选择函数
void NextLevel(); //下一关(含有对level全局变量的读写)
//子弹部分
void BuildAIBullet(Tank *tank); //AI坦克发射子弹(含有对my_tank的读取,只读取了my_tank坐标)
void BuildBullet (Tank tank); //子弹发射(建立)(人机共用)(含全局变量bullet的修改)我的坦克发射子弹直接调用该函数,AI通过AIshoot间接调用
void BulletFly (Bullet bullet[BULLET_NUM]); //子弹移动和打击(人机共用),
void BulletHit (Bullet* bullet); //子弹碰撞(人机共用)(含Tank全局变量的修改),只通过BulletFly调用,子弹间的碰撞不在本函数,子弹间碰撞已在BulletShoot中检测并处理
void PrintBullet (int x,int y,int T); //打印子弹(人机共用)
void ClearBullet (int x,int y,int T); //清除子弹(人机共用)
int BulletCheak (int x,int y); //判断子弹前方情况(人机共用)
//坦克部分
void BuildAITank (int* position, Tank* AI_tank); //建立AI坦克
void BuildMyTank (Tank* my_tank); //建立我的坦克
void MoveAITank (Tank* AI_tank); //AI坦克移动
void MoveMyTank (int turn); //我的坦克移动,只通过keyboard函数调用,既键盘控制
void ClearTank (int x,int y); //清除坦克(人机共用)
void PrintTank (Tank tank); //打印坦克(人机共用)
bool TankCheak (Tank tank,int direction); //检测坦克dirtection方向的障碍物,返值1阻碍,0 畅通
int AIPositionCheak (int position); //检测AI坦克建立位置是否有障碍物AIPositionCheak
//DWORD WINAPI InputX(LPVOID lpParameter); //声明线程函数,用于**X键输入并设置X键的输入冷却时间
//注意map数组应是纵坐标在前,横坐标在后,既map[y][x],(∵数组行长度在前,列长度在后)
//map里的值: 个位数的值为地图方块部分,百位数的值为坦克,子弹在map上没有值(子弹仅仅是一个假坐标)
//map里的值: 0为可通过陆地,1为红砖,2黄砖,5为水,100~103为敌方坦克,200为我的坦克,
//全局变量
int map[41][41]; //地图二维数组
int key_x; // X键是否被“读入”的变量,也是子弹是否可以发射的变,
int bul_num; //子弹编号
int position; //位置计数,对应AI坦克生成位置,-1为左位置,0为中间,1为右,2为我的坦克位置
int speed=7; //游戏速度,调整用
int level=1; //游戏关卡数
int score=0; //游戏分数
int remain_enemy; //剩余敌人(未出现的敌人)
char* tank_figure[4][3][4]=
{
{
{"◢┃◣", "◢━◣", "◢┳◣", "◢┳◣"},
{"┣●┫", "┣●┫", "━●┃", "┃●━"},
{"◥━◤", "◥┃◤", "◥┻◤", "◥┻◤"}
},
{
{"┏┃┓", "┏┳┓", "┏┳┓", "┏┳┓"},
{"┣●┫", "┣●┫", "━●┫", "┣●━"},
{"┗┻┛", "┗┃┛", "┗┻┛", "┗┻┛"}
},
{
{"┏┃┓", "◢━◣", "┏┳◣", "◢┳┓"},
{"┣●┫", "┣●┫", "━●┃", "┃●━"},
{"◥━◤", "┗┃┛", "┗┻◤", "◥┻┛"}
},
{
{"╔┃╗", "╔╦╗", "╔╦╗", "╔╦╗"},
{"╠█╣", "╠█╣", "━█╣", "╠█━"},
{"╚╩╝", "╚┃╝", "╚╩╝", "╚╩╝"}
}
};
int main () //主函数
{
int i;
unsigned int interval[12]={1,1,1,1,1,1,1,1,1,1,1,1} ; //间隔计数器数组,用于控制速度
srand(time(NULL)); //设置随机数种子(若不设置种子而调用rand会使每次运行的随机数序列一致)随机数序列指:如首次调用rand得到1,第二次得2,第三次3,则此次随机数序列为1,2,3
HideCursor(); //隐藏光标
system("mode con cols=112 lines=42"); //控制窗口大小
Frame (); //打印游戏主体框架
Initialize(); //初始化,全局变量level初值便是1
// HANDLE h1 , h2 ; //定义句柄变量
for(;;)
{
if(interval[0]++%speed==0) //速度调整用,假设interval[0]为a, 语句意为 a % 2==0,a=a+1;
{
GameCheak(); //游戏胜负检测
BulletFly ( bullet );
for(i=0 ; i<=3 ; i++) //AI坦克移动循环
{
if(AI_tank[i].model==2 && interval[i+1]++%2==0) //四个坦克中的快速坦克单独使用计数器1,2,3,4
MoveAITank( & AI_tank[i]);
if(AI_tank[i].model!=2 && interval[i+5]++%3==0) //四个坦克中的慢速坦克单独使用计数器5,6,7,8
MoveAITank( & AI_tank[i]);
}
for(i=0;i<=3;i++) //建立AI坦克部分
if(AI_tank[i].alive==0 && AI_tank[i].revive<4 && interval[9]++%90==0) //一个敌方坦克每局只有4条命
{ //如果坦克不存活。计时,每次建立有间隔 1750 ms
BuildAITank( &position, & AI_tank[i] ); //建立AI坦克(复活)
break; //每次循环只建立一个坦克
}
for(i=0;i<=3;i++)
if(AI_tank[i].alive)
BuildAIBullet(&AI_tank[i]); //AIshoot自带int自增计数CD,不使用main中的CD interval
if(my_tank.alive && interval[10]++%2==0 )
keyboard ();
if(my_tank.alive==0 && interval[11]++%30==0 && my_tank.revive < MAX_LIFE)
BuildMyTank( &my_tank );
}
Sleep(5);
}
return 0;
}
/*//这里的多线程暂时不用 //x键用于子弹发射,x键的冷却时间不能和上下左右一同设置,那样就太快了
DWORD WINAPI InputX(LPVOID lpParameter) //如果不用多线程运行,那么在x键冷却时间内程序会因Sleep将会挂起,暂停运行
{ //因为只有一个变量改变,而且变量改变先后顺序是显而易见的,所以不必设置缓冲区
for(;;)
{
if(GetAsyncKeyState( 88 )& 0x8000) //88为x键键值,当摁下x并且x键处于可输入状态
{
key_x=1; // X键是否允许被“读入”的变量,也是子弹是否可以发射的变量
Sleep(600); // 子线程Sleep中,x就不能被"读入",主线程每操作完一次子弹发射,key_x会归零
}
Sleep(10);
}
return 0;
}*/
void keyboard ()
{ // kbhit() getch() 用法可用但是不好用
/*
函数功能:该函数判断在此函数被调用时,某个键是处于UP状态还是处于DOWN状态,及前次调用GetAsyncKeyState函数后,
是否按过此键.如果返回值的最高位被置位,那么该键处于DOWN状态;如果最低位被置位,那么在前一次调用此函数后,此键被按过,
否则表示该键没被按过.
这里GetAsyncKeyState比 kbhit() + getch() 好用,操作更顺畅. GetAsyncKeyState的返回值表示两个内容,
一个是最高位bit的值,代表这个键是否被按下。一个是最低位bit的值,代表上次调用GetAsyncKeyState后,这个键是否被按下。
&为与操作,&0x8000就是判断这个返回值的高位字节。如果high-order bit是1,则是按下状态,否则是弹起状态,为0
*/
int count=0;
if (GetAsyncKeyState(VK_UP)& 0x8000)
MoveMyTank( UP );
else if (GetAsyncKeyState(VK_DOWN)& 0x8000)
MoveMyTank( DOWN );
else if (GetAsyncKeyState(VK_LEFT)& 0x8000)
MoveMyTank( LEFT );
else if (GetAsyncKeyState(VK_RIGHT)& 0x8000)
MoveMyTank( RIGHT );
else if (GetAsyncKeyState( 0x1B )& 0x8000) // Esc键
exit(0); //退出程序函数
else if (GetAsyncKeyState( 0x20 )& 0x8000) //空格
Stop();
else if (count++%7==0) //这里添加计数器是为了防止按键粘连不能达到微调效果
{
if (speed>1 && GetAsyncKeyState( 0x6B )& 0x8000) // +键
{
speed--;
GoToxy(102,11); //在副屏幕打印出当前速度
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED);
printf("%d ",21-speed); //副屏幕显示的速度为1~10
}
else if (speed<20 && GetAsyncKeyState( 0x6D )& 0x8000) // - 键
{
speed++;
GoToxy(102,11); //在副屏幕打印出当前速度
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED);
printf("%d ",21-speed); //副屏幕显示的速度为1~10
}
}
if(my_tank.CD==7)
{
if(GetAsyncKeyState( 88 )& 0x8000)
{
BuildBullet(my_tank);
my_tank.CD=0;
}
}
else
my_tank.CD++;
}
void BuildAIBullet(Tank *tank) //AI子弹发射(建立)含有对my_tank的读取
{
if(tank->CD==15)
{
if(!(rand()%11)) //冷却结束后在随后的每个游戏周期中有10分之一的可能发射子弹
{
BuildBullet(*tank);
tank->CD=0;
}
}
else
tank->CD++;
if(tank->CD >= 14) //AI强化部分,在冷却到达一定范围即可使用
{
if(tank->y==38 ) //如果坦克在底部(这个最优先)
{
if(tank->x < 20) //在老家左边
{
if(tank->direction==RIGHT) //坦克方向朝左
{
BuildBullet(*tank); //发射子弹
tank->CD=0;
}
}
else //在老家右边
if(tank->direction==LEFT) //坦克方向朝右
{
BuildBullet(*tank); //发射子弹
tank->CD=0;
}
}
else if(tank->x==my_tank.x+1 || tank->x==my_tank.x || tank->x==my_tank.x-1) //AI坦克在纵向上"炮口"对准我的坦克
{
if(tank->direction==DOWN && my_tank.y > tank->y || tank->direction==UP && my_tank.y < tank->y)
{ //若是AI朝下并且我的坦克在AI坦克下方(数值大的在下面)或者AI朝上我的坦克在AI上方
int big=my_tank.y , smal=tank->y , i;
if(my_tank.y < tank->y)
{
big=tank->y;
smal=my_tank.y;
}
for(i=smal+2;i<=big-2;i++) //判断AI炮口的直线上两坦克间有无障碍
if(map[i][tank->x]!=0 || map[i][tank->x]!=5) //若有障碍
break;
if(i==big-1) //若i走到big-1说明无障碍
{
BuildBullet(*tank); //则发射子弹
tank->CD=0;
}
}
}
else if(tank->y==my_tank.y+1 || tank->y==my_tank.y || tank->y==my_tank.y-1) //AI坦克在横向上"炮口"对准我的坦克
{
if(tank->direction==RIGHT && my_tank.x > tank->x || tank->direction==LEFT && my_tank.x < tank->x)
{ //若是AI朝右并且我的坦克在AI坦克右方(数值大的在下面)或者AI朝左我的坦克在AI左方
int big=my_tank.y , smal=tank->y , i;
if(my_tank.x < tank->x)
{
big=tank->x;
smal=my_tank.x;
}
for(i=smal+2;i<=big-2;i++) //判断AI炮口的直线上两坦克间有无障碍
if(map[tank->y][i]!=0 || map[tank->y][i]!=5) //若有障碍
break;
if(i==big-1) //若i走到big-1说明无障碍
{
BuildBullet(*tank); //则发射子弹
tank->CD=0;
}
}
}
}
}
void BuildBullet(Tank tank) //子弹发射(建立),传入结构体Tank,这里包含改变了全局变量结构体bullet
{ //∵实现方式为顺序循环建立子弹,每次调用改变的bullet数组元素都不同
switch(tank.direction) //∴为了方便,不将bullet放入参数,bullet作为全局变量使用
{
case UP :
bullet [bul_num].x = tank.x;
bullet [bul_num].y = tank.y-2;
bullet [bul_num].direction=1;
break;
case DOWN :
bullet [bul_num].x = tank.x;
bullet [bul_num].y = tank.y+2;
bullet [bul_num].direction=2;
break;
case LEFT :
bullet [bul_num].x = tank.x-2;
bullet [bul_num].y = tank.y;
bullet [bul_num].direction=3;
break;
case RIGHT :
bullet [bul_num].x = tank.x+2;
bullet [bul_num].y = tank.y;
bullet [bul_num].direction=4;
break;
}
bullet [bul_num].exist = 1; //子弹被建立,此值为1则此子弹存在
bullet [bul_num].initial = 1; //子弹处于初建立状态
bullet [bul_num].my=tank.my; //如果是我的坦克发射的子弹bullet.my=1,否则为0
bul_num++;
if(bul_num==BULLET_NUM) //如果子弹编号增长到20号,那么重头开始编号
bul_num=0; //考虑到地图上不可能同时存在20颗子弹,所以数组元素设置20个
}
void BulletFly(Bullet bullet[BULLET_NUM]) //子弹移动和打击
{ //含有全局变量Bullet的改变
for(int i =0; i<BULLET_NUM;i++)
{
if(bullet [i].exist) //如果子弹存在
{
if(bullet [i].initial==0) //如果子弹不是初建立的
{
if(map[bullet[i].y] [bullet[i].x]==0 || map[bullet[i].y] [bullet[i].x]==5) //如果子弹坐标当前位置无障碍
ClearBullet( bullet[i].x , bullet[i].y , BulletCheak(bullet[i].x , bullet[i].y )); //抹除子弹图形
switch(bullet [i].direction) //然后子弹坐标变化(子弹变到下一个坐标)
{
case UP :(bullet [i].y)--;break;
case DOWN :(bullet [i].y)++;break;
case LEFT :(bullet [i].x)--;break;
case RIGHT :(bullet [i].x)++;break;
}
}
int collide = BulletCheak ( bullet [i].x , bullet [i].y ); //判断子弹当前位置情况,判断子弹是否碰撞,是否位于水面上。
if( collide ) //如果检测到当前子弹坐标无障碍(无碰撞)(包括在地面上与在水面上)
PrintBullet( bullet[i].x , bullet[i].y , collide); //则打印子弹,若有碰撞则不打印
else
BulletHit( & bullet [i] ); //若有碰撞则执行子弹碰撞函数
if(bullet [i].initial) //若子弹初建立,则把初建立标记去除
bullet [i].initial = 0;
for(int j=0; j< BULLET_NUM ; j++) //子弹间的碰撞判断,若是我方子弹和敌方子弹碰撞则都删除,若为两敌方子弹则无视
if(bullet [j].exist && j!=i && (bullet[i].my || bullet[j].my) && bullet[i].x==bullet[j].x && bullet[i].y==bullet[j].y)
{ //同样的两颗我方子弹不可能产生碰撞
bullet [j].exist=0;
bullet [i].exist=0;
ClearBullet( bullet[j].x , bullet[j].y , BulletCheak(bullet[j].x , bullet[j].y )); //抹除j子弹图形,子弹i图形已被抹除
break;
}
}
}
}
void BulletHit(Bullet* bullet) //含有Tank全局变量的修改,子弹间的碰撞不在本函数,子弹间碰撞已在BulletShoot中检测并处理
{ //∵每次打中的坦克都不一样,不可能把所有坦克放在参数表中
int x=bullet->x; //∴这里的Tank使用全局变量
int y=bullet->y; //这里传入的值是子弹坐标,这两个值不需要改变
int i;
if(map[y][x]==1 || map[y][x]==2) //子弹碰到砖块
{
if(bullet->direction==UP || bullet->direction==DOWN) //如果子弹是纵向的
for(i = -1 ; i<=1 ; i++)
if(map[y][x+i]==1 || map[y][x+i]==2) //如果子弹打中砖块两旁为砖块,则删除砖,若不是(一旁为坦克或其他地形)则忽略
{
map[y][x+i]=0; //砖块碎
GoToxy(2*x+2*i,y);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED); //背景黑色
printf(" ");
}
if(bullet->direction==LEFT || bullet->direction==RIGHT) //若子弹是横向的 (与子弹纵向实现同理)
for(i = -1 ; i<=1 ; i++)
if(map[y+i][x]==1 || map[y+i][x]==2)
{
map[y+i][x]=0;
GoToxy(2*x,y+i);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED); //背景黑色
printf(" ");
}
bullet->exist=0; //这颗子弹已经不存在了
}
else if(map[y][x]==4 || map[y][x]==6 ) //子弹碰到边框或者不可摧毁方块
bullet->exist=0;
else if(bullet->my && map[y][x]>=100 && map[y][x]<104 ) //若我的子弹碰到了敌方坦克
{
int num = map[y][x]%100; //map[y][x]%100 等同于 tank.num ,可通过map值读取该坦克信息
if(AI_tank[num].model==3 && AI_tank[num].color==2) //若为firm tank,且color==2。该坦克为绿色,表明没有受到伤害
AI_tank[num].color=3; //则变成**,color=3为**
else if (AI_tank[num].model==3 && AI_tank[num].color==3)
AI_tank[num].color=4; //4为红色
else //其他类型的坦克或者firm tank为红色的情况
{
AI_tank[num].alive=0;
ClearTank(AI_tank[num].x , AI_tank[num].y); //清除该坦克
}
bullet->exist=0;
score+=100;
GoToxy(102,5); //在副屏幕上打印出分数
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
printf("%d ",score);
}
else if(map[y][x]==200 && bullet->my==0 ) //若敌方子弹击中我的坦克
{
my_tank.alive=0;
ClearTank(my_tank.x , my_tank.y);
bullet->exist=0;
my_tank.revive++; //我的坦克复活次数+1(∵我的坦克复活次数与生命值有关∴放在这里自减)
score+=100; //分数减少
GoToxy(102,5); //在副屏幕上打印出分数
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
printf("%d ",score);
GoToxy(102,7); //在副屏幕打印出我的剩余生命值
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("%d ", MAX_LIFE-my_tank.revive);
}
// else if(bullet->my==0 && map[y][x]>=100 && map[y][x]<104) //敌方子弹击中敌方坦克,可以设置两种子弹运行方式,这种暂时不用
// bullet->exist=0;
else if(map[y][x]==9) //子弹碰到家(无论是谁的子弹)
{
bullet->exist=0;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
GoToxy(38,37); printf(" ");
GoToxy(38,38); printf("◢◣ ");
GoToxy(38,39); printf("███");
GameOver(1); //游戏结束,传入1代表老家被毁
}
}
int BulletCheak (int x,int y) //判断子弹当前位置情况,判断子弹是否碰撞,是否位于水面上。
{ //有障碍返回0,无障碍且子弹在地面返回1,子弹在水面上返回2
if(map[y][x]==0)
return 1;
else if(map[y][x]==5)
return 2;
else
return 0;
}
void PrintBullet (int x,int y,int T) //当前坐标BulletCheak 的值做参量 T
{
if(T==1) // T==1 表示子弹当前坐标在陆地上
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY);
else if(T==2) // T==2 表示子弹当前坐标在水面上
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY|BACKGROUND_BLUE);
GoToxy(2*x,y);
printf("☉");
}
void ClearBullet(int x,int y,int T) //当前坐标BulletCheak 的值做参量 T
{
GoToxy(2*x,y);
if(T==2) // T==2 表示子弹当前坐标在水面上
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|BACKGROUND_BLUE|FOREGROUND_BLUE|FOREGROUND_GREEN);
printf("~");
}
else if(T==1) // T==1 表示子弹当前坐标在陆地上
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE);
printf(" ");
}
}
//position为坦克生成位置,-1为左位置,0为中间,1为右,2为我的坦克位置
void BuildAITank(int* position, Tank* AI_tank) //执行一次该函数只建立一个坦克
{ //rand函数公式:0<=rand()%(a+1)<=a 0+m<=rand()%(n-m+1)+m<=n
//rand函数实现1到n:1<=rand()%(n)+1<=n
if(AIPositionCheak(*position)) //若此位置无障碍,可生成。position参数详见AIPositionCheak函数定义
{
AI_tank->x= 20 + 18*(*position); //20 + 18 * position 对应三个生成位置的x假坐标
AI_tank->y=2;
if(AI_tank->revive==level_info[level-1].firm_tank_order) //坦克出现(复活)次序==关卡信息(level_info)中firm tank的出现次序
{
AI_tank->model = 3; //3为firm tank的模型(外观)
AI_tank->color = 2; //颜色参数2为绿色,具体详见函数ColorChoose
}
else if(AI_tank->revive==level_info[level-1].fast_tank_order) //同上if,这里是fast_tank的
{
AI_tank->model = 2;
AI_tank->color = rand()%6+1; //若不是firm tank则随机颜色,颜色参数为1~6,分别代表不同颜色,详见函数ColorChoose
}
else //普通坦克
{
AI_tank->model = 1;
AI_tank->color = rand()%6+1; //若不是firm tank则随机颜色
}
AI_tank->alive = 1; //坦克变为存在
AI_tank->direction = 2 ; //方向朝下
AI_tank->revive++; //复活次数+1
PrintTank(*AI_tank);
(*position)++;
remain_enemy--;
GoToxy(102,9); //在副屏幕上打印剩余坦克数
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
printf("%d ",remain_enemy);
if(*position==2) //position只能为0,1,-1,这里position循环重置
*position = -1;
return ; //若生成了一辆坦克,则结束该函数
}
}
int AIPositionCheak( int position ) //position为坦克生成位置2为我的坦克位置,其余为AI位,-1为左位,0为中间位置,1为右位
{
int x,y;
if(position==2) //2为我的坦克位置,现在暂时用不到
x=15,y=38;
else
y=2 , x= 20 + 18 * position ; //20 + 18 * position 对应三个生成位置的x假坐标
for(int i=0;i<3;i++)
for(int j=0;j<3;j++)
if( map[y+j-1][x+i-1]!=0) //如果遍历的九宫格里有障碍物
return 0; //则返回0,表示此生成位置有阻碍
return 1; //否则生成1,表示此生成位置无阻碍
}
void MoveAITank(Tank* AI_tank) //AI专用函数,该函数主要为AI加强
{
if(AI_tank->alive) //如果坦克活着
{
if(AI_tank->stop!=0) //坦克是否停止运动的判断,若stop参数不为0
{
AI_tank->stop--; //则此坦克本回合停止运动
return;
}
if( !(rand()%23) ) //22分之1的概率执行方向重置
{
AI_tank->direction = rand()%4+1;
if( rand()%3 ) //在方向重置后有2分之1的概率停止走动3步的时间
{
AI_tank->stop=2;
return;
}
}
ClearTank (AI_tank->x , AI_tank->y);
if(TankCheak ( *AI_tank , AI_tank->direction)) //如果前方无障碍
switch ( AI_tank->direction )
{
case UP : AI_tank->y--; break; //上前进一格
case DOWN : AI_tank->y++; break; //下前进一格
case LEFT : AI_tank->x--; break; //左前进一格
case RIGHT: AI_tank->x++; break; //右前进一格
}
else //前方有障碍
{
if(!(rand()%4)) //3分之1的概率乱转
{
AI_tank->direction=rand()%4+1;
AI_tank->stop=2; //乱转之后停止走动3步的时间
PrintTank(*AI_tank);
return; //∵continue会跳过下面的打印函数,∴这里先打印
}
else //另外3分之2的几率选择正确的方向
{
int j;
for(j=1;j<=4;j++)
if(TankCheak ( *AI_tank , j )) //循环判断坦克四周有无障碍,此函数返值1为可通过
break;
if(j==5) //j==5说明此坦克四周都有障碍物,无法通行
{
PrintTank(*AI_tank);
return; //则跳过下面的while循环以防程序卡**
}
while(TankCheak ( *AI_tank , AI_tank->direction) == 0) //如果前方仍有障碍
AI_tank->direction=(rand()%4+1); //则换个随机方向检测
}
}
PrintTank(*AI_tank); //打印AI坦克
}
}
void BuildMyTank (Tank* my_tank) //建立我的坦克
{
my_tank->x=15;
my_tank->y=38;
my_tank->stop=NULL;
my_tank->direction=1;
my_tank->model=0;
my_tank->color=1;
my_tank->alive=1;
my_tank->my=1;
my_tank->CD=7;
PrintTank (*my_tank) ; //打印我的坦克
}
void MoveMyTank(int turn ) //玩家专用函数,turn为keyboard函数里因输入不同方向键而传入的不同的值
{
ClearTank(my_tank.x , my_tank.y); //map 数组中“我的坦克”参数清除工作已在此函数中完成
my_tank.direction=turn; //将键盘输入的方向值传入我的坦克方向值
if(TankCheak ( my_tank , my_tank.direction )) //若此时我的坦克当前方向上无障碍
switch (turn)
{
case UP : my_tank.y--; break; //上前进一格
case DOWN : my_tank.y++; break; //下前进一格
case LEFT : my_tank.x--; break; //左前进一格
case RIGHT: my_tank.x++; break; //右前进一格
} //若坦克当前方向上有障碍则跳过坐标变化直接打印该转向的坦克
PrintTank (my_tank);
}
bool TankCheak(Tank tank,int direction) //检测坦克前方障碍函数,参量为假坐标。返值1为可通过,返值0为阻挡(人机共用)
{
switch(direction) //direction变量 1上,2下,3左,4右
{
case UP:
if (map[tank.y-2][tank.x]==0 && map[tank.y-2][tank.x-1]==0 && map[tank.y-2][tank.x+1]==0)
return 1;
else
return 0;
case DOWN:
if (map[tank.y+2][tank.x]==0 && map[tank.y+2][tank.x-1]==0 && map[tank.y+2][tank.x+1]==0)
return 1;
else
return 0;
case LEFT:
if (map[tank.y][tank.x-2]==0 && map[tank.y-1][tank.x-2]==0 && map[tank.y+1][tank.x-2]==0)
return 1;
else
return 0;
case RIGHT:
if (map[tank.y][tank.x+2]==0 && map[tank.y-1][tank.x+2]==0 && map[tank.y+1][tank.x+2]==0)
return 1;
else
return 0;
default:
printf("错误!!");
Sleep(5000);
return 0;
}
}
void ClearTank(int x,int y) //清除坦克函数(人机共用)
{
for(int i=0;i<3;i++)
for(int j=0;j<3;j++)
{ //将坦克占用的地图上的九格去掉
map[y+j-1][x+i-1]=0;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN);
GoToxy(2*x+2*j-2,y+i-1);
printf(" ");
}
}
void PrintTank(Tank tank) //打印坦克(人机共用) 由于读取的Tank参数较多,故就不将参数一一传入了
{ // tank.color参数对应不同的颜色,范围 1 ~ 6
ColorChoose(tank.color); //颜色选择函数 定义一个数组里装着字符指针(既装字符串)的数组指针(指向一维数组首地址的指针)
char *(*tankF)[4] = tank_figure[tank.model]; //将二维数组首址赋初值给数组指针 model==0为我的坦克,4为电脑1坦克,8为电脑2,类推
for(int i = 0; i < 3; i++)
{
GoToxy((tank.x-1)*2 , tank.y-1+i); //在坦克中心坐标的左边,上中下三行打印
printf("%s", tankF[i][tank.direction-1]); //打印的是地址,地址既字符串
for(int j=0;j<3;j++)
if(tank.my) //若为我的坦克
map[tank.y+j-1][tank.x+i-1]=200; //在map上把"坦克"九格填满代表敌我坦克的参数。敌方此值为100~103,我方为200
else
map[tank.y+j-1][tank.x+i-1]=100+tank.num; //这样可以通过map值读取坦克编号,读取操作在BulletHit 函数
}
}
void HideCursor() //隐藏光标
{ //CONSOLE_CURSOR_INFO结构体包含控制台光标的信息,DWORD dwSize光标百分比厚度(1~100)和BOOL bVisible光标是否可见
CONSOLE_CURSOR_INFO cursor_info={1,0};
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info); //SetConsoleCursorInfo用来设置指定的控制台光标的大小和可见**。
}
void GoToxy(int x,int y) //光标移动函数,X表示横坐标,Y表示纵坐标。
{
COORD coord; //使用头文件自带的坐标结构
coord.X=x; //这里将int类型值传给short,不过程序中涉及的坐标值均不会超过short范围
coord.Y=y;
HANDLE a=GetStdHandle(STD_OUTPUT_HANDLE); //获得标准输出句柄
SetConsoleCursorPosition(a,coord); //以标准输出的句柄为参数设置控制台光标坐标
}
void ColorChoose(int color) //颜色选择函数
{
switch(color)
{
case 1: //天蓝色(我的坦克颜色)
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
break;
case 2: //绿色
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
break;
case 3: //**
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
break;
case 4: //红色
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
break;
case 5: //紫色
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
break;
case 6: //白色
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN);
break;
case 7: //深蓝色(∵颜色深难与黑色背景辨识度不高 ∴坦克颜色不选用此颜色),只用在字体颜色闪烁中
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
break;
}
}
void Stop() //暂停
{
int color=1,timing=0;
while(1)
{
if(timing++%30==0)
{
ColorChoose(color); //颜色选择
GoToxy(100,13); //副屏幕打印
printf("游戏暂停");
GoToxy(88,17);
printf("按回车键回到游戏");
GoToxy(88,18);
printf("或按 Esc键退出游戏");
if(++color==8)
color=1;
}
if (GetAsyncKeyState( 0xD )& 0x8000) //回车键
{
GoToxy(100,13); //副屏幕打印
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
printf("正在进行"); //覆盖掉原来的提示
GoToxy(88,17);
printf(" ");
GoToxy(88,18);
printf(" ");
break;
}
else if(GetAsyncKeyState( 0x1B )& 0x8000) //Esc键退出
exit(0);
Sleep(20);
}
}
void ClearMainScreen() //主屏幕清屏函数,因使用system("cls");再打印框架有一定几率造成框架上移一行的错误,所以单独编写清屏函数
{
for(int i=1;i<40;i++)
{
GoToxy(2,i);
printf(" ");
}
}
void Frame () //打印游戏主体框架
{ //SetConsoleTextAttribute为设置文本颜色和文本背景颜色函数
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_INTENSITY);
printf(" ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY|FOREGROUND_BLUE);
printf(" ▂▂▂▂▂▂▂▂▂▂▂▂▂ \n");
for(int i=0;i<14;i++)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_INTENSITY);
printf("▕ ▏");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY|FOREGROUND_BLUE);
printf(" | |\n");
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_INTENSITY);
printf("▕ ▏");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY|FOREGROUND_BLUE);
printf(" |═════════════|\n");
for(int i=0;i<24;i++)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_INTENSITY);
printf("▕ ▏");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY|FOREGROUND_BLUE);
printf(" | |\n");
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_INTENSITY);
printf(" ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ ");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY| FOREGROUND_BLUE);
printf(" ﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊\n");
SideScreen (); //打印副屏幕
}
void PrintMap() // 打印地图(地图既地图障碍物)
{
for(int j=0;j<41;j++)
for(int i=0;i<41;i++)
if(map[i][j]==6)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN
|FOREGROUND_RED|FOREGROUND_BLUE|BACKGROUND_GREEN|BACKGROUND_RED|BACKGROUND_BLUE);
GoToxy(2*j,i);
printf("■");
}
else if(map[i][j]==2)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED|BACKGROUND_GREEN|BACKGROUND_RED);
GoToxy(2*j,i);
printf("▓");
}
else if(map[i][j]==1)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|BACKGROUND_GREEN|BACKGROUND_RED);
GoToxy(2*j,i);
printf("▓");
}
else if(map[i][j]==5)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|BACKGROUND_BLUE|FOREGROUND_BLUE|FOREGROUND_GREEN);
GoToxy(2*j,i);
printf("~");
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
GoToxy(38,37); printf("◣★◢");
GoToxy(38,38); printf("███"); //∵无论地图怎么变,家所在位置不变,且家的字符多种,不方便用上述方式打印
GoToxy(38,39); printf("◢█◣"); //∴直接打印(且家的map值与符号无关)
}
void GetMap() //地图存放函数
{ //map里的值: 个位数的值为地图方块部分,百位数的值为坦克
int i ,j; //map里的值: 0为可通过陆地,1为红砖,2待定,5为水,100为敌方坦克,200为我的坦克,
int Map[8][41][41]=
{
{
{4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
{4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
{4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
{4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,4},
{4,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
{4,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
{4,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
{4,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,4},
{4,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,4},
{4,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,4},
{4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
},
};
for(i=0;i<41;i++)
for(j=0;j<41;j++)
map[i][j]=Map[level-1][i][j];
PrintMap(); //打印地图
}
void GameOver(bool home)
{
int timing=0,color=1;
while(1)
{
if(timing++%30==0) //游戏结束原因为生命值为0
{
ColorChoose(color); //颜色选择
if(home) //游戏结束原因为老家被毁,则多打印一行字以提示玩家
{
GoToxy(37,19); //主屏幕中心打印
printf("老家被毁!");
}
GoToxy(37,20); //主屏幕中心打印
printf("游戏结束!");
GoToxy(100,13); //副屏幕打印
printf("游戏结束");
GoToxy(88,17);
printf("请按回车键重新开始!");
GoToxy(88,18);
printf("或按 Esc键退出游戏!");
if(++color==8)
color=1;
}
if (GetAsyncKeyState( 0xD )& 0x8000) //回车键
{
// system("cls"); //清屏,这里清屏后再次打印框架有一定几率造成框架上移一行的bug,因此选用自建清屏函数
// Frame (); //重新打印游戏框架
score-=500; //分数-500
ClearMainScreen(); //主屏清屏函数,无需再次打印框架
Initialize(); //从本关重新开始
break;
}
else if(GetAsyncKeyState( 0x1B )& 0x8000) //Esc键退出
exit(0);
Sleep(20);
}
}
void NextLevel()
{
int timing=0,color=1;
level++;
if(level<=MAX_LEVEL)
while(1)
{
if(timing++%10==0)
{
ColorChoose(color); //颜色选择
GoToxy(37,20); //主屏幕中心打印
printf("恭喜过关!");
GoToxy(100,13); //副屏幕打印
printf("等待下关");
GoToxy(87,17);
printf("请按回车键进入下一关!");
GoToxy(88,18);
printf("或按 Esc键退出游戏!");
if(++color==8)
color=1;
}
if (GetAsyncKeyState( 0xD )& 0x8000) //回车键
{
GoToxy(88,17); //抹除副屏幕中的提示
printf(" ");
GoToxy(88,18);
printf(" ");
ClearMainScreen(); //主屏清屏函数,无需再次打印框架
Initialize(); //初始化从下一关开始,level已++
break;
}
else if(GetAsyncKeyState( 0x1B )& 0x8000) //Esc键退出
exit(0);
Sleep(20);
}
else //level>8 通关
while(1)
{
if(timing++%5==0)
{
ColorChoose(color);
GoToxy(33,20); //主屏幕中心打印
printf("恭喜通过全部关卡!");
GoToxy(100,13); //副屏幕打印
printf("已通全关");
GoToxy(88,17);
printf("恭喜通过全部关卡!");
GoToxy(88,19);
printf("按 Esc键退出游戏!");
if(++color==8)
color=1;
}
if(GetAsyncKeyState( 0x1B )& 0x8000) //Esc键退出
exit(0);
Sleep(10);
}
}
void GameCheak()
{ //剩余敌人为0且四坦克全部不存活
if(remain_enemy<=0 && !AI_tank[0].alive && !AI_tank[1].alive && !AI_tank[2].alive && !AI_tank[3].alive )
NextLevel(); //进入下一关
if(my_tank.revive>=MAX_LIFE) //我的生命值(复活次数)全部用完 MAX_LIFE
GameOver(0); //游戏结束,传入0代表我的复活次数用光(生命值为0)。游戏结束有两种判断,另一种是老家被毁
}
void SideScreen () //副屏幕 行(84起,110末,若双字符宽则在108打印最后一个字)列(11上屏末,13下屏初,39下屏末。为美观最好打在38)
{ // | 第 d 关 | " | |\n"
GoToxy(93,2);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED);
printf("第 关");
GoToxy(92,5);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);
printf("分 数:");
GoToxy(92,7);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("生 命:");
GoToxy(86,9);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
printf("剩余敌方坦克:");
GoToxy(86,11);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
printf("当前游戏速度: %d",21-speed);
GoToxy(86,13);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
printf("当前游戏状态:");
GoToxy(94,19);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED);
GoToxy(94,24);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED);
printf("帮 助");
GoToxy(86,27);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("方向键 ←↑→↓ 移动");
GoToxy(93,29);
printf("x 键 射击");
GoToxy(89,31);
printf("+ - 调整游戏速度");
GoToxy(90,33);
printf("游戏速度范围1~20");
GoToxy(90,35);
printf("回车键 暂停游戏");
GoToxy(90,37);
printf("Esc键 退出游戏");
/* printf("帮 助"); //这是第二种详细说明的样式
GoToxy(86,21);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("方向键 ←↑→↓ 移动");
GoToxy(93,23);
printf("x 键 射击");
GoToxy(89,25);
printf("+ - 调整游戏速度");
GoToxy(90,27);
printf("游戏速度范围1~20");
GoToxy(90,29);
printf("回车键 暂停游戏");
GoToxy(90,31);
printf("Esc键 退出游戏");
GoToxy(86,33);
printf("敌方坦克全部消灭则过关");
GoToxy(87,34);
printf("己方坦克生命值为0 或");
GoToxy(86,35);
printf("正下方的老家被毁则失败");
GoToxy(86,36);
printf("己坦克与敌坦克子弹碰撞");
GoToxy(87,37);
printf("则抵消,敌坦克间子弹碰");
GoToxy(86,38);
printf("撞不抵消且可穿过敌坦克");*/
}
void Initialize() //初始化
{
remain_enemy=16;
my_tank.revive=0; //我的坦克复活次数为0
position=0;
bul_num=0;
GetMap();
BuildMyTank( &my_tank );
for(int i=0;i<12;i++) //子弹初始化
{
bullet [i].exist=0;
bullet [i].initial=0;
}
for(int i=0;i<=3;i++) //AI坦克初始化
{
AI_tank [i].revive=0;
AI_tank [i].alive=0; //初始化坦克全是不存活的,BuildAITank()会建立重新建立不存活的坦克
AI_tank [i].stop=0;
AI_tank [i].num=i;
AI_tank [i].my=0;
AI_tank [i].CD=0;
}
GoToxy(97,2); //在副屏幕上关卡数
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
printf("%d",level);
GoToxy(102,5); //在副屏幕上打印分数
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);
printf("%d ",score);
GoToxy(102,7); //在副屏幕打印我的剩余生命值
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("%d", MAX_LIFE-my_tank.revive);
GoToxy(102,9); //在副屏幕上打印剩余坦克数
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
printf("%d ",remain_enemy);
GoToxy(100,13); //在副屏幕上打印状态
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_GREEN);
printf("正在游戏");
}
缔造者之神
注:括号中为最主要的编写者
JUMPEL4.0:https://wenda.codingtang.com/questions/15484/(王子耀+ME)
小说诗歌浏览器11:https://wenda.codingtang.com/questions/15353/(ME)
推箱子简短版1:https://wenda.codingtang.com/questions/15153/(ME)
编程题目游戏(2.3.0):https://wenda.codingtang.com/questions/14753/(ME)
推箱子游戏11:https://wenda.codingtang.com/questions/14535/(ME)
高级天翼
#include<windows.h>
#include<assert.h>
#include<ctype.h>
#include<errno.h>
#include<float.h>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<limits.h>
#include<locale.h>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<wchar.h>
#include<wctype.h>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cerrno>
#include<clocale>
#include<cmath>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<utility>
#include<vector>
#include<cwchar>
#include<cwctype>
#include<complex.h>
#include<fenv.h>
#include<inttypes.h>
#include<stdbool.h>
#include<stdint.h>
#include<tgmath.h>
#include<assert.h>
#define CLS SetPos(1000,1000)
#include<ctype.h>
#include<errno.h>
#include<float.h>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<limits.h>
#include<locale.h>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<wchar.h>
#include<wctype.h>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cerrno>
#include<clocale>
#include<cmath>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<utility>
#include<vector>
#include<cwchar>
#include<cwctype>
#include<complex.h>
#include<fenv.h>
#include<inttypes.h>
#include<stdbool.h>
#include<conio.h>
#include <winable.h>
#pragma GCC optimize(3)
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC optimize(2)
using namespace std;
int yg,rr,gl,alg;//鱼干、肉肉、狗粮、奥利给
bool sfy;//是否有宠物
string cwm;//宠物名
int cwhgd;//好感度上限
int hgd;//好感度.
int ccfj=1;//额外金币获取;
bool sjm;//神秘猫buff
void cls(){
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
COORD coordScreen = { 0, 0 }; // home for the cursor
SetConsoleCursorPosition( hConsole, coordScreen );
}
void HideCursor(){
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
CursorInfo.bVisible = false; //隐藏控制台光标
SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void console()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO bInfo;
GetConsoleScreenBufferInfo(hOut, &bInfo );
SetConsoleTitle("行走·重启未来"); // 设置窗口的标题
COORD size = {100, 30};//设置窗口大小
SetConsoleScreenBufferSize(hOut,size);
SMALL_RECT rc = {0,0, 100, 30};
SetConsoleWindowInfo(hOut,true ,&rc);
}
double xuxx;
string dhy;
int shj=0;
int dlxui=100;
int mpf;
int du=0;
int z=0;
bool jih=0;
char sr;
int tl=100;
HANDLE hOut;
string cheng;
int xuxxel=100,xuxxels=100;//故事模式血量和血量上限
int gok=20;//故事模式攻击
int gq=0;//故事模式金币
int fw[10];//攻击范围
int zl;
struct st{
string pi[41];
int jl;
}pf;
struct ld{
int rw;
int sh;
int hp;
string zy;
}p[10];
string name;
bool zy=0;
long long qi=100;
string ren="GD";
int m1[11][36]={{0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0},
{0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8,0,0,0,0,8,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,8,0,0,0,0,0,0,0,0,0,8,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}};
int zhu();
static void SetPos(int x, int y)
{
COORD point = { x, y };//光标要设置的位置x,y
HANDLE HOutput = GetStdHandle(STD_OUTPUT_HANDLE);//使用GetStdHandle(STD_OUTPUT_HANDLE)来获取标准输出的句柄
SetConsoleCursorPosition(HOutput, point);//设置光标位置
}
int weigs(string aas)
{
for(int i=0;i<aas.size();i++)
{
cout<<aas[i];
Sleep(100);
}
return 1;
}
void color(int corcorcor){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
}
int shij()
{
system("cls");
cout<<"\n\n\n\n";
cout<<" \t\t\t欢迎来到ZBQ星际导航穿梭**中心!\n";
Sleep(2000);
cout<<" \t\t请问你要去的地方是(1.水星 2.金星 3.地球 4.火星 5.土卫二 6总空间站)" ;
int csj;
cin>>csj;
// if(csj)
}
int wei(){
int xzkk;
system("cls");
cout<<"\t\t\t\t重启未来\n\n";
Sleep(1000);
cout<<"\t\t\t 欢迎来到未来\n";
Sleep(2000);
system("cls");
weigs("和平纪元342323年,第一颗Q状离子研发成功,这意味着,人类在以后的日子里,可以横跨整个太阳系,并且只在几秒之间。3001年后,这颗人类的骄傲,突然消失,人类**通通瘫痪,世间一片荒凉!经过D342341X调查小队的报告,我们得知,Q状离子的碎片被藏在了宇宙的各个角落,你要去寻找到碎片,拯救人类!");
Sleep(2000);
system("cls");
while(1)
{
cout<<"\n\n\n\n \t\t \t|----------------------|\n";
cout<<" \t\t\t| 1.地图 2.碎片 3.退出 |\n";
cout<<" \t\t\t|----------------------|\n";
cout<<" \t\t\t选择:";
cin>>xzkk;
if(xzkk==1)
{
shij();//宇宙地图
}
if(xzkk==2)
{
//sueip();//碎片收集
}
else
{
return 1;
}
}
return 1;
}
string dhm()
{
dhy="";
char aba;
srand(time(NULL));
stringstream ss,kk,bb,aa,gg,jj,tt;
tt<<rand()%9+1;
tt>>aba;
dhy+=aba;
ss<<rand()%9+1;
ss>>aba;
dhy+=aba;
kk<<rand()%9+1;
kk>>aba;
dhy+=aba;
aa<<rand()%9+1;
aa>>aba;
dhy+=aba;
gg<<rand()%9+1;
gg>>aba;
dhy+=aba;
return dhy;
}
int bao()
{
cout<<"\n\t\t\t\t 存档已完成,请重启程序";
freopen("存档.txt","w",stdout);
cout<<qi<<"\n";
cout<<pf.jl<<"\n";
for(int i=1;i<=pf.jl;i++)
{
cout<<pf.pi[i]<<"\n";
}
cout<<zl<<"\n";
cout<<z<<"\n";
cout<<name<<"\n";
cout<<mpf<<"\n";
cout<<du<<"\n";
//cout<<cheng<<"\n";
cout<<ren<<"\n";
cout<<dlxui<<"\n";
cout<<yg<<endl<<rr<<endl<<gl<<endl<<alg;
cout<<cwhgd<<endl<<cwm<<endl<<hgd<<endl<<ccfj<<endl<<sfy;
fclose(stdout);//关闭文件
return 0;
}
int blz()
{
HideCursor();
int x1=6,y1=2,x2=5,y2=32;
while(p[1].hp>0&&p[2].hp>0)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(bl[i][j]==1)
{
cout<<"HH";
}
else if(bl[i][j]==5)
{
cout<<p[1].zy;
}
else if(bl[i][j]==6)
{
cout<<p[2].zy;
}
else
{
cout<<" ";
}
}
cout<<endl;
}
cout<<"\t\t\t玩家1hp:"<<p[1].hp<<"\t\t"<<"玩家2hp:"<<p[2].hp<<endl;
sr=getch();
if(sr=='w'&&bl[x1-1][y1]==0)
{
bl[x1-1][y1]=5;
bl[x1][y1]=0;
x1-=1;
}
else if(sr=='a'&&bl[x1][y1-1]==0)
{
bl[x1][y1-1]=5;
bl[x1][y1]=0;
y1-=1;
}
else if(sr=='s'&&bl[x1+1][y1]==0)
{
bl[x1+1][y1]=5;
bl[x1][y1]=0;
x1+=1;
}
else if(sr=='d'&&bl[x1][y1+1]==0)
{
bl[x1][y1+1]=5;
bl[x1][y1]=0;
y1+=1;
}
else if(sr=='i'&&bl[x2-1][y2]==0)
{
bl[x2-1][y2]=6;
bl[x2][y2]=0;
x2-=1;
}
else if(sr=='j'&&bl[x2][y2-1]==0)
{
bl[x2][y2-1]=6;
bl[x2][y2]=0;
y2-=1;
}
else if(sr=='k'&&bl[x2+1][y2]==0)
{
bl[x2+1][y2]=6;
bl[x2][y2]=0;
x2+=1;
}
else if(sr=='l'&&bl[x2][y2+1]==0)
{
bl[x2][y2+1]=6;
bl[x2][y2]=0;
y2+=1;
}
if(sr=='m'&&fw[2]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[1].hp-=p[2].sh;
}
else if(sr=='z'&&fw[1]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[2].hp-=p[1].sh;
}
cls();
}
if(p[1].hp<=0)
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家2胜利";
Sleep(1111);
system("cls");
return 1;
}
else
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家1胜利";
Sleep(1111);
system("cls");
return 1;
}
return 1;
}
int slz()
{
int x1=4,y1=2,x2=4,y2=33;
HideCursor();
while(p[1].hp>0&&p[2].hp>0)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(sl[i][j]==1)
{
cout<<"HH";
}
else if(sl[i][j]==5)
{
cout<<p[1].zy;
}
else if(sl[i][j]==6)
{
cout<<p[2].zy;
}
else
{
cout<<" ";
}
}
cout<<endl;
}
cout<<"\t\t\t玩家1hp:"<<p[1].hp<<"\t\t"<<"玩家2hp:"<<p[2].hp<<endl;
sr=getch();
if(sr=='w'&&sl[x1-1][y1]==0)
{
sl[x1-1][y1]=5;
sl[x1][y1]=0;
x1-=1;
}
else if(sr=='a'&&sl[x1][y1-1]==0)
{
sl[x1][y1-1]=5;
sl[x1][y1]=0;
y1-=1;
}
else if(sr=='s'&&sl[x1+1][y1]==0)
{
sl[x1+1][y1]=5;
sl[x1][y1]=0;
x1+=1;
}
else if(sr=='d'&&sl[x1][y1+1]==0)
{
sl[x1][y1+1]=5;
sl[x1][y1]=0;
y1+=1;
}
else if(sr=='i'&&sl[x2-1][y2]==0)
{
sl[x2-1][y2]=6;
sl[x2][y2]=0;
x2-=1;
}
else if(sr=='j'&&sl[x2][y2-1]==0)
{
sl[x2][y2-1]=6;
sl[x2][y2]=0;
y2-=1;
}
else if(sr=='k'&&sl[x2+1][y2]==0)
{
sl[x2+1][y2]=6;
sl[x2][y2]=0;
x2+=1;
}
else if(sr=='l'&&sl[x2][y2+1]==0)
{
sl[x2][y2+1]=6;
sl[x2][y2]=0;
y2+=1;
}
if(sr=='m'&&fw[2]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[1].hp-=p[2].sh;
}
else if(sr=='z'&&fw[1]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[2].hp-=p[1].sh;
}
cls();
}
if(p[1].hp<=0)
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家2胜利";
Sleep(1111);
system("cls");
return 1;
}
else
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家1胜利";
Sleep(1111);
system("cls");
return 1;
}
return 1;
}
int ld1()
{
int dt;
system("cls");
cout<<"\t\t\t人物选择\n\n";
cout<<"玩家1:1.射手 2.刺客 3.坦克\n";
cin>>p[1].rw;
if(p[1].rw==1)
{
p[1].zy="射";
fw[1]=4;
p[1].hp=100;
p[1].sh=5;
}
else if(p[1].rw==2)
{
p[1].zy="H ";
p[1].hp=100;
p[1].sh=20;
fw[1]=2;
}
else
{
p[1].zy="盾";
p[1].hp=300;
p[1].sh=7;
fw[1]=2;
}
cout<<"玩家2:1.射手 2.刺客 3.坦克\n";
cin>>p[2].rw;
if(p[2].rw==1)
{
p[2].zy="射";
fw[2]=4;
p[2].hp=100;
p[2].sh=5;
}
else if(p[2].rw==2)
{
p[2].zy="H ";
p[2].hp=100;
p[2].sh=20;
fw[2]=2;
}
else
{
p[2].zy="盾";
p[2].hp=300;
p[2].sh=7;
fw[2]=2;
}
system("cls");
cout<<"\n\n\n\n\n\n\t玩家1控制:w,a,s,d 玩家2控制:i,j,k,l\n";
cout<<"\t\t玩家1:z键攻击 玩家2:m键攻击\n";
Sleep(7000);
system("cls");
cout<<"\n\n\n\n\n\n\t\t地图:1.壁垒攻守 2.森林寻敌";
cin>>dt;
system("cls");
for(int i=1;i<=4;i++)
{
cout<<"\n\n\n\n\n\n\n\n\t\t\t\t载入中";
for(int j=1;j<=3;j++)
{
cout<<".";
Sleep(200);
}
system("cls");
}
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
bl[i][j]=blf[i][j];
sl[i][j]=slf[i][j];
}
}
if(dt==1)
{
system("cls");
blz();
}
else if(dt==2)
{
system("cls");
slz();
}
return 1;
}
int gs()
{
system("cls");
cout<<"\n\n\t\t\t\t古树贡献榜(前5)\n\n";
cout<<"\t\t\t1.王文博\n\t\t\t2.邓涵睿\n\t\t\t3.沈峻宇\n\t\t\t4.余彦文\n\t\t\t5.曹博扬\n\t\t\t特别贡献:沙宸安\n";
cout<< "\n\t\t\t\t探索榜\n\t\t\t1.张恩泽\n";
system("pause");
return 1;
}
int gus()
{
system("cls");
int xz;
while(1)
{
cout<<" \t\t\t乱斗模式(多人)\n\n";
cout<<"\t\t[---------------------------------]\n";
cout<<"\t\t[ 1.双人 2.三人 3.古树 4.退出 ]\n";
cout<<"\t\t[---------------------------------]\n";
cout<<"\t\t\t您的选择:";
cin>>xz;
if(xz==1)
{
ld1();
}
if(xz==2)
{
cout<<"\n\t\t\t\t\t未开封";
Sleep(1500);
}
if(xz==3)
{
gs();
}
if(xz==4)
{
system("cls");
return 1;
}
system("cls");
}
return 1;
}
void H1()
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);
CursorInfo.bVisible = 1;
SetConsoleCursorInfo(handle, &CursorInfo);
}
void H()
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);
CursorInfo.bVisible = false;
SetConsoleCursorInfo(handle, &CursorInfo);
}
int gushi()
{
ren="〓";
system("cls");
cout<<"\n 没错 你来了 其实行走世界原本是一片虚空 直到那个人的来到 他创造了世界\n";
Sleep(2500);
cout<<" 他用一个奇怪的物品 开辟了世界 他拿出来刀 打开了我们与外界的大门...\n";
Sleep(2500);
cout<<" 后来 我们才知道 这个是我们的生命之源 每当大门关闭 世界将万劫不复....\n";
Sleep(2500);
cout<<" 这是 他又会来创造世界 哦 大门之外的生物啊 他们无时无刻不在观察我...\n";
Sleep(2500);
cout<<" 现在 他们正看着我们的思想 像看书一样 他可能不会相信我们的存在 ......\n";
Sleep(2500);
cout<<" 创造我们的人 他终究会在开创一个新的世界 反复无常 多么无趣的世界啊...\n";
Sleep(2500);
cout<<" ----《行走见闻录》\n";
Sleep(5000);
system("cls");
return 1;
}
int zi()
{
system("cls");
int pfl=0;
if(z<=5)
{
cheng="超级小萌新";
}
else if(z<=10)
{
cheng="萌新玩家";
}
else if(z<=15)
{
cheng="普通玩家";
}
else if(z<=20)
{
cheng="老玩家";
}
else if(z<=25)
{
cheng="骨灰级老玩家";
}
else if(z<=30)
{
cheng="游戏忠粉";
}
else if(z>30)
{
cheng="行走 荣耀玩家";
if(pfl==0)
{
pf.jl++;
pf.pi[pf.jl]="忠";
pfl=1;
}
}
cout<<" --------------------资历-------------------\n\n";
cout<<"\t\t\t经验:"<<z<<"\n\t\t"<<"你的称号:"<<cheng;
if(cheng=="行走 荣耀玩家")
{
cout<<"\n\t已拥有皮肤:忠";
}
Sleep(3000);
system("cls");
return 1;
}
int dnjh()
{
cout<<"\n\n\n\n\t\t\t修改完后数据将重置 \n\t\t\t你想要的修改的金币数量(200000~-200000):";
cin>>qi;
cwhgd=0;sfy=0;cwm="";
hgd=0;
cout<<"重置完成!";
system("cls");
zhu();
}
int cong()//宠物**
{
srand(time(NULL));
while(1)
{
system("cls");
cout<<"\n\n\n\n\n\n\t\t\t欢迎来到宠物**!\n";
if(sfy==0)
{
cout<<"请领养一个宠物:1.摇钱树(产出大量金币) 2.神秘猫(我也不知道能干什么) 3.作者的电脑(我劝你别费钱了)\n\t\t\t\t你的选择:";
int cuxuz;
cin>>cuxuz;
if(cuxuz==1)
{
sfy=1;
cwm="摇钱树";
cwhgd=10000;
}
if(cuxuz==2)
{
sfy=1;
cwm="神秘猫";
cwhgd=20000;
}
if(cuxuz==3)
{
sfy=1;
cwm="电脑(作者的)";
cwhgd=60000;
}
system("cls");
}
int sswww;
sswww=rand()%4+1;
string zt[5]={" ","饥饿","生气","开心","休息"};
cout<<"\n\n\n\n\n\n\t\t你的宠物:"<<cwm<<" 状态:"<<zt[sswww]<<"\n";
cout<<"\t\t\t好感度:"<<hgd<<"/"<<cwhgd;
if(cwhgd==10000)
{
if(hgd>=10000)
{
cout<<"\n\t\t\t\t已激活 摇钱树\n";
ccfj=3;
}
}
if(cwhgd==20000&&hgd>=20000)
{
cout<<"\n\t\t\t\t已激活 神秘猫(随机增加金币!)\n";
sjm=1;
}
if(cwhgd==60000&&hgd>=60000)
{
cout<<"\n\t\t\t\t已激活 作者的电脑(修改参数)\n";
dnjh();//激活电脑;
}
cout<<"\n\t\t\t1.喂养宠物 2.打宠物 3.带他出去遛弯 4.退出";
cout<<"\n\t\t选择:";
int cwxz;
cin>>cwxz;
if(cwxz==1)
{
system("cls");
cout<<"\n\n\n\n\n\n\t\t\t你有鱼干"<<yg<<"份 肉肉"<<rr<<"份 狗粮"<<gl<<"份 奥利给"<<alg<<"份";
cout<<"\n\t\t\t你要喂宠物(1.鱼干 2.肉肉 3.狗粮 4.奥利给)1份?";
int weis;
cin>>weis;
if(weis==1)
{
if(yg>=1)
{
yg-=1;
cout<<"\t\t\t好感度+100";
hgd+=100;
Sleep(1000);
}
else
{
cout<<"你为了你的宠物一口空气......";
Sleep(1500);
}
}
if(weis==2)
{
if(rr>=1)
{
rr-=1;
cout<<"\t\t\t好感度+300";
hgd+=300;
Sleep(1000);
}
else
{
cout<<"你为了你的宠物一口空气......";
Sleep(1500);
}
}
if(weis==3)
{
if(gl>=1)
{
gl-=1;
cout<<"\t\t\t好感度1000";
hgd+=1000;
Sleep(1000);
}
else
{
cout<<"你为了你的宠物一口空气......";
Sleep(1500);
}
}
if(weis==4)
{
if(alg>=1)
{
alg-=1;
int kkkka=rand()%9900+100;
cout<<"\t\t\t好感度+"<<kkkka;
hgd+=kkkka;
Sleep(1000);
}
else
{
cout<<"你为了你的宠物一口空气......";
Sleep(1500);
}
}
}
if(cwxz==2)
{
cout<<"\n\t\t\t你怕是有毛病 好感度-1000,金币+100";
hgd-=1000;
qi+=100;
Sleep(1400);
}
if(cwxz==3)
{
if(sswww==1||sswww==4)
{
cout<<"\n\t\t\t你的宠物很烦你 =_=";
Sleep(1000);
}
else
{
cout<<"\n\t\t\t你与宠物的好感度增加了20";
hgd+=20;
Sleep(1000);
}
}
else
{
system("cls");
return 1;
}
system("cls");
}
}
int cang()
{
int i;
int ph;
system("cls");
cout<<"\t\t\t\t仓库\n\n\t\t";
for(i=1;i<=pf.jl;i++)
{
cout<<i<<"."<<pf.pi[i]<<" ";
if(i==13)
cout<<endl;
}
cout<<i+1<<".退出 ";
if(jih==1)
{
cout<<i+2<<"行走历史\n\t选择:";
cin>>ph;
if(ph==i+1)
{
system("cls");
return 1;
}
if(ph==1)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==2)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==3)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==4)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==5)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==6)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==7)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
} if(ph==8)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==9)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==10)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==11)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==12)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==13)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==14)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==15)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==16)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==17)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==18)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==19)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==20)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==i+2)
{
gushi();
return 1;
}
}
else
{
cout<<"\n\t选择:";
cin>>ph;
if(ph==i+1)
{
system("cls");
return 1;
}
if(ph==1)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==2)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==3)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==4)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==5)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==6)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==7)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
} if(ph==8)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==9)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==10)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==11)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==12)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==13)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==14)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==15)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==16)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==17)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==18)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==19)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==20)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
}
Sleep(2000);
system("cls");
return 1;
}
void hua()
{
system("color 70");
cout<<"\n\n\n\n\n\n\n\n\n\n\t\t\t\t源自极昼游戏工坊创建者\n";Sleep(1500);
cout<<"\t\t\t\t\t纯属虚构 本人原创\n";Sleep(1500);
cout<<"\t\t\t\t\t详情请见洛谷团队\n";Sleep(1500);
cout<<"\t\t\t\t 未来时代 是 行走 的13.1.02版本\n";Sleep(1500);
cout<<"\t\t\t\t为了大家的体验效果 请打开英文输入法\n";Sleep(1500);
cout<<"\t\t\t\t输入数据时核对一下 输入数字时不能有英文\n";Sleep(1500);
cout<<"\t\t\t\t360找到你的时候麻烦通过一下,程序可能被当成病毒了!\n";Sleep(2000);
cout<<"\t\t\t\t行走**欢迎您游玩此游戏 谢谢!"; Sleep(5000);
system("cls");
system("color 07");
}
int ce()
{
int x=::MessageBox(NULL, TEXT(" 未来时代,开启!\n 科技无双"), TEXT("新版本!"), 0);
printf("%d\n", x);
z++;
hua();
cout<<"\t\t\t\t存档许可\n\n\n\n\n\n";
cout<<"\t\t\t 1.旧的存档 2.新的世界\n";
int cus1;
cin>>cus1;
system("cls");
if(cus1==1)
{
ifstream fin("存档.txt"); //输入重定向,输入数据将从in.txt文件中读取
fin>>qi;
fin>>pf.jl;
for(int i=1;i<=pf.jl;i++)
{
fin>>pf.pi[i];
}
fin>>zl;
fin>>z;
fin>>name;
fin>>mpf;
fin>>du;
//cin>>cheng;
fin>>ren;
fin>>dlxui;
fin>>yg>>rr>>gl>>alg;
fin>>cwhgd>>cwm>>hgd>>ccfj>>sfy;
fin.close();//关闭文件
system("cls");
return 1;
}
else
{
cout<<"\t\t\t\t获取信息\n\n\n\n\n\n";
cout<<"\t\t\t名字(无限制):";
cin>>name;
if(name=="张恩泽"||name=="zhangenze")
{
qi=4000;
z+=3;
pf.jl++;
pf.pi[pf.jl]="±";
ren="±";
}
else if(name=="XA-KF"||name=="xa-kf")
{
qi=10000;
z+=100;
pf.jl++;
pf.pi[pf.jl]="∞";
ren="∞";
cout<<"\n\t\t\t\t欢迎回来 沙宸安\n";
Sleep(1000);
}
cout<<"\t\t\t\tOK,注册完成" ;
Sleep(1000);
system("cls");
return 1;
}
}
void dui(){
string dk;
system("cls") ;
cout<<"\n\n\n\n\n\n\n\t\t\t兑换码:";
cin>> dk;
if(dk==dhy&&du==0)
{
du=1;
qi+=500;
cout<<"\t\t\t获得皮肤:";
srand(time(NULL));
int jgy;
jgy=rand()%5+1;
if(jgy==1)
{
cout<<"€";
z++;
pf.jl++;
pf.pi[pf.jl]="€";
ren="€";
}
else if(jgy==2)
{
cout<<"※";
z++;
pf.jl++;
pf.pi[pf.jl]="※";
ren="※";
}
else if(jgy==3)
{
cout<<"¢";
z++;
pf.jl++;
pf.pi[pf.jl]="¢";
ren="¢";
}
else if(jgy==4)
{
cout<<"£";
z++;
pf.jl++;
pf.pi[pf.jl]="£";
ren="£";
}
else
{
cout<<"¤";
z++;
pf.jl++;
pf.pi[pf.jl]="¤";
ren="¤";
}
cout<<"\n\t\t\t金币+500";
dhy="";
Sleep(3000);
system("cls");
}
else if(du==1)
{
cout<<"\t\t\t兑换码已使用!!";
Sleep(2000);
system("cls");
}
else
{
cout<<"\t\t\t兑换码不对!!!";
Sleep(2000);
system("cls");
}
}
int zhu();
int si()
{
H();
system("cls");
HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
int f;
char ch;
int x=2;
int y=8;
system("color 07");
s[2][4]=0;
while(1)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(s[i][j]==4)
{
cout<<"HH";
}
else if (s[i][j]==6)
{
cout<<" @";
}
else if(s[i][j]==1)
{
SetConsoleTextAttribute(hstdout, 0x0C);
cout<<"OT";
}
else if(s[i][j]==0)
{
cout<<" ";
}
else if(s[i][j]==9)
{
SetConsoleTextAttribute(hstdout, 0x0E);
cout<<ren;
}
else if(s[i][j]==8)
{
SetConsoleTextAttribute(hstdout, 0x0F);
cout<<"AA";
}
}
cout<<endl;
}
ch=getch();
if(ch=='o')
{
cout<<"\n\n\n\n\n\n\n\t\t\t\t自杀成功!!" ;
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
}
if(ch=='f')
{
if(f==1)
{
a[x][y-1]=0;
}
else if(f==2)
{
a[x][y+1]=0;
}
cls();
}
else if(ch=='a')
{
if(b[x][y-1]==6)
{
a[2][5]=6;
return 1;
}
if(s[x+1][y-1]==4)
{
s[x-4][y]==9;
s[x][y]=0;
x-=4;
cls();
}
f=1;
if(s[x+1][y-1]==8)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=3;
y=8;
}
else if(s[x+1][y-1]==0&&s[x+1][y]!=1)
{
s[x+1][y-1]=9;
s[x][y]=0;
x++;
y--;
cls();
}
else if(s[x][y-1]==1&&s[x-1][y-1]!=1)
{
s[x-1][y-1]=9;
s[x][y]=0;
x--;
y--;
cls();
}
else if(s[x][y-1]!=1)
{
s[x][y-1]=9;
s[x][y]=0;
y--;
cls();
}
else
{
system("cls");
}
}
else if(ch=='z'&&s[x-1][y]!=1)
{
if(s[x-1][y]==6)
{
}
s[x][y]=1;
s[x-1][y]=9;
x-=1;
cls();
}
else if(ch=='d')
{
if(s[x+1][y+1]==4)
{
s[x-4][y]==9;
s[x][y]=0;
x-=4;
cls();
}
else if(s[x][y+1]==6)
{
return 1;
s[x][y]=0;
y+=2;
}
f=2;
if(s[x+1][y+1]==8)
{
system("cls");
system("color 0F") ;
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
else if(s[x+1][y+1]==0&&s[x-1][y+1]!=1)
{
s[x+1][y+1]=9;
s[x][y]=0;
x++;
y++;
cls();
}
else if(s[x][y+1]==1&&s[x-1][y+1]!=1)
{
s[x-1][y+1]=9;
s[x][y]=0;
x--;
y++;
cls();
}
else if(s[x][y+1]!=1)
{
s[x][y+1]=9;
s[x][y]=0;
y++;
cls();
}
else {
system("cls");
}
}
else if(ch=='w'&&s[x-1][y]!=1&&(s[x][y+1]||s[x][y-1]==1))
{
if(b[x-1][y]==6)
{
}
s[x-1][y]=9;
s[x][y]=0;
x--;
cls();
}
else if(ch=='s'&&s[x+1][y]!=1&&(s[x][y+1]==1||s[x][y-1]==1||s[x+1][y-1]==1||s[x+1][y+1]==1))
{
s[x+1][y]=9;
s[x][y]=0;
x++;
cls();
}
else
{
system("cls");
}
}
}
int huo()
{
int jia;
int kk;
int zho;
int xuxxx;
int h;
system("cls");
while(1)
{
cout<<"\t\t\t\t活动\n\n\n";
cout<<"\t1.王者之师活动 2.金币翻翻翻活动 3.行走史册活动 4.未来重启活动 5.退出";
cin>>h;
system("cls");
if(h==1)
{
while(1)
{
cout<<"\t\t\t王者之师皮肤活动!!!\n";
cout<<"\t\t\t花费50金币进行一次抽奖!!\n";
cout<<"\t\t有几率获得王者之师皮肤:□(来自王者的怒号)\n";
cout<<"\t\t\t1.开始抽奖 2.退出\n\n你的选择:";
cin>>xuxxx;
if(xuxxx==1)
{
srand(time(NULL));
zho=rand()%12+1;
if(zho==2)
{pf.jl++;
pf.pi[pf.jl]="□";
cout<<"\t\t"<<name<<"欧皇啊!!!获得皮肤!!! □";
ren="□";
z++;
}
else if(zho==1||zho==3||zho==4)
{
cout<<"\t\t\t获得70金币";
qi+=70;
z++;
}
else if(qi<60)
{
cout<<"\t\t\t金币不够了哦!!!" ;
}
else
{
cout<<"\t\t\t没有**哦!!";
}
qi-=50;
Sleep(1500);
system("cls");
}
else
{
system("cls");
break;
}
}
}
else if(h==2)
{
while(1)
{
cout<<"\t\t欢迎来到金币翻翻翻!!!(60金币1次)\n\n";
cout<<"\t\t 有几率抽到皮肤兑换码哦!!!(15分1)\n";
cout<<"\t\t 还可以翻倍金币!!!\n";
cout<<"\t\t 1.开始 2.退出\n" ;
cout<<"\t\t选择:";
cin>>kk;
if(kk==1)
{
srand(time(NULL));
jia=rand()%15+1;
if(qi<60)
{
cout<<"\t\t金币不够了哦!!";
Sleep(1000);
}
else if(jia==3)
{
z++;
cout<<"\t\t啊啊啊,无情,兑换码是:";
cout<<dhm();
du=0;
Sleep(6000);
}
else if(jia==4||jia==5||jia==6)
{
z++;
cout<<"\t\t666金币翻2倍";
qi*=2;
Sleep(1000);
}
else if(jia==2)
{
z++;
pf.jl++;
pf.pi[pf.jl]="█";
cout<<"\t\t获得皮肤:█(数据加载错误)";
ren="█";
Sleep(2000);
}
else
{
cout<<"\t\t哈哈,"<<name<<"你没有抽到啊!!";
Sleep(1000);
}
qi-=60;
system("cls");
}
else
{
system("cls");
break;
}
}
}
else if(h==3)
{
while(1)
{
cout<<"\t\t欢迎来到行走史册\n";
cout<<"\t这里抽到的皮肤可以了解行走世界的历史哦\n";
cout<<"\t另外这个属于史诗级皮肤,超级难抽(50金币一次) 但很有趣(18/1)\n";
cout<<"\t 1.抽奖 2退出 选择:";
int yt,jig;
cin>>yt;
if(yt==1)
{
srand(time(NULL));
jig=rand()%18+1;
if(qi<50)
{
cout<<"\t你的金币不够了\n";
}
else if(jig==3)
{
z++;
pf.jl++;
pf.pi[pf.jl]="〓";
cout<<"\t你有资格看到历史。。。获取皮肤:〓\n";
ren="〓";
qi-=50;
jih=1;
}
else if(jig==1||jig==2||jig==4||jig==5||jig==6||jig==7||jig==8)
{
z++;
cout<<"\t金币+99......\n";
qi+=99;
}
else
{
z++;
cout<<"\t你什么都没有抽到...\n";
qi-=50;
}
Sleep(1000);
system("cls");
}
else
{
system("cls");
break;
}
}
}
else if(h==4)
{
while(1)
{
int sxzy;
cout<<"\t\t 重启未来!\n";
cout<<"\t\t助力活动 \n";
cout<<" 规则:投入的金币数量决定助力值(1-10000)多了没效果\n";
cout<<"\t\t\t1.开始 2.退出\n";
cin>>sxzy;
int n,k;
if(sxzy==1)
{
cout<<"你都入的金币数量:";
cin>>n;
if(qi-n<0)
{
cout<<"\t\t\t没钱啦!";
Sleep(1000);
system("cls");
}
else
{
cout<<"\t\t\t助力成功!";
zl+=n;
cout<<"剩余助力值:"<<10000-zl;
qi-=n;
if(10000-zl<=0)
{
cout<<"助力完成!获得未来重启专属限定皮肤!▓技能 空间波动(身后的方块会变形)";
pf.jl++;
pf.pi[pf.jl]="▓";
Sleep(2000);
}
Sleep(2000);
system("cls");
}
}
else
{
system("cls");
return 1;
}
}
}
else if(h==5)
{
return 1;
}
}
return 1;
}
int sh(){
string zidi;
int jj;
system("cls");
cout<<"\t\t\t\t商城\n\n";
cout<<"\t\t尊贵的"<<name<<" 您有金币:"<<qi<<endl;
cout<<"\t\t1.皮肤:QW 价格100(QwQ~呜)\n";
cout<<"\t\t2.皮肤:MC 价格150(MC**)\n";
cout<<"\t\t3.皮肤:OT 价格200(方块人)\n";
cout<<"\t\t4.皮肤: . 价格250(小不点)\n";
cout<<"\t\t5.皮肤:VC 价格300(dev c++)\n";
cout<<"\t\t6.皮肤:** 价格350(挡我者**)\n";
cout<<"\t\t7.皮肤:学 价格350(学海无涯)\n";
cout<<"\t\t8.皮肤:V8 价格400(来自VIP的光芒)\n";
cout<<"\t\t9.皮肤:め 价格500(闪烁之光)\n";
cout<<"\t\t10.皮肤:自定义 价格700\n";
cout<<"\t\t11.体力*100 价格10\n";
cout<<"\t\t12.体力*200 价格19\n";
cout<<"\t\t13.体力*500 价格49\n";
cout<<"\t\t14.体力*1000 价格90\n";
cout<<"\t\t15.宠物零食 鱼干 价格100\n";
cout<<"\t\t16.宠物零食 肉肉 价格200\n";
cout<<"\t\t17.宠物零食 狗粮!价格300\n";
cout<<"\t\t18.宠物零食 奥利给 价格500\n";
cout<<"\t\t0.退出\n";
cin>>jj;
if(jj==1&&qi>=100)
{
z++;
pf.jl++;
pf.pi[pf.jl]="QW";
qi-=100;
ren="QW";
}
else if(jj==1&&qi<100)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==2&&qi>=150)
{z++;
pf.jl++;
pf.pi[pf.jl]="MC";
qi-=150;
ren="MC";
}
else if(jj==2&&qi<150)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==3&&qi>=200)
{
z++;
pf.jl++;
pf.pi[pf.jl]="OT";
qi-=200;
ren="OT";
}
else if(jj==3&&qi<200)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==4&&qi>=250)
{
z++;
pf.jl++;
pf.pi[pf.jl]=" .";
qi-=250;
ren=" .";
}
else if(jj==4&&qi<250)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==5&&qi>=300)
{
z++;
pf.jl++;
pf.pi[pf.jl]="VC";
qi-=250;
ren="VC";
}
else if(jj==5&&qi<300)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==6&&qi>=350)
{
z+=2;
pf.jl++;
pf.pi[pf.jl]="**";
qi-=350;
ren="**";
}
else if(jj==6&&qi<350)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==7&&qi>=350)
{
z+=2;
pf.jl++;
pf.pi[pf.jl]="学";
qi-=350;
ren="学";
}
else if(jj==7&&qi<350)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==8&&qi>=400)
{
z++;
pf.jl++;
pf.pi[pf.jl]="V8";
qi-=400;
ren="V8";
}
else if(jj==8&&qi<400)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==9&&qi>=500)
{
z++;
ren="め";
qi-=500;
pf.jl++;
pf.pi[pf.jl]=ren;
}
else if(jj==9&&qi<500)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==10&&qi>=700)
{
z+=3;
cout<<"自定义:";
cin>>zidi;
ren[1]=zidi[1];
ren[0]=zidi[0];
qi-=700;
pf.jl++;
pf.pi[pf.jl]=ren;
}
else if(jj==10&&qi<700)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==11&&qi>=10)
{
tl+=100;
}
else if(jj==11&&qi<10)
{
cout<<"没钱买什么体力?";
Sleep(1900);
}
if(jj==12&&qi>=19)
{
tl+=200;
qi-=19;
}
else if(jj==12&&qi<19)
{
cout<<"没钱买什么体力?";
Sleep(1900);
}
if(jj==13&&qi>=49)
{
tl+=500;
qi-=49;
}
else if(jj==13&&qi<49)
{
cout<<"没钱买什么体力?";
Sleep(1900);
}
if(jj==14&&qi>=90)
{
tl+=1000;
qi-=90;
}
else if(jj==14&&qi<90)
{
cout<<"没钱买什么体力?";
Sleep(1900);
}
if(jj==15&&qi>=100)
{
yg+=1;
qi-=100;
}
else if(jj==15&&qi<100)
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
if(jj==16&&qi>=200)
{
rr+=1;
qi-=200;
}
else if(jj==16&&qi<200)
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
if(jj==17&&qi>=300)
{
gl+=1;
qi-=300;
}
else if(jj==16&&qi<300)
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
if(jj==18&&qi>=500)
{
alg+=1;
qi-=400;
}
else if(jj==18&&qi<500)
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
if(jj==0)
{
system("cls");
return 1;
}
system("cls");
}
int suo()
{
string ya="a键向左移动,d键向右移动,w爬墙,s下墙,z键在脚下放方块,f键打掉面前的方块";
cout<<"\n\n\n\n\n\n\n\n\t\t";
for(int i=0;i<ya.size();i++)
{
cout<<ya[i];
Sleep(130);
}
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
a[i][j]=af[i][j];
b[i][j]=bf[i][j];
s[i][j]=sf[i][j];
}
}
qi+=50*ccfj;
if(sjm)
{
srand(time(NULL));
int qish=rand()%990+10;
qi+=qish;
}
z++;
cout<<"\n\n\t\t\t";
cout<<"加载中...";
cout<<"\n\t\t\t";
for(int i=1;i<=10;i++)
{
cout<<"■";
Sleep(500);
}
Sleep(1000);
system("cls");
}
void gui(){
z++;
cout<<"@"<<name<<"规则是:\n";
Sleep(700);
cout<<"a键向左走,d键向右走\n";
Sleep(1500);
cout<<"w键爬墙,s键下墙\n";
Sleep(1500);
cout<<"f键挖掉面前的方块\n";
Sleep(1500);
cout<<"z键在脚下垫方块\n";
Sleep(1500);
cout<<"有主世界和神域两个世界,神域里一个是肉体,一个是灵魂\n";
Sleep(3000);
cout<<"每玩一局会获得50金币\n";
Sleep(1500);
cout<<"活动中可以获得大量金币,有几率获得兑换码!!!\n";
Sleep(2500);
cout<<"部分皮肤拥有皮肤特有领域的新世界!!\n" ;
Sleep(1500);
cout<<"如果**不掉 就按o键 会自杀!\n";
Sleep(1500);
cout<<"打开程序前看看有没有关闭上一个程序,不然会报错\n";
Sleep(2500);
cout<<"历史要在仓库里查看哦\n";
Sleep(1500);
cout<<"体力值为0时就**了,体力可在商城中购买!!!\n";
Sleep(3000);
cout<<"神域不消耗体力,因为活动的是灵魂!!!\n";
Sleep(2500);
cout<<"版权所有,未经允许不得盗版,例:迷你世界盗版MC\n";
Sleep(6000);
system("cls");
}
int tia();
void sj1()
{
HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
system("color 04");
int x=8,y=31;
char ch;
int f;
while(1)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if (a[i][j]==6)
{
cout<<" @";
}
else if(a[i][j]==1)
{
SetConsoleTextAttribute(hstdout, 0x0C);
cout<<"OT";
}
else if(a[i][j]==0)
{
cout<<" ";
}
else if(a[i][j]==9)
{
SetConsoleTextAttribute(hstdout, 0x0E);
cout<<ren;
}
else if(a[i][j]==8)
{
SetConsoleTextAttribute(hstdout, 0x0F);
cout<<"AA";
}
}
cout<<endl;
}
cout<<"\t体力值:"<<tl;
ch=getch();
tl--;
/*if(shj%200==0&&zy!=1)
{
SetConsoleTextAttribute(hOut, BACKGROUND_RED |BACKGROUND_GREEN |BACKGROUND_BLUE |BACKGROUND_INTENSITY);
zy=1;
}
else if(shj%200==0&&zy!=0)
{
system("color 80");
zy=0;
}*/
if(ch=='o')
{
cout<<"\n\n\n\n\n\n\n\t\t\t\t自杀成功!!" ;
cout<<(char)7;
Sleep(2000);
system("cls");
x=8;
y=31;
zhu();
}
if(ch=='f')
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(f==1&&a[x][y-1]==1)
{
a[x][y-1]=0;
}
else if(f==2&&a[x][y+1]==1)
{
a[x][y+1]=0;
}
cls();
}
else if(ch=='a')
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(a[x][y-1]==6)
{
tia();
y++;
}
f=1;
if(a[x+1][y-1]==8)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
else if(a[x+1][y-1]==0&&a[x+1][y]!=1)
{
a[x+1][y-1]=9;
a[x][y]=0;
x++;
y--;
cls();
}
else if(a[x][y-1]==1&&a[x-1][y-1]!=1)
{
a[x-1][y-1]=9;
a[x][y]=0;
x--;
y--;
cls();
}
else if(a[x][y-1]!=1&&a[x][y-1]!=8)
{
a[x][y-1]=9;
a[x][y]=0;
y--;
cls();
}
else
{
system("cls");
}
}
else if(ch=='z'&&a[x-1][y]!=1)
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(a[x-1][y]==6)
{
tia();
y++;
}
a[x][y]=1;
a[x-1][y]=9;
x-=1;
cls();
}
else if(ch=='d')
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(a[x][y+1]==6)
{
tia();
a[x][y]=0;
y+=2;
}
f=2;
if(a[x+1][y+1]==8)
{
system("cls");
system("color 0F") ;
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
else if(a[x+1][y+1]==0&&a[x-1][y+1]!=1)
{
a[x+1][y+1]=9;
a[x][y]=0;
x++;
y++;
cls();
}
else if(a[x][y+1]==1&&a[x-1][y+1]!=1)
{
a[x-1][y+1]=9;
a[x][y]=0;
x--;
y++;
cls();
}
else if(a[x][y+1]!=1)
{
a[x][y+1]=9;
a[x][y]=0;
y++;
cls();
}
else {
system("cls");
}
}
else if(ch=='w'&&a[x-1][y]!=1&&(a[x][y+1]||a[x][y-1]==1))
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(a[x-1][y]==6)
{
tia();
}
a[x-1][y]=9;
a[x][y]=0;
x--;
cls();
}
else if(ch=='s'&&a[x+1][y]!=1&&(a[x][y+1]==1||a[x][y-1]==1||a[x+1][y-1]==1||a[x+1][y+1]==1))
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
a[x+1][y]=9;
a[x][y]=0;
x++;
cls();
}
else
{
system("cls");
}
shj++;
}
}
int zhu()
{
xuxx=100;
while(1)
{
if(ren=="**")
{
system("color 07");
cout<<"\n\n\n\n|-------------------------------------------------------------------------------------------------|\n";
cout<<"| 1.新游戏 2.规则 3.商城 4.活动 5.**域 6.兑换码 7.仓库 8.资历 9.乱斗模式 10.未来 11.保存 12.宠物 |\n";
cout<<"| 作者——王子逸|\n";
cout<<"|-------------------------------------------------------------------------------------------------|\n\t\t选择:";
H1();
cin>>xuxx;
if(xuxx==1)
{
system("cls");
suo();
H();
sj1();
}
else if(xuxx==2)
{
system("cls");
gui();
}
else if(xuxx==3)
{
sh();
}
else if(xuxx==4)
{
huo();
}
else if(xuxx==5)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
s[i][j]=sf[i][j];
}
}
H();
si();
}
else if(xuxx==6)
{
dui();
}
else if(xuxx==7)
{
cang();
}
else if(xuxx==8)
{
zi();
}
else if(xuxx==9)
{
gus();
}
else if(xuxx==10)
{
wei();
}
else if(xuxx==11)
{
bao();
}
if(xuxx==12)
{
cong();
}
else
{
system("cls");
}
}
else{
system("color 07");
cout<<"\n\n\n\n|---------------------------------------------------------------------------------------------------|\n";
cout<<"| 1.新游戏 2.规则 3.商城 4.活动 5.兑换码 6.仓库 7.资历 8.乱斗模式 9.未来 10.保存 11.宠物|\n";
cout<<"| 作者——永恒白昼(王子逸) |\n";
cout<<"|---------------------------------------------------------------------------------------------------|\n\t\t选择:";
H1();
cin>>xuxx;
if(xuxx==1)
{
system("cls");
suo();
H();
sj1();
}
else if(xuxx==2)
{
system("cls");
gui();
}
else if(xuxx==3)
{
sh();
}
else if(xuxx==4)
{
huo();
}
else if(xuxx==5)
{
dui();
}
else if(xuxx==6)
{
cang();
}
else if(xuxx==7)
{
zi();
}
else if(xuxx==8)
{
gus();
}
else if(xuxx==9)
{
wei();
}
else if(xuxx==10)
{
bao();
}
if(xuxx==11)
{
cong();
}
else
{
system("cls");
}
}
}
}
int tia()
{
H();
system("cls");
HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
int f;
char ch;
int x=3;
int y=8;
system("color 07");
b[2][4]=0;
while(1)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(b[i][j]==4)
{
cout<<"HH";
}
else if (b[i][j]==6)
{
cout<<" @";
}
else if(b[i][j]==1)
{
SetConsoleTextAttribute(hstdout, 0x0C);
cout<<"OT";
}
else if(b[i][j]==0)
{
cout<<" ";
}
else if(b[i][j]==9)
{
SetConsoleTextAttribute(hstdout, 0x0E);
cout<<ren;
}
else if(b[i][j]==8)
{
SetConsoleTextAttribute(hstdout, 0x0F);
cout<<"AA";
}
}
cout<<endl;
}
ch=getch();
if(ch=='o')
{
cout<<"\n\n\n\n\n\n\n\t\t\t\t天界不可自杀" ;
Sleep(2000);
system("cls");
}
if(ch=='f')
{
if(f==1)
{
b[x][y-1]=0;
}
else if(f==2)
{
b[x][y+1]=0;
}
cls();
}
else if(ch=='a')
{
if(b[x][y-1]==6)
{
a[2][5]=6;
return 1;
}
if(b[x+1][y-1]==4)
{
b[x-4][y]==9;
b[x][y]=0;
x-=4;
cls();
}
f=1;
if(b[x+1][y-1]==8)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=3;
y=8;
}
else if(b[x+1][y-1]==0&&b[x+1][y]!=1)
{
b[x+1][y-1]=9;
b[x][y]=0;
x++;
y--;
cls();
}
else if(b[x][y-1]==1&&b[x-1][y-1]!=1)
{
b[x-1][y-1]=9;
b[x][y]=0;
x--;
y--;
cls();
}
else if(b[x][y-1]!=1)
{
b[x][y-1]=9;
b[x][y]=0;
y--;
cls();
}
else
{
system("cls");
}
}
else if(ch=='z'&&b[x-1][y]!=1)
{
if(b[x-1][y]==6)
{
tia();
}
b[x][y]=1;
b[x-1][y]=9;
x-=1;
cls();
}
else if(ch=='d')
{
if(b[x+1][y+1]==4)
{
b[x-4][y]==9;
b[x][y]=0;
x-=4;
cls();
}
else if(b[x][y+1]==6)
{
return 1;
b[x][y]=0;
y+=2;
}
f=2;
if(b[x+1][y+1]==8)
{
system("cls");
system("color 0F") ;
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
else if(b[x+1][y+1]==0&&b[x-1][y+1]!=1)
{
b[x+1][y+1]=9;
b[x][y]=0;
x++;
y++;
cls();
}
else if(b[x][y+1]==1&&b[x-1][y+1]!=1)
{
b[x-1][y+1]=9;
b[x][y]=0;
x--;
y++;
cls();
}
else if(b[x][y+1]!=1)
{
b[x][y+1]=9;
b[x][y]=0;
y++;
cls();
}
else {
system("cls");
}
}
else if(ch=='w'&&b[x-1][y]!=1&&(b[x][y+1]||b[x][y-1]==1))
{
if(b[x-1][y]==6)
{
tia();
}
b[x-1][y]=9;
b[x][y]=0;
x--;
cls();
}
else if(ch=='s'&&b[x+1][y]!=1&&(b[x][y+1]==1||b[x][y-1]==1||b[x+1][y-1]==1||b[x+1][y+1]==1))
{
b[x+1][y]=9;
b[x][y]=0;
x++;
cls();
}
else
{
system("cls");
}
}
}
int main()
{
console();
hOut = GetStdHandle(STD_OUTPUT_HANDLE);
pf.jl=1;
H();
pf.pi[1]="GD";
ce();
zhu();
return 0;
}
高级天翼
#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#include<sstream>
using namespace std;
long long xue=100,ji=0,qian=0,mutou=2,xian=0,jian=1,nu=1,dao=1,gong=1,x;
string c="";
long long wlg=20,wlx=30,jsg=50,jsx=50;
void ks(){
cout<<"传说天地间有一个黑龙,它无恶不作";
Sleep(1000);
system("CLS");
cout<<"一天,它出现了!人们拼命抵挡它,可以失败告终";
Sleep(1000);
system("CLS");
cout<<"人们只好呆在安全基地里,不敢出去";
Sleep(1000);
system("CLS");
cout<<"疾病突然爆发了,人们一个接着一个的**去";
Sleep(1000);
system("CLS");
cout<<"只剩下你";
Sleep(1000);
system("CLS");
while(1){
cout<<"要出去吗\n1.出去 2.呆在基地";
int a;
cin>>a;
if(a==1){
system("CLS");
cout<<"恭喜你,逃过一劫";
Sleep(100);
system("CLS");
cout<<"走着走着,遇到一个悬崖,怎么过?\n1.武功秘籍 2.跳过去";
int b;
cin>>b;
if(b==1){
system("CLS");
cout<<"你细细学习,学成飞天后,回头一看,那武功秘籍……是假的!你摔**了……";
Sleep(3000);
system("CLS");
continue;
}else{
system("CLS");
cout<<"你轻轻一跳,发现头上竟然有一个《超级玛丽》的幸运方块,他长出了藤蔓,你顺着藤蔓,爬了过去";
Sleep(3000);
system("CLS");
cout<<"你遇到了恶龙!对决开始!";
Sleep(1000);
system("CLS");
cout<<"你要干什么?\n1.杀 2.闪 3.决斗 4.角色技能 5.八卦阵";
int c;
cin>>c;
if(c!=6){
system("CLS");
cout<<"你当这是三国杀啊!";
Sleep(1000);
continue;
}else{
cout<<"六六大神赐予我力量吧!!";
Sleep(3000);
system("CLS");
cout<<" *******"<<endl;
cout<<" * *"<<endl;
cout<<" * 66 * [·]>>>> "<<endl;
cout<<" * 之力 * |-|||||||| <-龙 "<<endl;
cout<<" * *"<<endl;
cout<<" *******"<<endl;
Sleep(1);
system("CLS");
cout<<" *******"<<endl;
cout<<" * *"<<endl;
cout<<" * 66 * [·]>>>> "<<endl;
cout<<" * 之力 * |-|||||||| <-龙 "<<endl;
cout<<" * *"<<endl;
cout<<" *******"<<endl;
Sleep(1);
system("CLS");
cout<<" *******"<<endl;
cout<<" * *"<<endl;
cout<<" * 66 * [·]>>>> "<<endl;
cout<<" * 之力 * |-|||||||| <-龙 "<<endl;
cout<<" * *"<<endl;
cout<<" *******"<<endl;
Sleep(1);
system("CLS");
system("CLS");
cout<<" *******"<<endl;
cout<<" * *"<<endl;
cout<<" * 66 * [·]>>>> "<<endl;
cout<<" * 之力 *|-|||||||| <-龙 "<<endl;
cout<<" * *"<<endl;
cout<<" *******"<<endl;
Sleep(1);
system("CLS");
cout<<"龙挂了,**是:再厉害的BOOS也打不过开挂的人 ";
Sleep(1000);
system("CLS");
break;
}
}
}else{
cout<<"你被病**了";
continue;
}
}
Sleep(3000);
cout<<"但事情没有结束,你回去时,发现**去的同伴不见了\n";
cout<<"只有一张纸条:亡灵战争……开始了!";
Sleep(3000);
system("CLS");
}
void ck(){
cout<<"你有"<<c<<" 木头:"<<mutou<<" 线"<<xian<<" "<<qian<<"元";
Sleep(3000);
system("CLS");
}
void zz(){
cout<<"你要作什么\n1.剑 3个木头 2.刀 2个木头 3.弓 3个木头 1根线 4.弩 10个木头 3根线";
int a;
cin>>a;
if(a==1){
if(jian==0&&mutou>=3){
cout<<"制作成功";
jian=1;
mutou-=3;
c+=" 1剑";
Sleep(100);
system("CLS");
}else{
cout<<"无效";
Sleep(100);
system("CLS");
}
}
if(a==2){
if(dao==0&&mutou>=2){
cout<<"制作成功";
dao=1;
mutou-=3;
c+=" 2刀";
Sleep(100);
system("CLS");
}else{
cout<<"无效";
Sleep(100);
system("CLS");
}
}
if(a==3){
if(gong==0&&mutou>=3&&xian>=1){
cout<<"制作成功";
gong=1;
mutou-=1;
xian-=1;
c+=" 3弓";
Sleep(100);
system("CLS");
}else{
cout<<"无效";
Sleep(100);
system("CLS");
}
}
if(a==4){
if(nu==0&&mutou>=10&&xian>=3){
cout<<"制作成功";
nu=1;
mutou-=4;
xian-=1;
c+=" 4弩";
Sleep(100);
system("CLS");
}else{
cout<<"无效";
Sleep(100);
system("CLS");
}
}
}
void sc(){
cout<<"你要买什么?1.木头 10元 2.线 50元";
int a;
cin>>a;
if(a==1&&qian>=10){
cout<<"购买成功";
qian-=10;
mutou++;
}
if(a==2&&qian>=50){
cout<<"购买成功";
qian-=50;
xian++;
}
Sleep(100);
system("CLS");
}
void wq(){
cout<<"你要用什么武器\n"<<c;
int a;
cin>>a;
if(a==1&&jian==1){
ji+=40;
cout<<"装备成功";
x=1;
Sleep(100);
system("CLS");
}else if(a==2&&dao==1){
ji+=30;
cout<<"装备成功";
x=2;
Sleep(100);
system("CLS");
}else if(a==3&&gong==1){
ji+=50;
cout<<"装备成功";
x=3;
Sleep(100);
system("CLS");
}else if(a==4&&nu==1){
ji+=100;
cout<<"装备成功";
x=4;
Sleep(100);
system("CLS");
}else{
cout<<"你没有这件武器";
Sleep(100);
system("CLS");
}
}
void wl(){
while(1){
cout<<"亡灵飞了过来!\n你要干什么\n1.攻击 2.我跑";
int a;
cin>>a;
if(a==1){
if(x==1){
cout<<"吃我一剑\n";
cout<<" ^"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" -----"<<endl;
cout<<"( ▼∪▼) |"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一剑\n\n\n\n\n\n\n";
cout<<"( ▼∪▼)--|========> 》》》》》》》》∑亡灵'";
Sleep(1000);
system("CLS");
}else if(x==2){
cout<<"吃我一刀\n";
cout<<"( ▼∪▼)---////////////////";
Sleep(1);
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////∑亡灵'";
Sleep(1000);
system("CLS");
}else if(x==3){
cout<<"吃我一弓\n"<<endl;
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) -|--|->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) |--|-->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | -|--->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n"<<endl;
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | |---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->∑亡灵'"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
}else if(x==4){
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->-->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->--->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->∑亡灵'"<<endl;
cout<<" / /"<<endl;
Sleep(1000);
system("CLS");
}
wlx-=ji;
}else{
cout<<"逃跑失败\n";
}
if(wlx<=0){
cout<<"亡灵挂了";
qian+=1;
ji=0;
Sleep(1000);
system("CLS");
break;
}
cout<<"亡灵攻击!你血量减少20";
xue-=wlg;
Sleep(1000);
system("CLS");
}
}
void js(){
while(1){
cout<<"僵尸扑了过来!\n你要干什么\n1.攻击 2.我跑\n";
int a;
cin>>a;
if(a==1){
system("CLS");
if(x==1){
cout<<"吃我一剑\n";
cout<<" ^"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" -----"<<endl;
cout<<"( ▼∪▼) |";
Sleep(1);
system("CLS");
cout<<"吃我一剑\n\n\n\n\n\n\n";
cout<<"( ▼∪▼)--|========> 》》》》》》》》∑僵尸'";
Sleep(1000);
system("CLS");
}else if(x==2){
cout<<"吃我一刀\n";
cout<<"( ▼∪▼)---////////////////";
Sleep(1);
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////";
system("CLS");
cout<<"吃我一刀\n";
cout<<"( ▼∪▼) ---////////////////∑僵尸'";
Sleep(1000);
system("CLS");
}else if(x==3){
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) -|--|->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) |--|-->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | -|--->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n"<<endl;
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | |---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弓\n";
cout<<" |\\"<<endl;
cout<<" | \\"<<endl;
cout<<"( ▼∪▼) | | ---->∑僵尸'"<<endl;
cout<<" | /"<<endl;
cout<<" |/"<<endl;
Sleep(1);
system("CLS");
}else if(x==4){
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n"<<endl;
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->-->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->--->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) ----------->---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n"<<endl;
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->"<<endl;
cout<<" / /"<<endl;
Sleep(1);
system("CLS");
cout<<"吃我一弩\n";
cout<<" \\"<<endl;
cout<<"( ▼∪▼) -----------> ---->∑僵尸'"<<endl;
cout<<" / /"<<endl;
Sleep(1000);
system("CLS");
}
jsx-=ji;
}else{
cout<<"逃跑失败";
}
if(jsx<=0){
cout<<"僵尸挂了";
qian+=2;
ji=0;
Sleep(1000);
system("CLS");
break;
}
cout<<"僵尸攻击!你血量减少50";
Sleep(1000);
system("CLS");
xue-=jsg;
}
}
void gj(){
wq();
cout<<"你要到哪去/n1.亡灵之地 2.僵尸空岛";
int a;
cin>>a;
if(a==1){
cout<<"已到达";
Sleep(100);
system("CLS");
wl();
}
if(a==2){
cout<<"已到达";
Sleep(100);
system("CLS");
js();
}
}
void yx(){
while(1){
xue=100,qian=0,ji=0;
ks();
while(1){
cout<<"你要干什么?\n1.工作台 2.商城 3.仓库 4.出去";
int a;
cin>>a;
if(a==1){
zz();
}
if(a==2){
sc();
}
if(a==3){
ck();
}
if(a==4){
gj();
}
}
}
}
int main(){
yx();
return 0;
}
高级天翼
#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<bits/stdc++.h>
#include<windows.h>
#include<windows.h>
#include<assert.h>
#include<ctype.h>
#include<errno.h>
#include<float.h>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<limits.h>
#include<locale.h>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<wchar.h>
#include<wctype.h>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cerrno>
#include<clocale>
#include<cmath>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<utility>
#include<vector>
#include<cwchar>
#include<cwctype>
#include<complex.h>
#include<fenv.h>
#include<inttypes.h>
#include<stdbool.h>
#include<stdint.h>
#include<tgmath.h>
#include<assert.h>
#include<ctype.h>
#include<errno.h>
#include<float.h>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<limits.h>
#include<locale.h>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<wchar.h>
#include<wctype.h>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cerrno>
#include<clocale>
#include<cmath>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<utility>
#include<vector>
#include<cwchar>
#include<cwctype>
#include<complex.h>
#include<fenv.h>
#include<inttypes.h>
#include<stdbool.h>
#include<conio.h>
#include <winable.h>
#pragma GCC optimize(2)
using namespace std;
/*
颜色对照表
1 深蓝
2 灰绿
3 绿蓝
4 灰红
5 灰粉
6 灰黄
7 灰白
8 灰
9 蓝
10 绿
11 天蓝
12 红
13 粉
14 黄
15 白
图形
●■▼▲
*/
/*
1 天
2 苹果
3 树叶
4 金苹果
5 附魔金苹果
6 空气
7 树木
8 草方块
9 石块
10 铁矿
11 岩浆
12 金矿
13 钻石
14 煤
15 基岩
16 水
17 冰块
18 雪块
19 沙子
20 仙人掌
21 箱子
22 黑曜石
23 传送门
*/
/*
1 剑
2 铲子
3 木斧
4 稿子
*/
int flagtuchu;
int xiangzi[13]={0,13,13,13,13,2,14,13,13,0,0,0,0};
int flag=0;
long long rongluranliaodengji,rongluranliaoshuliang;
string name;
bool chenjiu,jieshule,zuan,xiajie,furen;
long long jinbi=0,jinding=0,yingding=0,zuanshi=0,mugun,muban;
int fumojinpinguo,jinpinguo,pinguo,fumoyaoshui;
double xueliang=10,baoshidu=10;
int shenshangdengji=0;
int XIAJIEyan[51][2049];
int MUDIyan[51][2049];
int MCyan[51][2049];
int ditu=1;
int q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1,1,1},
{0,1,1,1,1,1,1,1,1,20,1,1,1,1,20,1,1,1,20,1,1,1,1,1,1,1,20,1,1,1,1,1,1,1,1,1,1,1,20,1,1,1,1,1 ,1 ,20,1 ,1,1,20,1,1,20,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,20,1,1,1,1,20,1,1,1,20,1,1,1,1,1,1,1,20,1,1,1,1,1,1,1,1,1,1,1,20,1,1,1,1,19,19,19,19,1,1,20,1,1,20,1,1,1,1,1,1,1,1,1,1,1,1},
{0,19,19,19,19,19,19,19,19,19,19,19,16,16,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,11,11,11,11,11,11,11,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19},
{0,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,11,11,11,11,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19},
{0,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19},
{0,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19},
{0,9,9,9,9,9,9,9,9,9,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,6 ,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9},
{0,9,9,9,9,9,9,9,9,9,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8},
{0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8},
{0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8},
{0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8},
{0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8},
{0,9,9,9,9,9,9,9,9,9,9 ,9 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,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
{0,9,9,9,9,14,9,9,9,9,9,9,9,9,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,9,9,9,9,9,9,9,9,9,9,9,9,9},
{0,9,9,9,9,9,9,9,9,9,9,9,9,9,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,14,9,10,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,9,9,9,9,9},
{0,9,9,9,9,9,9,9,9,9,9,9,9,9,9 ,14,9 ,9 ,14,9 ,9 ,9 ,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9},
{0,9,9,9,9,9,9,9,14,9,9,9,9,9,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9 ,9,9,9,9,9,12,9,9,9,9,9,9,9,9,9,9,9,9,14,9,9,9,9,9,9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15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15},
};
struct fangkuaiedge
{
int dengji;
int shuliang;
};
struct gonjuedge
{
int wupin;
int dengji;
};
gonjuedge gongjurongji[11];
fangkuaiedge rongji[11];
int gongjushouchi,fangkuaishouchi;
void beibaokongzhi(int dengji)
{
for(int i=1;i<=10;i++)
{
if(rongji[i].dengji==0)
{
rongji[i].dengji=dengji;
rongji[i].shuliang++;
break;
}
else if(rongji[i].dengji==dengji&&rongji[i].shuliang<64)
{
rongji[i].shuliang++;
break;
}
}
}
void wa(int dengji,int i,int j)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
if(dengji==1||dengji==6)
{
cout<<"警告!空气不能挖";
}
else if(dengji==2||dengji==3||dengji==4||dengji==5)
{
Sleep(300);
MCyan[i][j]=1;
if(dengji==2)
{
pinguo++;
}
else if(dengji==4)
{
jinpinguo++;
}
else if(dengji==5)
{
fumojinpinguo++;
}
else
{
beibaokongzhi(dengji);
}
}
if(dengji==11)
{
cout<<"警告!岩浆不能挖";
}
if(dengji==7)
{
if(gongjurongji[gongjushouchi].wupin==3)
{
Sleep(max(2000-(gongjurongji[gongjushouchi].dengji)*500,0));
MCyan[i][j]=1;
beibaokongzhi(dengji);
}
else
{
Sleep(2000);
MCyan[i][j]=1;
beibaokongzhi(dengji);
}
}
if(dengji==8)
{
if(gongjurongji[gongjushouchi].wupin==2)
{
Sleep(max(0,500-(gongjurongji[gongjushouchi].dengji)*100));
MCyan[i][j]=1;
beibaokongzhi(dengji);
}
else
{
Sleep(500);
MCyan[i][j]=1;
beibaokongzhi(dengji);
}
}
if(dengji==9)
{
if(gongjurongji[gongjushouchi].wupin==4)
{
if(gongjurongji[gongjushouchi].dengji>0)
{
Sleep(max(0,2000-(gongjurongji[gongjushouchi].dengji-1)*400));
MCyan[i][j]=6;
beibaokongzhi(dengji);
}
else
{
cout<<"警告!空手不能挖石头";
}
}
else
{
cout<<"警告!手持不在稿子上";
}
}
if(dengji==10)
{
if(gongjurongji[gongjushouchi].wupin==4)
{
if(gongjurongji[gongjushouchi].dengji>1)
{
Sleep(max(0,2000-(gongjurongji[gongjushouchi].dengji-2)*400));
MCyan[i][j]=6;
beibaokongzhi(dengji);
}
else if(gongjurongji[gongjushouchi].dengji==1)
{
cout<<"警告!木稿不能挖铁";
}
else
{
cout<<"警告!空手不能挖铁";
}
}
else
{
cout<<"警告!手持不在稿子上";
}
}
if(dengji==12)
{
if(gongjurongji[gongjushouchi].wupin==4)
{
if(gongjurongji[gongjushouchi].dengji>2)
{
Sleep(max(0,2000-(gongjurongji[gongjushouchi].dengji-3)*400));
MCyan[i][j]=6;
beibaokongzhi(dengji);
}
else if(gongjurongji[gongjushouchi].dengji==2)
{
cout<<"警告!石稿不能挖金";
}
else if(gongjurongji[gongjushouchi].dengji==1)
{
cout<<"警告!木稿不能挖金";
}
else
{
cout<<"警告!空手不能挖金";
}
}
else
{
cout<<"警告!手持不在稿子上";
}
}
if(dengji==14)
{
if(gongjurongji[gongjushouchi].wupin==4)
{
Sleep(max(0,2000-(gongjurongji[gongjushouchi].dengji-2)*400));
MCyan[i][j]=6;
beibaokongzhi(dengji);
}
}
if(dengji==13)
{
if(gongjurongji[gongjushouchi].wupin==4)
{
if(gongjurongji[gongjushouchi].dengji>3)
{
Sleep(max(0,4000-(gongjurongji[gongjushouchi].dengji-3)*400));
MCyan[i][j]=6;
zuan=1;
beibaokongzhi(dengji);
}
else if(gongjurongji[gongjushouchi].dengji==3)
{
cout<<"警告!铁稿不能挖钻石";
}
else if(gongjurongji[gongjushouchi].dengji==2)
{
cout<<"警告!石稿不能挖钻石";
}
else if(gongjurongji[gongjushouchi].dengji==1)
{
cout<<"警告!木稿不能挖钻石";
}
else
{
cout<<"警告!空手不能挖钻石";
}
}
else
{
cout<<"警告!手持不在稿子上";
}
}
if(dengji==15)
{
cout<<"警告!基岩不能挖";
}
else if(dengji==16)
{
cout<<"警告!水不能挖";
}
else if(dengji==17)
{
Sleep(300);
if(ditu==1)
{
MCyan[i][j]=16;
}
else if(ditu==2)
{
XIAJIEyan[i][j]=16;
}
else if(ditu==3)
{
MUDIyan[i][j]=16;
}
}
else if(dengji==18)
{
Sleep(500);
MCyan[i][j]=1;
beibaokongzhi(dengji);
}
else if(dengji==19)
{
Sleep(300);
MCyan[i][j]=1;
beibaokongzhi(dengji);
}
else if(dengji==20)
{
Sleep(300);
xueliang-=max(0*1.0,1-(shenshangdengji*1.0/8)*1.0);
MCyan[i][j]=1;
beibaokongzhi(dengji);
}
else if(dengji==21)
{
if(gongjurongji[gongjushouchi].wupin==4)
{
Sleep(max(0,60000-10000*(gongjurongji[gongjushouchi].dengji)));
MCyan[i][j]=1;
}
else
{
Sleep(60000);
MCyan[i][j]=1;
}
}
if(dengji==23)
{
cout<<"警告!传送门不能挖";
}
Sleep(1000);
}
void qipaoshuchu()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"呼吸:";
cout<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),11);
for(int i=1;i<=(int)(qipao);i++)
{
cout<<"○";
}
if(qipao==0)
{
xueliang-=1-shenshangdengji*1.0;
}
}
void xueliangshuchu()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"血量:";
if((int)(xueliang)<=10)
{
cout<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
for(int i=1;i<=(int)(xueliang);i++)
{
cout<<"★";
}
}
else if((int)(xueliang)<=20)
{
cout<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
for(int i=1;i<=10;i++)
{
cout<<"★";
}
cout<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
for(int ki=1;ki<=(int)(xueliang)/10-1;ki++)
{
for(int i=1;i<=10;i++)
{
cout<<"★";
}
cout<<endl;
}
for(int i=1;i<=(int)(xueliang)%10;i++)
{
cout<<"★";
}
}
else
{
cout<<xueliang;
}
if(xueliang==0)
{
exit(0);
}
}
void zhongmo()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"我看到你所说的那位玩家了。\n";Sleep(4000);
cout<<name<<"?\n";Sleep(4000);
cout<<"是的。小心。他现在已达到了更高的境界。他能阅读我们的思想。\n";Sleep(4000);
cout<<"无伤大雅。他认为我们是游戏的一部分。\n";Sleep(4000);
cout<<"我喜欢这个玩家。他玩得很好。他没有半途而废。\n";Sleep(4000);
cout<<"他以屏幕上出现的文字的形式阅读着我们的思想。\n";Sleep(4000);
cout<<"当他深陷游戏的梦境时,他总以这种方式想象出形形**的事物。\n";Sleep(4000);
cout<<"文字创造造出了一种美妙的界面。非常灵活。而且比起凝视屏幕后的现实来说,不会让人那么恐惧。\n";Sleep(4000);
cout<<"在玩家能够阅读之前,他们也曾经听到过声音。那些不曾游玩的人们称呼玩家为女巫、术士。玩家们梦见他们自己乘坐在被恶魔施法的棍子上,在天空中翱翔。\n";Sleep(4000);
cout<<"这个玩家梦见了什么?\n";Sleep(4000);
cout<<"梦见了阳光与树木。梦见了火与水。他梦见他创造。亦梦见他毁灭。它梦见他在狩猎,亦梦见被狩猎。他梦见了庇护所。\n";Sleep(4000);
cout<<"哈,那原始的界面。经历一百万年的岁月,它依然在工作。但这个玩家在屏幕后的真实里,到底创造了什么真实的构造?\n";Sleep(4000);
cout<<"他辛勤地劳作,与其他数百万玩家一起,在[IUAfugDSHJC]的折叠中创造了一个真实的世界,并在[*^&*SHGF]中为[^%^$^$DRT]创造了一个[YT*TT^^&*$j]。\n";Sleep(4000);
cout<<"他读不出那个思绪。\n";Sleep(4000);
cout<<"不。他还没有达到那最高的境界。为了达到那层境界,他必须完成生命的长梦,而非游戏中的黄粱一梦。\n";Sleep(4000);
cout<<"他知道我们爱他么?他知道这个宇宙是仁慈的吗?\n";Sleep(4000);
cout<<"有时,在思绪的杂音中,他听到了宇宙。是的。\n";Sleep(4000);
cout<<"但是在许多时候他陷入悲伤,在那漫漫长梦中。他创造了没有夏日的世界,他在黑日下颤抖着,将自己悲伤的创造视为现实世界。\n";Sleep(4000);
cout<<"试图治愈他的悲伤会毁掉他。解决悲伤是他的个人事务。我们不能干涉。\n";Sleep(4000);
cout<<"有时当他们深陷梦境中时,我想要告诉他们,他们在现实中创造了真实的世界。有时我想告诉他们他们对宇宙的重要**。有时,当他们短时间内失去了与宇宙真正的联系,我想帮助他们说出他们所恐惧的话语。\n";Sleep(4000);
cout<<"有时我毫不在意。有时我想要去告诉他们,这个被你们当做真实的世界仅仅是[%^$^$&]和[(&^^$^$@!#!)],我想要去告诉他们,他们是[^%&*FT!]中的[FJGJYTD]。他们在长梦中,所见到的真实太少了。\n";Sleep(4000);
cout<<"而他们仍然在玩这个游戏。\n";Sleep(4000);
cout<<"但实际上很容易就可以告诉他们……\n";Sleep(4000);
cout<<"这个梦对他来说太强烈了。告诉他们如何活着就是阻碍他们活下去。\n";Sleep(4000);
cout<<"我不会告诉这个玩家如何生活的。\n";Sleep(4000);
cout<<"这个玩家正在变得焦虑。\n";Sleep(4000);
cout<<"我会告诉这个玩家一个故事。\n";Sleep(4000);
cout<<"但不是真相。\n";Sleep(4000);
cout<<"不是。是在文字牢笼中严密包裹着的真相。而不是****的真相。\n";Sleep(4000);
cout<<"再一次赋予他身体。\n";Sleep(4000);
cout<<"是的,玩家\n";Sleep(4000);
cout<<"称呼他的名字。\n";Sleep(4000);
cout<<name<<",游戏的玩家。\n";Sleep(4000);
cout<<"很好。\n";Sleep(4000);
cout<<"深呼吸,再深呼吸一次。感受空气充盈你的肺叶。让你的四肢回归。运动你的手指。再次感受你的身体,在重力下,在空气中。在长梦中**。你感受到了。你的身体再一次触碰着宇宙的每一处,仿佛你是一群**的个体。仿佛我们是一群**的个体。\n";Sleep(4000);
cout<<"我们是谁?我们一度被称为山的魂魄。太阳父亲,月亮**。古老的英灵,动物的魂魄。神祗。鬼魂。小绿人。而后是神,恶魔,天使。喧闹鬼。外星人,地外生物。轻粒子,夸克。词语不断地变化。我们始终如一。\n";Sleep(4000);
cout<<"我们是宇宙。我们是一切你认为的除你之外的事物。现在你正在看着我们,用你的眼睛与肌肤。而为什么宇宙触**的皮肤,向你投出一片光芒?为了看到你,玩家。为了彼此了解。我要告诉你一个故事。\n";Sleep(4000);
cout<<"很久以前,有一个玩家。\n";Sleep(4000);
cout<<"那玩家就是你,"<<name<<"\n";Sleep(4000);
cout<<"有时他认为自己是一个人类,在那融化岩石构成的旋转球体的一层薄薄的表皮上。那融化岩石的球体环绕着一个质量大它三十三万倍的炫目气体球旋转。它们是相隔得如此之远,以至于光需要八分钟才能穿越那空隙。那光是来自一颗恒星的信息,而它能够在一亿五千万公里外灼烧你的皮肤。\n";Sleep(4000);
cout<<"有时这个玩家梦见他是一个矿工,在一个并不平坦的、无限延展的世界的地表上。太阳是一个白色的方块。昼夜交替很快;要做的事情也很多;**亡也只是暂时的不便。\n";Sleep(4000);
cout<<"有时,这玩家梦见它迷失在了一个故事里。\n";Sleep(4000);
cout<<"有时,这玩家梦见它成为了其它的事物,在其它地方。有时这些梦是令人不安的。有时却是美丽的。这个玩家从一个梦中醒来,又落入了第二个梦,又从这个梦中落入到了第三个梦中。\n";Sleep(4000);
cout<<"有时这个玩家梦见他在屏幕上看着文字。\n";Sleep(4000);
cout<<"让我们回退一点。\n";Sleep(4000);
cout<<"组成玩家的原子散布在草中,河流中,在空气中,在大地中。一个女人收集了那些原子;她饮用、进食、吸入;而后那女人在她的身体中,**育了玩家。\n";Sleep(4000);
cout<<"然后那玩家醒来了,从他的**体内那个温暖、昏暗的世界中,进入了漫漫长梦。\n";Sleep(4000);
cout<<"那玩家是一个新的故事,从未被讲述过,由的语言书写着。那玩家是一个新的程序,从未被运行过,由上亿年前的源代码生成。那玩家是一个新的人类,从未存在过,由**汁和爱组成。\n";Sleep(4000);
cout<<"你就是那玩家。那个故事。那个程序。那个人类。仅仅是由**汁和爱组成。\n";Sleep(4000);
cout<<"我们再往更远的过去回退一点。\n";Sleep(4000);
cout<<"那由七千亿亿亿的原子组成的玩家的身体被创造了,远在这游戏之前,在一颗恒星的内部。所以那玩家也是,来自一颗恒星的信息。而这个玩家贯穿这个故事的始末,这故事源于一个叫朱利安的人种下的信息种子长成的森林,源于一个叫马库斯的人创造的无限世界,存在于一个由玩家创造的小的,私密的世界里,而那又继承了宇宙创造的……\n";Sleep(4000);
cout<<"嘘。有时这个玩家创造的属于自己的小天地是柔软、温暖和简单的。有时是坚硬、冰冷和复杂的。有时他建造出了他脑中的宇宙的模型;斑斑点点的能量穿越广阔空旷的空间。有时他称呼这些斑点为电子和质子。\n";Sleep(4000);
cout<<"有时他称呼他们为行星和恒星。\n";Sleep(4000);
cout<<"有时他确信他存在于一个由开和关;"<<0<<"和"<<1<<"组成的世界;存在于一个由一行行的代码组成的宇宙。有时他确信他是在玩一个游戏。有时他确信他是在读着屏幕上的文字。\n";Sleep(4000);
cout<<"你就是那玩家,阅读着文字……\n";Sleep(4000);
cout<<"嘘……有时这玩家读屏幕上的一行行代码。将它们解读为文字;将文字解读为含义;将含**读为感受、情绪、理论、想法,而玩家开始急促而剧烈地呼吸,并意识到了他是活着的,那上千次的**亡不是真的,玩家是活着的。\n";Sleep(4000);
cout<<"你,你,你是活着的。\n";Sleep(4000);
cout<<"而有时这玩家相信宇宙通过夏日树叶下洒下的斑斓的阳光与他对话。\n";Sleep(4000);
cout<<"有时这玩家相信宇宙透过晴朗的冬日夜空中,存在于他眼中一隅星光,可能比太阳大上上百万倍的恒星沸腾着的电浆那一瞬间发出来的光对他说话,在从宇宙尽头归来的路上,突然闻到了食物的香气,在那熟悉的门前,他又准备好再一次投入梦境。\n";Sleep(4000);
cout<<"而有时玩家相信宇宙透过"<<0<<"和"<<1<<",透过世界的电力,透过屏幕上**动的文字和梦的尽头对他说话。\n";Sleep(4000);
cout<<"宇宙说我爱你。\n";Sleep(4000);
cout<<"宇宙说你玩得很好。\n";Sleep(4000);
cout<<"宇宙说一切你所需要的你都具有。\n";Sleep(4000);
cout<<"宇宙说你比你所估计的更强大。\n";Sleep(4000);
cout<<"宇宙说你就是阳光。\n";Sleep(4000);
cout<<"宇宙说你就是黑夜。\n";Sleep(4000);
cout<<"宇宙说你所抗争的黑暗就在你心中。\n";Sleep(4000);
cout<<"宇宙说你所追寻的光明就在你心中。\n";Sleep(4000);
cout<<"宇宙说你并不是一个人在战斗。\n";Sleep(4000);
cout<<"宇宙说你与其他事物是一体的。\n";Sleep(4000);
cout<<"宇宙说你就是宇宙,品味自己,与自己对话,阅读着他自己的代码。。\n";Sleep(4000);
cout<<"宇宙说我爱你,因为你就是爱。\n";Sleep(4000);
cout<<"游戏结束了,玩家从梦中醒来。玩家开始了新的梦境。玩家再次做起了梦,更好的梦。玩家就是宇宙。玩家就是爱。\n";Sleep(4000);
cout<<"你就是那个玩家。\n";Sleep(4000);
cout<<"该醒了。\n";Sleep(5000);
cout<<"致敬MC陪伴我的12个春秋,虽然我才12岁 --牧原" ;Sleep(5000);
system("cls");
}
void baoshidushuchu()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"饱食度:";
if((int)(baoshidu)<=10)
{
cout<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
for(int i=1;i<=(int)(baoshidu);i++)
{
cout<<"★";
}
}
else if((int)(baoshidu)<=15)
{
cout<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
for(int i=1;i<=10;i++)
{
cout<<"★";
}
cout<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),11);
for(int ki=1;ki<=(int)(baoshidu)/10-1;ki++)
{
for(int i=1;i<=10;i++)
{
cout<<"★";
}
cout<<endl;
}
for(int i=1;i<=(int)(baoshidu)%10;i++)
{
cout<<"★";
}
}
else
{
cout<<baoshidu;
}
if(baoshidu==0)
{
xueliang-=1-shenshangdengji*1.0;
}
}
void shuchuMC(int a)
{
if(a==1)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),11);
printf("▇");
}
else if(a==2)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),207);
printf("AP");
}
else if(a==3)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
printf("▇");
}
else if(a==4)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),224);
printf("AP");
}
else if(a==5)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),223);
printf("AP");
}
else if(a==6)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7);
printf("▇");
}
else if(a==7)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),96);
printf("WO");
}
else if(a==8)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);
printf("▇");
}
else if(a==9)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),8);
printf("▇");
}
else if(a==10)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),143);
printf("∷");
}
else if(a==11)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
printf("▇");
}
else if(a==12)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),142);
printf("∷");
}
else if(a==13)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),139);
printf("∷");
}
else if(a==14)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),128);
printf("∷");
}
else if(a==15)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),264);
printf("==");
}
else if(a==16)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),9);
printf("▇");
}
else if(a==17)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),144);
printf("∷");
}
else if(a==18)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
printf("▇");
}
else if(a==19)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),224);
printf("∷");
}
else if(a==20)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),32);
printf("∷");
}
else if(a==21)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),224);
printf("·");
}
else if(a==22)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),0);
printf("▇");
}
else if(a==23)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),13);
printf("▇");
}
}
void chushi()
{
for(int i=1;i<=50;i++)
{
for(int j=1;j<=2048;j++)
{
MCyan[i][j]=1;
}
}
for(int i=1;i<=32;i++)
{
srand( time(0));
int a=1+rand()%7;
if(a==1)
{
for(int ki=21;ki<=50;ki++)
{
for(int kj=64*(i-1)+1;kj<=64*i;kj++)
{
MCyan[ki][kj]=senlinyan[ki-20][kj-64*(i-1)];
}
}
}
else if(a==2)
{
for(int ki=21;ki<=50;ki++)
{
for(int kj=64*(i-1)+1;kj<=64*i;kj++)
{
MCyan[ki][kj]=xuediyan[ki-20][kj-64*(i-1)];
}
}
}
else if(a==3)
{
for(int ki=21;ki<=50;ki++)
{
for(int kj=64*(i-1)+1;kj<=64*i;kj++)
{
MCyan[ki][kj]=shadiyan[ki-20][kj-64*(i-1)];
}
}
}
else if(a==4)
{
for(int ki=21;ki<=50;ki++)
{
for(int kj=64*(i-1)+1;kj<=64*i;kj++)
{
MCyan[ki][kj]=heliuyan[ki-20][kj-64*(i-1)];
}
}
}
else if(a==5)
{
for(int ki=21;ki<=50;ki++)
{
for(int kj=64*(i-1)+1;kj<=64*i;kj++)
{
MCyan[ki][kj]=cunzhuangyan[ki-20][kj-64*(i-1)];
}
}
}
else if(a==6)
{
for(int ki=21;ki<=50;ki++)
{
for(int kj=64*(i-1)+1;kj<=64*i;kj++)
{
MCyan[ki][kj]=dahaiyan[ki-20][kj-64*(i-1)];
}
}
}
else
{
for(int ki=21;ki<=50;ki++)
{
for(int kj=64*(i-1)+1;kj<=64*i;kj++)
{
MCyan[ki][kj]=gaoshanyan[ki-20][kj-64*(i-1)];
}
}
}
}
}
int MCx=8,MCy=2;
void MCshuchu()
{
system("cls");
for(int i=max(1,MCx-15);i<=min(50,MCx+15);i++)
{
for(int j=max(1,MCy-5);j<=min(2048,MCy+40);j++)
{
if(MCx==i&&MCy==j)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"梦";
}
else
{
shuchuMC(MCyan[i][j]);
}
}
cout<<endl;
}
}
void dixing()
{
while(1)
{
if(MCyan[MCx+1][MCy]==1||MCyan[MCx+1][MCy]==6||MCyan[MCx+1][MCy]==16||MCyan[MCx+1][MCy]==11)
{
MCx+=1;
}
else
{
break;
}
MCshuchu();
xueliangshuchu();
cout<<endl;
baoshidushuchu();
}
}
void jiafangkuai(int dengji1,int shuliang)
{
for(int i=1;i<=10;i++)
{
if(rongji[i].dengji==0||rongji[i].dengji==dengji1&&rongji[i].shuliang+shuliang<=64)
{
rongji[i].dengji=dengji1;
rongji[i].shuliang+=shuliang;
break;
}
}
}
void beibaoshuchu()
{
for(int i=1;i<=10;i++)
{
if(rongji[i].shuliang!=0)
{
shuchuMC(rongji[i].dengji);
}
}
cout<<endl;
for(int i=1;i<=10;i++)
{
if(rongji[i].shuliang!=0)
{
if(rongji[i].shuliang>=10)
{
cout<<rongji[i].shuliang;
}
else
{
cout<<rongji[i].shuliang<<" ";
}
}
}
}
void yidong()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
char xingzou;
xingzou=getch();
if(xingzou=='d')
{
if(MCy==2048)
{
;
}
else if(MCyan[MCx][MCy+1]==6||MCyan[MCx][MCy+1]==1||MCyan[MCx][MCy+1]==16||MCyan[MCx][MCy+1]==11)
{
if(MCyan[MCx][MCy]==16)
{
Sleep(500);
}
else if(MCyan[MCx][MCy]==11)
{
Sleep(500);
xueliang-=1-shenshangdengji*0.1;
}
else
{
Sleep(200);
}
MCy+=1;
}
else if(MCyan[MCx-1][MCy+1]==6||MCyan[MCx-1][MCy+1]==1||MCyan[MCx-1][MCy+1]==16||MCyan[MCx-1][MCy+1]==11)
{
if(MCyan[MCx][MCy]==16)
{
Sleep(500);
}
else if(MCyan[MCx][MCy]==11)
{
Sleep(500);
xueliang-=1-shenshangdengji*0.1;
}
else
{
Sleep(200);
}
MCy+=1;
MCx-=1;
}
}
else if(xingzou=='a')
{
if(MCy==1)
{
;
}
else if(MCyan[MCx][MCy-1]==6||MCyan[MCx][MCy-1]==1||MCyan[MCx][MCy-1]==16||MCyan[MCx][MCy-1]==11)
{
if(MCyan[MCx][MCy]==16)
{
Sleep(500);
}
else if(MCyan[MCx][MCy]==11)
{
Sleep(500);
xueliang-=1-shenshangdengji*0.1;
}
else
{
Sleep(200);
}
MCy-=1;
}
else if(MCyan[MCx-1][MCy-1]==6||MCyan[MCx-1][MCy-1]==1||MCyan[MCx-1][MCy-1]==16||MCyan[MCx-1][MCy-1]==11)
{
if(MCyan[MCx][MCy]==16)
{
Sleep(500);
}
else if(MCyan[MCx][MCy]==11)
{
Sleep(500);
xueliang-=1-shenshangdengji*0.1;
}
else
{
Sleep(200);
}
MCy-=1;
MCx-=1;
}
}
else if(xingzou=='w')
{
if(MCyan[MCx-1][MCy]==6||MCyan[MCx-1][MCy]==1||MCyan[MCx-1][MCy]==16||MCyan[MCx-1][MCy]==11)
{
if(MCyan[MCx][MCy]==16)
{
Sleep(500);
}
else if(MCyan[MCx][MCy]==11)
{
Sleep(500);
xueliang-=1-shenshangdengji*0.1;
}
else
{
Sleep(200);
}
MCx-=1;
}
MCshuchu();
xueliangshuchu();
cout<<endl;
baoshidushuchu();
cout<<endl;
beibaoshuchu();
if(MCyan[MCx][MCy]==16)
{
Sleep(500);
}
else if(MCyan[MCx][MCy]==11)
{
Sleep(500);
xueliang-=1-shenshangdengji*0.1;
}
else
{
Sleep(200);
}
MCx+=1;
}
else if(xingzou=='t')
{
wa(MCyan[MCx-1][MCy-1],MCx-1,MCy-1);
}
else if(xingzou=='y')
{
wa(MCyan[MCx-1][MCy],MCx-1,MCy);
}
else if(xingzou=='u')
{
wa(MCyan[MCx-1][MCy+1],MCx-1,MCy+1);
}
else if(xingzou=='g')
{
wa(MCyan[MCx][MCy-1],MCx,MCy-1);
}
else if(xingzou=='j')
{
wa(MCyan[MCx][MCy+1],MCx,MCy+1);
}
else if(xingzou=='b')
{
wa(MCyan[MCx+1][MCy-1],MCx+1,MCy-1);
}
else if(xingzou=='n')
{
wa(MCyan[MCx+1][MCy],MCx+1,MCy);
}
else if(xingzou=='m')
{
wa(MCyan[MCx+1][MCy+1],MCx+1,MCy+1);
}
else if(xingzou=='z')
{
if(fumoyaoshui>=1)
{
fumoyaoshui--;
xueliang+=10;
}
else
{
cout<<"没有药水!";
}
}
else if(xingzou=='c')
{
if(rongji[fangkuaishouchi].dengji==2)
{
xueliang+=6;
baoshidu+=2;
rongji[fangkuaishouchi].shuliang-=1;
}
else if(rongji[fangkuaishouchi].dengji==4)
{
xueliang+=2;
baoshidu+=1;
rongji[fangkuaishouchi].shuliang-=1;
}
else if(rongji[fangkuaishouchi].dengji==5)
{
baoshidu+=1;
rongji[fangkuaishouchi].shuliang-=1;
}
else
{
cout<<"手持不在食物上!";
}
}
else if(xingzou=='x')
{
system("cls");
cout<<" 1.正中 ";
cout<<" 2.左下 ";
cout<<" 3.右下 ";
int xuanze;
cin>>xuanze;
if(xuanze==1)
{
if(MCyan[MCx-1][MCy]==6||MCyan[MCx-1][MCy]==1&&rongji[fangkuaishouchi].dengji!=0)
{
MCyan[MCx][MCy]=rongji[fangkuaishouchi].dengji;
rongji[fangkuaishouchi].shuliang-=1;
MCx-=1;
}
}
if(xuanze==2)
{
if(MCyan[MCx][MCy-1]==6||MCyan[MCx][MCy-1]==1&&rongji[fangkuaishouchi].dengji!=0)
{
MCyan[MCx][MCy-1]=rongji[fangkuaishouchi].dengji;
rongji[fangkuaishouchi].shuliang-=1;
}
}
if(xuanze==2)
{
if(MCyan[MCx][MCy+1]==6||MCyan[MCx][MCy+1]==1&&rongji[fangkuaishouchi].dengji!=0)
{
MCyan[MCx][MCy+1]=rongji[fangkuaishouchi].dengji;
rongji[fangkuaishouchi].shuliang-=1;
}
}
}
else if(xingzou=='r')
{
for(int i=max(1,MCx-5);i<=min(50,MCx+5);i++)
{
for(int j=max(1,MCy-5);j<=min(2048,MCy+5);j++)
{
if(MCyan[i][j]==21)
{
system("cls");
cout<<" 选择 ";
for(int i=1;i<=12;i++)
{
shuchuMC(xiangzi[i]);
}
int xuanze;
cin>>xuanze;
if(xiangzi[xuanze]!=0)
{
jiafangkuai(xiangzi[xuanze],1);
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),0);
}
}
cout<<endl;
}
}
else if(xingzou=='p')
{
flagtuchu=1;
return ;
}
else if(xingzou=='k')
{
system("cls");
cout<<" 1.方块手持 ";
cout<<" 2.工具手持 ";
int xuanze2;
cin>>xuanze2;
if(xuanze2==1)
{
cout<<" 选择 ";
int xuanze;
cin>>xuanze;
fangkuaishouchi==xuanze;
}
if(xuanze2==2)
{
cout<<" 选择 ";
int xuanze;
cin>>xuanze;
gongjushouchi==xuanze;
}
}
MCshuchu();
xueliangshuchu();
cout<<endl;
baoshidushuchu();
cout<<endl;
beibaoshuchu();
if(MCyan[MCx][MCy]==16)
{
cout<<endl;
qipao--;
qipaoshuchu();
}
else
{
qipao=10;
}
}
void MC()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
COORD size = {120, 40};
SetConsoleScreenBufferSize(hOut,size);
SMALL_RECT rc = {0,0, 120, 40};
SetConsoleWindowInfo(hOut,true ,&rc);
while(1)
{
dixing();
yidong();
if(flagtuchu==1)
{
flagtuchu=0;
return ;
}
}
}
bool beibaozhengli()
{
for(int i=1;i<=10;i++)
{
if(rongji[i].dengji==0)
{
rongji[i].dengji=9;
rongji[i].shuliang=64;
break;
}
}
}
void shangcheng()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
system("cls");
cout<<"\n\n\n\n";
cout<<"您的金币"<<jinbi;
cout<<endl;
cout<<"1.附魔金苹果 提高您的血量和饱食度 50 金币";
cout<<endl;
cout<<"2.附魔药水 提高您的血量 100金币";
cout<<endl;
cout<<"3.一组石头 可以搭 50 金币";
cout<<endl;
cout<<"0.退出";
int xuanze;
cin>>xuanze;
if(xuanze==1)
{
if(jinbi>=50)
{
jinbi-=50;
cout<<"购买成功";
fumojinpinguo+=1;
}
else
{
cout<<"没钱买什么附魔金苹果?";
}
}
if(xuanze==2)
{
if(jinbi>=100)
{
jinbi-=100;
cout<<"购买成功";
fumoyaoshui+=1;
}
else
{
cout<<"没钱买什么附魔药水?";
}
}
if(xuanze==3)
{
if(jinbi>=50)
{
if(beibaozhengli())
{
jinbi-=50;
}
else
{
cout<<"背包不足!";
}
}
else
{
cout<<"没钱买什么石头?";
}
}
}
int chakan(int dengji)
{
int shuliang=0;
for(int i=1;i<=10;i++)
{
if(rongji[i].dengji==dengji)
{
shuliang+=rongji[i].shuliang;
}
}
return shuliang;
}
void jian(int dengji,int shuliang)
{
for(int i=1;i<=10;i++)
{
if(rongji[i].dengji==dengji&&rongji[i].shuliang>=shuliang)
{
rongji[i].shuliang-=shuliang;
return ;
}
}
exit(0);
}
void jia(int dengji1,int dengji2)
{
for(int i=1;i<=10;i++)
{
if(gongjurongji[i].wupin==0)
{
gongjurongji[i].wupin==dengji1;
gongjurongji[i].dengji==dengji2;
break;
}
}
}
void gongzuotai()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
system("cls");
cout<<"\n\n\n 您的物品:\n";
cout<<" 1.钻石 "<<zuanshi<<"个\n";
cout<<" 2.黄金锭 "<<jinding<<"个\n";
cout<<" 3.铁锭 "<<yingding<<"个\n";
cout<<" 4.木头 "<<chakan(7)<<"个\n";
cout<<" 5.木板 "<<muban<<"个\n";
cout<<" 6.石头 "<<chakan(9)<<"个\n";
cout<<" 7.木棍 "<<mugun<<"个\n";
cout<<"\n\n\n 可以合成:\n";
cout<<" 1.木板 1个木头做4个木板\n";
cout<<" 2.木棍 2个木板做4个木棍\n";
cout<<" 3.木稿 2个木棍,3个木板做一个木稿\n";
cout<<" 4.石稿 2个木棍,3个石头做一个石稿\n";
cout<<" 5.铁稿 2个木棍,3个铁锭做一个铁稿\n";
cout<<" 6.金稿 2个木棍,3个金锭做一个金稿\n";
cout<<" 7.钻稿 2个木棍,3个钻石做一个钻稿\n";
cout<<" 8.木斧 2个木棍,4个木板做一个木斧\n";
cout<<" 9.石斧 2个木棍,4个石头做一个石斧\n";
cout<<" 10.铁斧 2个木棍,4个铁锭做一个铁斧\n";
cout<<" 11.金斧 2个木棍,4个金锭做一个金斧\n";
cout<<" 12.钻斧 2个木棍,4个钻石做一个钻斧\n";
cout<<" 13.木铲 2个木棍,2个木板做一个木铲\n";
cout<<" 14.石铲 2个木棍,2个石头做一个石铲\n";
cout<<" 15.铁铲 2个木棍,2个铁锭做一个铁铲\n";
cout<<" 16.金铲 2个木棍,2个金锭做一个金铲\n";
cout<<" 17.钻铲 2个木棍,2个钻石做一个钻铲\n";
cout<<"\n\n\n 您的选择:\n";
int xuanze;
cin>>xuanze;
if(xuanze==1)
{
if(chakan(7)>=1)
{
jian(7,1);
muban+=4;
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==2)
{
if(muban>=2)
{
muban-=2;
mugun+=4;
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==3)
{
if(muban>=3&&mugun>=2)
{
muban-=3;
mugun-=2;
jia(4,1);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==4)
{
if(chakan(9)>=3&&mugun>=2)
{
jian(9,3);
mugun-=2;
jia(4,2);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==5)
{
if(yingding>=3&&mugun>=2)
{
yingding-=3;
mugun-=2;
jia(4,3);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==6)
{
if(jinding>=3&&mugun>=2)
{
jinding-=3;
mugun-=2;
jia(4,4);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==7)
{
if(zuanshi>=3&&mugun>=2)
{
zuanshi-=3;
mugun-=2;
jia(4,5);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==8)
{
if(muban>=4&&mugun>=2)
{
muban-=4;
mugun-=2;
jia(3,1);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==9)
{
if(chakan(9)>=4&&mugun>=2)
{
jian(9,4);
mugun-=2;
jia(3,2);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==10)
{
if(yingding>=4&&mugun>=2)
{
yingding-=4;
mugun-=2;
jia(3,3);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==11)
{
if(jinding>=4&&mugun>=2)
{
jinding-=4;
mugun-=2;
jia(3,4);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==12)
{
if(zuanshi>=4&&mugun>=2)
{
zuanshi-=4;
mugun-=2;
jia(3,5);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==13)
{
if(muban>=2&&mugun>=2)
{
muban-=2;
mugun-=2;
jia(2,1);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==14)
{
if(chakan(9)>=2&&mugun>=2)
{
jian(9,2);
mugun-=2;
jia(2,2);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==15)
{
if(yingding>=2&&mugun>=2)
{
yingding-=2;
mugun-=2;
jia(2,3);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==16)
{
if(jinding>=2&&mugun>=2)
{
jinding-=2;
mugun-=2;
jia(2,4);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
else if(xuanze==17)
{
if(zuanshi>=2&&mugun>=2)
{
zuanshi-=2;
mugun-=2;
jia(2,5);
cout<<"成功!!";
}
else
{
cout<<"工具不足!!";
}
}
Sleep(3000);
}
void ronglu()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
system("cls");
cout<<"\n\n\n 规则:\n";
cout<<" 一个木板烧一个物品\n";
cout<<" 一个木头烧两个物品\n";
cout<<" 一个煤炭烧四个物品\n";
cout<<" 不足一个燃料算一个燃料\n";
cout<<" 一次装燃料不要超过64个,也不要超过背包容量,也不要是零个,不然你的存档就没了\n";
Sleep(3000);
cout<<" 熔炉燃料:\n";
if(rongluranliaodengji==0)
{
cout<<" 无\n";
cout<<" 是否添置燃料: 1.是 2.退出\n";
int xuanze1;
cin>>xuanze1;
if(xuanze1==1)
{
cout<<" 您的燃料:\n";
cout<<" 1.木头:"<<chakan(7)<<"个\n";
cout<<" 2.木板:"<<muban<<"个\n";
cout<<" 3.煤:"<<chakan(14)<<"个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2==1)
{
cout<<" 多少个\n";
int xuanze3;
cin>>xuanze3;
if(xuanze3==0)
{
exit(0);
}
jian(7,xuanze3);
rongluranliaodengji=1;
rongluranliaoshuliang+=xuanze3;
}
else if(xuanze2==2)
{
rongluranliaodengji=2;
cout<<" 多少个\n";
int xuanze3;
cin>>xuanze3;
if(xuanze3==0)
{
exit(0);
}
muban-=xuanze3;
rongluranliaoshuliang+=xuanze3;
}
else if(xuanze2==3)
{
rongluranliaodengji=3;
cout<<" 多少个\n";
int xuanze3;
cin>>xuanze3;
if(xuanze3==0)
{
exit(0);
}
jian(14,xuanze3);
rongluranliaoshuliang+=xuanze3;
}
}
}
else if(rongluranliaodengji==1)
{
cout<<" 木头:"<<rongluranliaoshuliang<<"个\n";
cout<<" 是否添置燃料: 1.是 2.否\n";
int xuanze1;
cin>>xuanze1;
if(xuanze1==1)
{
cout<<" 您的燃料:\n";
cout<<" 木头:"<<chakan(7)<<"个\n";
cout<<" 多少个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2==0)
{
exit(0);
}
jian(7,xuanze2);
rongluranliaoshuliang+=xuanze2;
}
}
else if(rongluranliaodengji==2)
{
cout<<" 木板:"<<rongluranliaoshuliang<<"个";
cout<<" 是否添置燃料: 1.是 2.否\n";
int xuanze1;
cin>>xuanze1;
if(xuanze1==1)
{
cout<<" 您的燃料:\n";
cout<<" 木板:"<<muban<<"个\n";
cout<<" 多少个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2==0)
{
exit(0);
}
jian(7,xuanze2);
muban-=xuanze2;
rongluranliaoshuliang+=xuanze2;
}
}
else if(rongluranliaodengji==3)
{
cout<<" 煤:"<<rongluranliaoshuliang<<"个";
cout<<" 是否添置燃料: 1.是 2.否\n";
int xuanze1;
cin>>xuanze1;
if(xuanze1==1)
{
cout<<" 您的燃料:\n";
cout<<" 煤:"<<chakan(14)<<"个\n";
cout<<" 多少个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2==0)
{
exit(0);
}
jian(14,xuanze2);
rongluranliaoshuliang+=xuanze2;
}
}
cout<<"\n";
cout<<" 您要烧的物品\n";
cout<<" 1.粗铁"<<chakan(10)<<"\n";
cout<<" 2.粗锭"<<chakan(12)<<"\n";
cout<<" 3.钻石矿"<<chakan(13)<<"\n";
int xuanze;
cin>>xuanze;
if(xuanze==1)
{
cout<<" 多少个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2==0)
{
exit(0);
}
if(pow(2,rongluranliaodengji-1)*rongluranliaoshuliang>=xuanze2)
{
rongluranliaoshuliang-=xuanze2/pow(2,rongluranliaodengji-1);
yingding+=xuanze2;
Sleep(xuanze2*1000);
jian(10,xuanze2);
cout<<"成功!!!\n";
}
else
{
cout<<" 燃料不够!!!\n";
}
}
else if(xuanze==2)
{
cout<<" 多少个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2==0)
{
exit(0);
}
if(pow(2,rongluranliaodengji-1)*rongluranliaoshuliang>=xuanze2)
{
rongluranliaoshuliang-=xuanze2/pow(2,rongluranliaodengji-1);
jinding+=xuanze2;
Sleep(xuanze2*1000);
jian(12,xuanze2);
cout<<"成功!!!\n";
}
else
{
cout<<" 燃料不够!!!\n";
}
}
else if(xuanze==3)
{
cout<<" 多少个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2==0)
{
exit(0);
}
if(pow(2,rongluranliaodengji-1)*rongluranliaoshuliang>=xuanze2)
{
rongluranliaoshuliang-=xuanze2/pow(2,rongluranliaodengji-1);
zuanshi+=xuanze2;
Sleep(xuanze2*1000);
jian(13,xuanze2);
cout<<"成功!!!\n";
}
else
{
cout<<" 燃料不够!!!\n";
}
}
Sleep(2000);
}
void jinbiduihuan()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
system("cls");
cout<<" 一个铁锭兑换5个金币\n";
cout<<" 一个金锭兑换10个金币\n";
cout<<" 一个钻石兑换15个金币\n";
cout<<" 1.铁锭:"<<yingding<<"个"<<"\n";
cout<<" 2.金锭:"<<jinding<<"个"<<"\n";
cout<<" 3.钻石:"<<zuanshi<<"个"<<"\n";
int xuanze;
cin>>xuanze;
if(xuanze==1)
{
cout<<" 多少个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2>yingding)
{
cout<<"铁锭不足!!";
}
else
{
jinbi+=5*xuanze2;
}
}
if(xuanze==2)
{
cout<<" 多少个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2>jinding)
{
cout<<"金锭不足!!";
}
else
{
jinbi+=10*xuanze2;
}
}
if(xuanze==3)
{
cout<<" 多少个\n";
int xuanze2;
cin>>xuanze2;
if(xuanze2>zuanshi)
{
cout<<"钻石不足!!";
}
else
{
jinbi+=15*xuanze2;
}
}
if(jinbi>=10000)
{
furen=1;
}
Sleep(3000);
}
void guize()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
system("cls");
cout<<"\n\n\n 规则是:\n";
Sleep(1000);
cout<<" a键向左\n";
Sleep(1000);
cout<<" d键向右\n";
Sleep(1000);
cout<<" w键跳跃\n";
Sleep(1000);
cout<<" tyugjbnm键挖方块,方向你知道的\n";
Sleep(1000);
cout<<" z键使用药水\n";
Sleep(1000);
cout<<" c键吃东西\n";
Sleep(1000);
cout<<" x键搭东西,然后有提示\n";
Sleep(1000);
cout<<" r键翻箱子\n";
Sleep(1000);
cout<<" p键退出\n";
Sleep(1000);
cout<<" k键改变手持\n";
Sleep(1000);
cout<<" 还有好多玩法,等你尝试!!!\n";
Sleep(5000);
}
void chengjiu()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
system("cls");
cout<<"\n\n\n 您的成就:\n";
cout<<"\n\n\n 已完成:\n";
if(chenjiu==1)
{
cout<<" 解说成就\n";
}
if(jieshule==1)
{
cout<<" 结束了?\n";
}
if(zuan==1)
{
cout<<" 钻石!\n";
}
if(xiajie==1)
{
cout<<" 下界!";
}
if(furen==1)
{
cout<<" 富人一个!";
}
Sleep(3000);
}
void MCqianzhi()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
COORD size = {130, 40};
SetConsoleScreenBufferSize(hOut,size);
SMALL_RECT rc = {0,0, 130, 40};
SetConsoleWindowInfo(hOut,true ,&rc);
system("cls");
cout<<"\n\n\n 注册:你的名字\n\n";
cin>>name;
while(1)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
system("cls");
cout<<"\n\n\n\n";
cout<<" |------------------------------------------------------------------------------------------|\n";
cout<<" | 1.游戏 2.商城 3.工作台 4.熔炉 5.金币 6.规则 |\n";
cout<<" | 作者--吕牧原 |\n";
cout<<" |------------------------------------------------------------------------------------------|\n";
cout<<"\t\t选择:";
int xuanze;
cin>>xuanze;
if(xuanze==1)
{
if(flag==0)
{
gongjushouchi=1;
flag=1;
gongjurongji[1].wupin=4;
gongjurongji[1].dengji=5;
chushi();
}
MC();
}
else if(xuanze==2)
{
shangcheng();
}
else if(xuanze==3)
{
gongzuotai();
}
else if(xuanze==4)
{
ronglu();
}
else if(xuanze==5)
{
jinbiduihuan();
}
else if(xuanze==6)
{
guize();
}
else if(xuanze==7)
{
chenjiu=1;
chengjiu();
}
}
}
int x=14,y=1;
int jiguan1[16][3]={{0},{0,1,4},{0,1,4},{0,3,2},{0,1,3},{0,2,4},{0,4,1},{0,1,4},{0,2,3},{0,1,4},{0,3,2},{0,1,4},{0,1,4},{0,2,4},{0,1,3},{0,2,4}};
int ditu4y[20][41]=
{
{0},
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,191,191,191,191,191,191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,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,11,11,11,11,11,11,15,11,11,12,12,12,12,12,11,11,11,11,11},
{0,11,11,11,15,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,11,11,11,11,11,11},
{0,11,11,15,11,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11},
{0,11,15,15,15,15,15,15,15,15,11,11,6 ,11,11,11,11,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,15,11,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,15,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,6 ,6 ,6 ,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,191,191,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,11,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0,11,11,11,191,11,11,11,11,11,11,11,6 ,11,11,11,11,6 ,11,11,11,11,191,191,11,11,11,11,11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 ,6 ,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0 ,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0 ,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11},
{0 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 },
{0 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 ,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
};
int chushiy[20][51]=
{
{0},
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,6 ,6 ,6 ,6 ,6 ,6 ,6 },
{0,11,11,11,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,15,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,11,0 ,11,0 ,11,11,6 },
{0,11,11,15,15,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,11,6 ,0 ,11,0 ,0 ,11,11,6 },
{0,11,11,11,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,6 ,0 ,11,0 ,0 ,11,11,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,11,11,11,11,6 ,0 ,11,0 ,0 ,11,11,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,6 ,0 ,0 ,0 ,0 ,0 ,11,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,15,11,11,11,11,11,11,6 ,11,0 ,11,0 ,0 ,11,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,11,0 ,11,0 ,11,11,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,172,10,10,10,172,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,11,11,11,0 ,11,11,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,0 ,0 ,0 ,0 ,0 ,0 ,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,11,0 ,0 ,11,11,11,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,6 ,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,0 ,0 ,0 ,11,0 ,11,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,6 ,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,11,0 ,0 ,11,11,11,6 },
{0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,6 ,6 ,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6 ,11,0 ,0 ,11,11,11,6 },
{0,6 ,6 ,6 ,6 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0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
};
void win()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
COORD size = {150, 60};
SetConsoleScreenBufferSize(hOut,size);
SMALL_RECT rc = {0,0, 150, 60};
SetConsoleWindowInfo(hOut,true ,&rc);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"■ ■ ■■■■■■■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■ ■■■■■■■";
cout<<endl;
system("cls");
Sleep(500);
cout<<"■ ■ ■■■■■■■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■ ■■■■■■■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
for(int j=1;j<=5;j++)
{
for(int i=1;i<=15;i++)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),i);
system("cls");
Sleep(500);
cout<<"■ ■ ■■■■■■■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■ ■■■■■■■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
}
}
exit(0);
}
void die()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"■ ■ ■■■■■■■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■ ■■■■■■■";
cout<<endl;
system("cls");
Sleep(500);
cout<<"■ ■ ■■■■■■■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■ ■■■■■■■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■ ■ ■■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■■■■■■■ ■ ■■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■■■■■■■ ■ ■■■■■■■■■";
for(int j=1;j<=5;j++)
{
for(int i=1;i<=15;i++)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),i);
system("cls");
cout<<"■ ■ ■■■■■■■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■ ■■■■■■■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■ ■ ■■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■■■■■■■ ■ ■■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■■■■■■■ ■ ■■■■■■■■■";
}
}
exit(0);
}
//die
void yici(int i,int j)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),11);
system("cls");
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ";
cout<<endl;
cout<<"■■■ ■ ■■■ ■";
cout<<endl;
cout<<" ■";
cout<<endl;
cout<<"■■■ ■■■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<"■ ■■■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■■■■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■■■■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■";
cout<<endl;
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■■■■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■ ■ ■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■■■■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■ ■ ■■■■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■■ ■ ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■■■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■■ ■ ■ ■ ■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■■■■■■";
}
//一次机会
void liangci(int i,int j)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),11);
system("cls");
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ";
cout<<endl;
cout<<"■■■ ■ ■■■ ■";
cout<<endl;
cout<<" ■";
cout<<endl;
cout<<"■■■ ■■■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<"■ ■■■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■ ■■■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■ ■ ■ ";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■■■■■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■ ■ ■■ ■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■ ■ ■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■ ■■■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■ ■ ■";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■■■■■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■ ■ ■■ ■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■ ■ ■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■";
cout<<endl;
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■ ■";
cout<<endl;
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■";
cout<<endl;
cout<<" ■ ■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■ ■■■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■ ■ ■ ";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■■■■■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■ ■ ■■ ■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■ ■ ■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■ ■ ■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■";
Sleep(100);
system("cls");
cout<<" ■ ■ ■ ■ ■■■■■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■■■■■■ ■ ■ ";
cout<<endl;
cout<<"■■■ ■ ■■■ ■ ■■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■■■■■■■";
cout<<endl;
cout<<"■■■ ■■■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■ ■ ■■ ■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<"■ ■■■ ■ ■ ■ ■";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ■ ■ ■■■■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■■■■■■■■ ■ ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■■■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■■■■■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■■ ■ ■ ■ ■■■■■■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■ ";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■ ■";
cout<<endl;
cout<<" ■ ■ ■ ■ ■ ■■■■■■";
}
//两次机会
void shuchu4(int ki,int kj)
{
system("cls");
for(int i=1;i<=19;i++)
{
for(int j=1;j<=40;j++)
{
if(x==i&&y==j)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"我";
}
else if(ditu4d[i][j]==1)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu4y[i][j]);
printf("▇");
}
else if(ditu4d[i][j]==2)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu4y[i][j]);
printf("●");
}
else if(ditu4d[i][j]==3)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu4y[i][j]);
printf("▼");
}
else
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu4y[i][j]);
printf("▲");
}
}
cout<<endl;
}
if(ditu4di[x][y]==2) die();
if(ditu4di[x][y]==1) die();
}
//输出4
void dixing4()
{
while(1)
{
bool f=0;
if(ditu4di[x+1][y]==0)
{
x+=1;
if(x==20)
{
f=1;
}
}
else
{
break;
}
if(f==1)
{
die();
break;
}
system("cls");
shuchu4(1,1);
}
}
//地心引力4
void yidong4(int i,int j,char xingzou)
{
if(xingzou=='d')
{
if(ditu4di[x][y+1]==0||ditu3di[x][y+1]==2)
{
if(y!=j+40)
y+=1;
}
}
if(xingzou=='a')
{
if(ditu4di[x][y-1]==0||ditu3di[x][y-1]==2)
{
if(y!=j+1-1)
y-=1;
}
}
if(xingzou=='s')
{
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu4(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu4(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu4di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
shuchu4(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu4di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
Sleep(20);
shuchu4(i,j);
}
if(xingzou=='w')
{
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu4di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu4di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
}
if(xingzou=='q')
{
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu4(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu4(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu4(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu4(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu4di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
shuchu4(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu4di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
shuchu4(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu4di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
Sleep(200);
shuchu4(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu4di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
Sleep(20);
shuchu4(i,j);
}
if(xingzou=='e')
{
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu4di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu4di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu4di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu4(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu4di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
Sleep(20);
shuchu4(i,j);
}
}
//移动4
void ditu4()
{
x=1,y=3;
dixing4();
while(1)
{
char xingzou;
xingzou=getch();
if(xingzou=='I'&&y>=33&&x==15)
{
win();
}
yidong4(1,1,xingzou);
shuchu4(1,1);
dixing4();
if(y==4) ditu4di[x+1][3]=0;
if(y==36)
{
while(1)
{
x-=1;
shuchu4(1,1);
}
}
}
}
void shuchu3(int ki,int kj)
{
system("cls");
for(int i=1;i<=19;i++)
{
for(int j=1;j<=40;j++)
{
if(x==i&&y==j)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"我";
}
else if(ditu3d[i][j]==1)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu3y[i][j]);
printf("▇");
}
else if(ditu3d[i][j]==2)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu3y[i][j]);
printf("●");
}
else if(ditu3d[i][j]==3)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu3y[i][j]);
printf("▼");
}
else
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu3y[i][j]);
printf("▲");
}
}
cout<<endl;
}
if(ditu3di[x][y]==2) die();
if(ditu3di[x][y]==1) die();
}
//输出3
void dixing3()
{
while(1)
{
bool f=0;
if(ditu3di[x+1][y]==0)
{
x+=1;
if(x==19)
{
f=1;
}
}
else
{
break;
}
if(f==1)
{
die();
break;
}
system("cls");
shuchu3(1,1);
}
}
//地心引力3
void yidong3(char xingzou,int i,int j)
{
if(xingzou=='d')
{
if(ditu3di[x][y+1]==0||ditu3di[x][y+1]==2)
{
if(y!=j+40)
y+=1;
}
}
if(xingzou=='a')
{
if(ditu3di[x][y-1]==0||ditu3di[x][y-1]==2)
{
if(y!=j+1-1)
y-=1;
}
}
if(xingzou=='s')
{
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu3(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu3(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu3di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
shuchu3(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu3di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
Sleep(20);
shuchu3(i,j);
}
if(xingzou=='w')
{
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu3di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu3di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
}
if(xingzou=='q')
{
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu3(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu3(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu3(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu3(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu3di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
shuchu3(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu3di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
shuchu3(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu3di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
Sleep(200);
shuchu3(i,j);
Sleep(20);
x+=1;
y-=1;
if(ditu3di[x][y]==1) x-=1;
if(y<j+1-1) y=j;
Sleep(20);
shuchu3(i,j);
}
if(xingzou=='e')
{
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu3di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu3di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu3di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
shuchu3(i,j);
Sleep(20);
x+=1;
y+=1;
if(ditu3di[x][y]==1) x-=1;
if(y>j+40) y=j+40;
Sleep(20);
shuchu3(i,j);
}
}
//移动3
void youxijiguan1()
{
for(int i=1;i<=15;i++)
{
yici(1,1);
int jiguan1y=12+jiguan1[i][1];
int jiguan2y=12+jiguan1[i][2];
ditu3y[5][jiguan1y]=191;
ditu3y[5][jiguan2y]=191;
ditu3di[5][jiguan1y]=2;
ditu3di[5][jiguan2y]=2;
ditu3d[5][jiguan1y]=3;
ditu3d[5][jiguan2y]=3;
shuchu3(1,1);
Sleep(100);
char a;
a=getch();
yidong3(a,1,1);
for(int i=5;i<=17;i++)
{
ditu3y[i][jiguan1y]=191;
ditu3y[i][jiguan2y]=191;
ditu3di[i][jiguan1y]=2;
ditu3di[i][jiguan2y]=2;
ditu3d[i][jiguan1y]=3;
ditu3d[i][jiguan2y]=3;
ditu3y[i-1][jiguan1y]=11;
ditu3y[i-1][jiguan2y]=11;
ditu3di[i-1][jiguan1y]=0;
ditu3di[i-1][jiguan2y]=0;
ditu3d[i-1][jiguan1y]=1;
ditu3d[i-1][jiguan2y]=1;
shuchu3(1,1);
Sleep(100);
}
ditu3y[17][jiguan1y]=11;
ditu3y[17][jiguan2y]=11;
ditu3di[17][jiguan1y]=0;
ditu3di[17][jiguan2y]=0;
ditu3d[17][jiguan1y]=1;
ditu3d[17][jiguan2y]=1;
shuchu3(1,1);
Sleep(100);
}
}
void ditu3()
{
int flag=1;
x=14;
y=40;
while(1)
{
shuchu3(1,1);
char xingzou;
if(x==18&&y==1&&xingzou=='a') ditu4();
xingzou=getch();
if(x==14&&y==40&&xingzou=='d') return ;
yidong3(xingzou,1,1);
dixing3();
if(y==16&&flag==0)
{
flag=1;
ditu3y[10][12]=6;
ditu3di[10][12]=1;
ditu3y[10][17]=6;
ditu3di[10][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[11][12]=6;
ditu3di[11][12]=1;
ditu3y[11][17]=6;
ditu3di[11][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[12][12]=6;
ditu3di[12][12]=1;
ditu3y[12][17]=6;
ditu3di[12][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[13][12]=6;
ditu3di[13][12]=1;
ditu3y[13][17]=6;
ditu3di[13][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[14][12]=6;
ditu3di[14][12]=1;
ditu3y[14][17]=6;
ditu3di[14][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[15][12]=6;
ditu3di[15][12]=1;
ditu3y[15][17]=6;
ditu3di[15][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[16][12]=6;
ditu3di[16][12]=1;
ditu3y[16][17]=6;
ditu3di[16][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[17][12]=6;
ditu3di[17][12]=1;
ditu3y[17][17]=6;
ditu3di[17][17]=1;
youxijiguan1();
}
if(y==18&&flag==1)
{
flag=0;
ditu3y[10][12]=11;
ditu3di[10][12]=0;
ditu3y[10][17]=11;
ditu3di[10][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[11][12]=11;
ditu3di[11][12]=0;
ditu3y[11][17]=11;
ditu3di[11][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[12][12]=11;
ditu3di[12][12]=0;
ditu3y[12][17]=11;
ditu3di[12][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[13][12]=11;
ditu3di[13][12]=0;
ditu3y[13][17]=11;
ditu3di[13][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[14][12]=11;
ditu3di[14][12]=0;
ditu3y[14][17]=11;
ditu3di[14][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[15][12]=11;
ditu3di[15][12]=0;
ditu3y[15][17]=11;
ditu3di[15][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[16][12]=11;
ditu3di[16][12]=0;
ditu3y[16][17]=11;
ditu3di[16][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[17][12]=11;
ditu3di[17][12]=0;
ditu3y[17][17]=11;
ditu3di[17][17]=0;
}
if(y==19&&flag==0)
{
flag=1;
ditu3y[10][12]=6;
ditu3di[10][12]=1;
ditu3y[10][17]=6;
ditu3di[10][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[11][12]=6;
ditu3di[11][12]=1;
ditu3y[11][17]=6;
ditu3di[11][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[12][12]=6;
ditu3di[12][12]=1;
ditu3y[12][17]=6;
ditu3di[12][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[13][12]=6;
ditu3di[13][12]=1;
ditu3y[13][17]=6;
ditu3di[13][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[14][12]=6;
ditu3di[14][12]=1;
ditu3y[14][17]=6;
ditu3di[14][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[15][12]=6;
ditu3di[15][12]=1;
ditu3y[15][17]=6;
ditu3di[15][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[16][12]=6;
ditu3di[16][12]=1;
ditu3y[16][17]=6;
ditu3di[16][17]=1;
shuchu3(1,1);
Sleep(100);
ditu3y[17][12]=6;
ditu3di[17][12]=1;
ditu3y[17][17]=6;
ditu3di[17][17]=1;
}
if(y==13&&flag==1)
{
flag=0;
ditu3y[10][12]=11;
ditu3di[10][12]=0;
ditu3y[10][17]=11;
ditu3di[10][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[11][12]=11;
ditu3di[11][12]=0;
ditu3y[11][17]=11;
ditu3di[11][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[12][12]=11;
ditu3di[12][12]=0;
ditu3y[12][17]=11;
ditu3di[12][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[13][12]=11;
ditu3di[13][12]=0;
ditu3y[13][17]=11;
ditu3di[13][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[14][12]=11;
ditu3di[14][12]=0;
ditu3y[14][17]=11;
ditu3di[14][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[15][12]=11;
ditu3di[15][12]=0;
ditu3y[15][17]=11;
ditu3di[15][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[16][12]=11;
ditu3di[16][12]=0;
ditu3y[16][17]=11;
ditu3di[16][17]=0;
shuchu3(1,1);
Sleep(100);
ditu3y[17][12]=11;
ditu3di[17][12]=0;
ditu3y[17][17]=11;
ditu3di[17][17]=0;
}
}
}
//第三个地图
void shuchu2(int ki,int kj)
{
system("cls");
for(int i=1;i<=19;i++)
{
for(int j=1;j<=40;j++)
{
if(x==i&&y==j)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"我";
}
else if(ditu2d[i][j]==1)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu2y[i][j]);
printf("▇");
}
else if(ditu2d[i][j]==3)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu2y[i][j]);
printf("▼");
}
else
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ditu2y[i][j]);
printf("▲");
}
}
cout<<endl;
}
if(ditu2di[x][y]==2) die();
if(ditu2di[x][y]==1) die();
}
//输出2
void dixing2(int i,int j)
{
while(1)
{
bool f=0;
if(ditu2di[x+1][y]==0)
{
x+=1;
if(x==19)
{
f=1;
}
}
else
{
break;
}
if(f==1)
{
die();
break;
}
system("cls");
shuchu2(1,1);
}
}
//地心引力2
void yidong2(char xingzou,int i,int j)
{
if(xingzou=='d')
{
if(ditu2di[x][y+1]==0||ditu2di[x][y+1]==2)
{
if(y!=j+40)
y+=1;
}
}
if(xingzou=='a')
{
if(ditu2di[x][y-1]==0||ditu2di[x][y-1]==2)
{
if(y!=j+1-1)
y-=1;
}
}
if(xingzou=='s')
{
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
Sleep(20);
shuchu2(i,j);
}
if(xingzou=='w')
{
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
}
if(xingzou=='q')
{
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x+=1;
y-=1;
Sleep(20);
if(y<j+1-1) y=j;
shuchu2(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
Sleep(20);
shuchu2(i,j);
}
if(xingzou=='e')
{
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu2(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
Sleep(20);
shuchu2(i,j);
}
}
//移动2
void ditu2()
{
x=16;
y=40;
while(1)
{
shuchu2(1,1);
char xingzou;
xingzou=getch();
yidong2(xingzou,1,1);
if(x==16&&y==40&&xingzou=='d')
{
return ;
}
}
}
void shuchu1(int i,int j)
{
system("cls");
for(int ki=1;ki<=19;ki++,i++)
{
for(int kj=1;kj<=42;kj++,j++)
{
if(i==x&&j==y)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"我";
}
else
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), chushiy[i][j]);
if(chushid[i][j]==1)
{
printf("▇");
}
else if(chushid[i][j]==2)
{
printf("●");
}
}
}
cout<<endl;
j-=42;
}
i-=19;
if(chushidi[x][y]==2) die();
if(chushidi[x][y]==1) die();
}
void dixing(int i,int j)
{
while(1)
{
bool f=0;
if(chushidi[x+1][y]==0)
{
x+=1;
if(x==19)
{
f=1;
}
}
else
{
break;
}
if(f==1)
{
die();
break;
}
system("cls");
shuchu1(i,j);
}
}
//地心引力
void yidong(char xingzou,int i,int j)
{
if(xingzou=='d')
{
if(chushidi[x][y+1]==0)
{
if(y!=j+40)
y+=1;
}
}
if(xingzou=='a')
{
if(chushidi[x][y-1]==0)
{
if(y!=j+1-1)
y-=1;
}
}
if(xingzou=='s')
{
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu1(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu1(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
shuchu1(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
Sleep(20);
shuchu1(i,j);
}
if(xingzou=='w')
{
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
}
if(xingzou=='q')
{
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu1(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu1(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu1(i,j);
Sleep(20);
x-=1;
y-=1;
if(y<j+1-1) y=j;
shuchu1(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
shuchu1(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
Sleep(20);
x+=1;
y-=1;
shuchu1(i,j);
Sleep(20);
if(y<j+1-1) y=j;
shuchu1(i,j);
Sleep(20);
x+=1;
y-=1;
if(y<j+1-1) y=j;
Sleep(20);
shuchu1(i,j);
}
if(xingzou=='e')
{
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x-=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
shuchu1(i,j);
Sleep(20);
x+=1;
y+=1;
if(y>j+40) y=j+40;
Sleep(20);
shuchu1(i,j);
}
}
//移动
void ditu1()
{
int flag=0;
int flaga1=0,flaga2=0;
int j=1,i=1;
while(1)
{
shuchu1(i,j);
char xingzou=getch();
if(flaga1==1&&flaga2==1&&x==14&&y==1&&xingzou=='a')
{
ditu2();
x=14;
y=1;
}
if(flaga1==1&&flaga2==1&&x==17&&y==1&&xingzou=='a')
{
ditu3();
x=17;
y=1;
}
yidong(xingzou,i,j);
Sleep(10);
dixing(i,j);
if(y==19&&flaga1==0)
{
flaga1=1;
shuchu1(i,j);
yici(i,j);
shuchu1(i,j);
char xingzou=getch();
yidong(xingzou,i,j);
chushiy[9][19]=10;
chushid[9][19]=1;
chushidi[9][19]=0;
chushiy[10][19]=12;
chushid[10][19]=2;
chushidi[10][19]=2;
shuchu1(i,j);
Sleep(100);
chushiy[10][19]=10;
chushid[10][19]=1;
chushidi[10][19]=0;
chushiy[11][19]=12;
chushid[11][19]=2;
chushidi[11][19]=2;
shuchu1(i,j);
Sleep(100);
chushiy[11][19]=10;
chushid[11][19]=1;
chushidi[11][19]=0;
chushiy[12][19]=12;
chushid[12][19]=2;
chushidi[12][19]=2;
shuchu1(i,j);
Sleep(100);
chushiy[12][19]=11;
chushid[12][19]=1;
chushidi[12][19]=0;
chushiy[13][19]=12;
chushid[13][19]=2;
chushidi[13][19]=2;
shuchu1(i,j);
Sleep(100);
chushiy[13][19]=11;
chushid[13][19]=1;
chushidi[12][19]=0;
chushiy[14][19]=12;
chushid[14][19]=2;
chushidi[13][19]=2;
shuchu1(i,j);
Sleep(100);
chushiy[14][19]=11;
chushid[14][19]=1;
chushidi[14][19]=0;
}
if(y==23&&flaga2==0)
{
flaga2=1;
chushid[9][23]=1;
chushiy[9][23]=10;
chushidi[9][23]=0;
yici(i,j);
shuchu1(i,j);
char xingzou=getch();
yidong(xingzou,i,j);
for(int k=1;k<=40;k++)
{
if(k!=19)
{
chushid[1][k]=2;
chushidi[1][k]=2;
}
}
shuchu1(i,j);
Sleep(100);
for(int ki=2;ki<=14;ki++)
{
for(int kj=1;kj<=40;kj++)
{
if(kj!=19)
{
chushid[ki][kj]=2;
chushidi[ki][kj]=2;
chushid[ki-1][kj]=1;
chushidi[ki-1][kj]=0;
}
}
shuchu1(i,j);
Sleep(100);
}
for(int k=1;k<=40;k++)
{
if(k!=19)
{
chushid[14][k]=1;
chushidi[14][k]=0;
}
}
shuchu1(i,j);
chushidi[15][11]=0;
liangci(1,1);
shuchu1(i,j);
char xing=getch();
yidong(xing,i,j);
char xin=getch();
yidong(xin,i,j);
for(int ki1=15;ki1<=19;ki1++)
{
for(int kj1=13;kj1<=30;kj1++)
{
chushiy[ki1][kj1]=15;
chushidi[ki1][kj1]=0;
}
Sleep(100);
dixing(i,j);
shuchu1(i,j);
}
dixing(i,j);
}
if(y<=37&&flag==1)
{
flag=0;
j-=9;
}
if(y>=38&&flag==0)
{
flag=1;
j+=9;
chushiy[6][37]=11;
chushiy[7][36]=11;
chushiy[4][37]=11;
chushiy[3][36]=11;
chushiy[6][33]=15;
chushiy[7][34]=15;
chushiy[3][34]=15;
chushiy[4][33]=15;
}
system("cls");
}
}
//地图
void guize2()
{
cout<<"规则是:\n";
Sleep(700);
cout<<"a键向左走,d键向右走\n";
Sleep(1500);
cout<<"s键向左跳跃,w键向右跳跃\n";
Sleep(1500);
cout<<"q键向左二连跳,e键向右二连跳\n";
Sleep(1500);
cout<<"版权所有,未经允许不得盗版,例:迷你世界盗版MC\n";
Sleep(2500);
cout<<"在此致敬行走,有些代码是借鉴行走的";
Sleep(6000);
system("cls");
}
//规则
void kaishiyouxi()
{
system("cls");
while(1)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"\n\n\n\n";
cout<<" |--------------------------------------------------------|\n";
cout<<" | 1.新游戏 2.规则 |\n";
cout<<" | 作者--吕牧原 |\n";
cout<<" |--------------------------------------------------------|\n";
cout<<"\t\t选择:";
int xuanze;
cin>>xuanze;
system("cls");
if(xuanze==2)
{
guize2();
}
else
{
ditu1();
}
}
}
//游戏
void mozu()
{
while(1)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"\n\n\n\n";
cout<<" |------------------------------------------------------------------------|\n";
cout<<" | 1.原版 2.MC 3.古树 |\n";
cout<<" | 作者--吕牧原 |\n";
cout<<" |------------------------------------------------------------------------|\n";
cout<<"\t\t选择:";
int a;
cin>>a;
if(a==1)
{
kaishiyouxi();
}
else if(a==2)
{
MCqianzhi();
}
else
{
cout<<"未开封";
}
}
}
//模组
void exe()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO bInfo;
GetConsoleScreenBufferInfo(hOut, &bInfo );
SetConsoleTitle("MC·肝爆之旅");
COORD size = {100, 30};
SetConsoleScreenBufferSize(hOut,size);
SMALL_RECT rc = {0,0, 100, 30};
SetConsoleWindowInfo(hOut,true ,&rc);
int x=::MessageBox(NULL, TEXT(" Minecraft时代,开启!\n 世界无双"), TEXT("1.0版本!"), 0);
}
//修改exe
void kaishiyu()
{
system("color 70");
cout<<"\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t源自dream创建者\n";Sleep(1500);
cout<<"\t\t\t\t\t纯属虚构 本人原创\n";Sleep(1500);
cout<<"\t\t\t\t 世界无双 是 Minecraft 的1.0.00版本\n";Sleep(1500);
cout<<"\t\t\t\t为了大家的体验效果 请打开英文输入法\n";Sleep(1500);
cout<<"\t\t\t\t输入数据时核对一下 输入数字时不能有英文\n";Sleep(1500);
cout<<"\t\t\t\t360找到你的时候麻烦通过一下,程序可能被当成病毒了!\n";Sleep(2000);
cout<<"\t\t\t\t\t 极昼工坊出品 -JZ-\n";Sleep(1000);
cout<<"\t\t\t\t 极昼**欢迎您游玩此游戏 谢谢!"; Sleep(5000);
system("cls");
system("color 07");
}
//开始语
int main()
{
exe();
kaishiyu();
mozu();
return 0;
}
缔造者
#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include <time.h>
#define Height 31 //迷宫的高度,必须为奇数
#define Width 25 //迷宫的宽度,必须为奇数
#define Wall 1
#define Road 0
#define Start 2
#define End 3
#define Esc 5
#define Up 1
#define Down 2
#define Left 3
#define Right 4
int map[Height+2][Width+2];
void gotoxy(int x,int y) //移动坐标
{
COORD coord;
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), coord );
}
void hidden()//隐藏光标
{
/* typedef void *HANDLE; */
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
/* typedef struct _CONSOLE_CURSOR_INFO {
DWORD dwSize;
BOOL bVisible;
} CONSOLE_CURSOR_INFO *PCONSOLE_CURSOR_INFO; */
CONSOLE_CURSOR_INFO cci;
GetConsoleCursorInfo(hOut,&cci);
cci.bVisible = 0;//赋1为显示,赋0为隐藏
SetConsoleCursorInfo(hOut,&cci);
}
void create(int x,int y) //随机生成迷宫
{
int c[4][2] = {0,1,1,0,0,-1,-1,0}; //四个方向
int i,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]);
}
}
int get_key() //接收按键
{
char c;
while(c = getch())
{
if(c == 27)
return Esc; //Esc
if(c != -32)
continue;
c = getch();
if(c == 72)
return Up; //上
if(c == 80)
return Down; //下
if(c ==75 )
return Left; //左
if(c == 77)
return Right; //右
}
return 0;
}
void paint(int x,int y) //画迷宫
{
gotoxy(2 * y - 2,x - 1);
switch(map[x][y])
{
case Start:
printf("入");break; //画入口
case End:
printf("出");break; //画出口
case Wall:
printf("※");break; //画墙
case Road:
printf(" ");break; //画路
}
}
void game()
{
int x=2,y=1; //玩家当前位置,刚开始在入口处
int c; //用来接收按键
while(1)
{
gotoxy(2 * y - 2,x - 1);
printf("☆"); //画出玩家当前位置
if(map[x][y] == End) //判断是否到达出口
{
gotoxy(30,24);
printf("到达终点,按任意键结束");
getch();
break;
}
c = get_key();
if(c == Esc)
{
gotoxy(0,24);
break;
}
switch(c)
{
case Up: //向上走
if(map[x-1][y] != Wall)
{
paint(x,y);
x--;
}
break;
case Down: //向下走
if(map[x+1][y] != Wall)
{
paint(x,y);
x++;
}
break;
case Left: //向左走
if(map[x][y-1] != Wall)
{
paint(x,y);
y--;
}
break;
case Right: //向右走
if(map[x][y+1] != Wall)
{
paint(x,y);
y++;
}
break;
}
}
}
int main()
{
int i,j;
srand((unsigned)time(NULL)); //初始化随即种子
hidden(); //隐藏光标
for(i = 0;i <= Height + 1;i++)
for(j = 0;j <= Width + 1;j++)
if(i == 0 || i == Height + 1 || j == 0 || j == Width + 1) //初始化迷宫
map[i][j] = Road;
else
map[i][j] = Wall;
create(2 * (rand() % (Height / 2)+1),2 * (rand() % (Width / 2) + 1)); //从随机一个点开始生成迷宫,该点行列都为偶数
for(i = 0;i <= Height+1;i++) //边界处理
{
map[i][0]=Wall;
map[i][Width+1]=Wall;
}
for(j=0;j<=Width+1;j++) //边界处理
{
map[0][j]=Wall;
map[Height+1][j]=Wall;
}
map[2][1]=Start; //给定入口
map[Height-1][Width]=End; //给定出口
for(i=1;i<=Height;i++)
for(j=1;j<=Width;j++) //画出迷宫
paint(i,j);
game(); //开始游戏
getch();
return 0;
}