断更了好几天的我,今天又死回来惹!!!马上就是我们的大富翁!!!(一个人玩的)
#include<bits/stdc++.h>
#include<conio.h>
#include<windows.h>
using namespace std;
string arrow=">>";I()
int initial_choose=1;
char pifu[100]={'3','4','5','6','7','8','9','~','!','@','#','$','%','^','&','*','(',')','-','_','=','+','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','[',']','|','{','}',';',':','<','>','?'};
int oo;
int mi=44,mj=101;
int r1i=44,r1j=101;
int r2i=44,r2j=101;
string s[20]={"华联商厦","羊城晚报大厦","移动大厦","央视大厦","河滨商厦","珠江商厦","经贸大厦","国际大厦","塘口商业大厦","中定安大厦","高度大厦","中鼎大厦","北京大厦"},x[20]={"河北大厦","山西大厦","辽宁大厦","吉林大厦","黑龙江大厦","江苏大厦","浙江大厦","安徽大厦","福建大厦","江西大厦","山东大厦","河南大厦","湖北大厦"},z[20]={"湖南大厦","广东大厦","海南大厦","四川大厦","贵州大厦","云南大厦","陕西大厦","甘肃大厦","青海大厦","内蒙古大厦","西藏大厦","宁夏大厦","新疆大厦"},y[20]={"广西大厦","天津大厦","上海大厦","重庆大厦","香港大厦","澳门大厦","台湾大厦","迪拜塔","双子大厦","摩天大楼","银网大厦","天谷中心","五棵松"};//名称
int ds[20],dx[20],dz[20],dy[20];//钱
int bs[20],bx[20],bz[20],by[20];//买者
int ls[20],lx[20],lz[20],ly[20];//房子级别
int fs[20],fx[20],fz[20],fy[20];//惩罚
int mmoney=5000,r1money=5000,r2money=5000;
char road1[200][200]={
"__________________________________________________________________________________________________________",
"| | | | | | | | | | | | | | | |",
"| | | | | | | | | | | | | | | |",
"|______|______|______|______|______|______|______|______|______|______|______|______|______|______|______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______| |______|",
"| | | |",
"| | | |",
"|______|__________________________________________________________________________________________|______|",
"| | | | | | | | | | | | | | | |",
"| | | | | | | | | | | | | | | |",
"|______|______|______|______|______|______|______|______|______|______|______|______|______|______|______|"
};
char road[200][200];
void To_continue()
{
string temp;
temp=getch();
system("cls");
}
void i_choose(int arr)
{
cout<<" ";
if(initial_choose==arr)
{
cout<<arrow;
}
else
{
cout<<" ";
}
}
void Print_initial()
{
cout<<endl;
cout<<" 大 富 翁"<<endl<<endl;
cout<<"===================================================================="<<endl;
cout<<" W S 选择 K 确定"<<endl;
cout<<"===================================================================="<<endl<<endl<<endl<<endl;
i_choose(1);
cout<<" 1.开始游戏"<<endl<<endl;
i_choose(2);
cout<<" 2.游戏指南"<<endl<<endl;
i_choose(3);
cout<<" 3.换皮肤"<<endl<<endl;
i_choose(4);
cout<<" 4.退出游戏"<<endl<<endl;
cout<<"===================================================================="<<endl;
cout<<" 制作:Magnolia_tree"<<endl;
cout<<"===================================================================="<<endl;
}
void loading()
{
system("cls");
cout<<"游戏加载中·";
Sleep(200);
cout<<"·";
Sleep(200);
cout<<"·";
Sleep(200);
cout<<"·";
Sleep(200);
cout<<"·";
Sleep(200);
cout<<"·";
Sleep(200);
cout<<"·";
srand(time(0));
mi=44,mj=101;
r1i=44,r1j=101;
r2i=44,r2j=101;
memset(bs,0,sizeof(bs));
memset(bz,0,sizeof(bz));
memset(by,0,sizeof(by));
memset(bx,0,sizeof(bx));
memset(lz,1,sizeof(lz));
memset(ls,1,sizeof(ls));
memset(lx,1,sizeof(lx));
memset(ly,1,sizeof(ly));
mmoney=5000,r1money=5000,r2money=5000;
for(int i=0;i<46;i++)
{
for(int j=0;j<184;j++)
{
road[i][j]=road1[i][j];
}
}
for(int i=0;i<13;i++)
{
int m1=rand()%501,m2=rand()%501,m3=rand()%501,m4=rand()%501;
if(m1<300)
{
m1+=300;
}
if(m2<300)
{
m2+=300;
}
if(m3<300)
{
m3+=300;
}
if(m4<300)
{
m4+=300;
}
ds[i]=m1;
dx[i]=m2;
dz[i]=m3;
dy[i]=m4;
}
srand(time(0));
int f1=rand()%13,f2=rand()%13,f3=rand()%13,f4=rand()%13,f5=rand()%13,f6=rand()%13,f7=rand()%13,f8=rand()%13,f9=rand()%13,f10=rand()%13,f11=rand()%13,f12=rand()%13,f13=rand()%13,f14=rand()%13,f15=rand()%13,f16=rand()%13;
fs[f1]=fs[f2]=fs[f3]=fs[f4]=fx[f5]=fx[f6]=fx[f7]=fx[f8]=fz[f9]=fz[f10]=fz[f11]=fz[f12]=fy[f13]=fy[f14]=fy[f15]=fy[f16]=1;
}
void One_Play()
{
loading();
while(1)
{
system("cls");
road[mi][mj]=road[mi][mj+1]=pifu[oo];
road[r1i-1][r1j]=road[r1i-1][r1j+1]='1';
road[r2i+1][r2j]=road[r2i+1][r2j+1]='2';
for(int i=0;i<46;i++)
{
for(int j=0;j<184;j++)
{
cout<<road[i][j];
}
cout<<endl;
}
cout<<"1/4/7······:一号人机的房子(数字越高,级别越高)(一号玩家:00)"<<endl;
cout<<"2/5/8······:二号人机的房子(数字越高,级别越高)(二号玩家:11)"<<endl;
cout<<"3/6/9······:玩家(您)的房子(数字越高,级别越高)(玩家(您):22)"<<endl;
cout<<"玩家(您)还有 "<<mmoney<<" 元"<<endl;
cout<<"一号人机还有 "<<r1money<<" 元"<<endl;
cout<<"二号人机还有 "<<r2money<<" 元"<<endl;
cout<<"按任意键掷骰子"<<endl;
string way;
way=getch();
srand(time(0));
int step=rand()%10+1;
cout<<step;
Sleep(600);
for(int i=1;i<=step;i++)
{
system("cls");
road[mi][mj]=road[mi][mj+1]=pifu[oo];
for(int i=0;i<46;i++)
{
for(int j=0;j<184;j++)
{
cout<<road[i][j];
}
cout<<endl;
}
if(mj==3&&mi!=2&&mi!=44)
{
cout<<z[(mi-2)/3]<<endl;
}
if(mj==101&&mi!=2&&mi!=44)
{
cout<<y[(mi-2)/3]<<endl;
}
if(mi==44&&mj!=3&&mj!=101)
{
cout<<x[(mj-3)/7]<<endl;
}
if(mi==2&&mj!=3&&mj!=101)
{
cout<<s[(mj-3)/7]<<endl;
}
cout<<"1/4/7······:一号人机的房子(数字越高,级别越高)(一号玩家:00)"<<endl;
cout<<"2/5/8······:二号人机的房子(数字越高,级别越高)(二号玩家:11)"<<endl;
cout<<"3/6/9······:玩家(您)的房子(数字越高,级别越高)(玩家(您):22)"<<endl;
cout<<"玩家(您)还有 "<<mmoney<<" 元"<<endl;
cout<<"一号人机还有 "<<r1money<<" 元"<<endl;
cout<<"二号人机还有 "<<r2money<<" 元"<<endl;
road[mi][mj]=road[mi][mj+1]=' ';
if((mi==2&&mj==3)||(mi==2&&mj==101)||(mi==44&&mj==3)||(mi==44&&mj==101))
{
if(mi==2&&mj==3)
{
mj+=7;
}
if(mi==2&&mj==101)
{
mi+=3;
}
if(mi==44&&mj==3)
{
mi-=3;
}
if(mi==44&&mj==101)
{
mj-=7;
}
}
else
{
if(mi==2)
{
mj+=7;
}
if(mi==44)
{
mj-=7;
}
if(mj==3&&mi!=44)
{
mi-=3;
}
if(mj==101&&mi!=2)
{
mi+=3;
}
}
Sleep(400);
}
system("cls");
road[mi][mj]=road[mi][mj+1]=pifu[oo];
for(int i=0;i<46;i++)
{
for(int j=0;j<184;j++)
{
cout<<road[i][j];
}
cout<<endl;
}
if(mj==3&&mi!=2&&mi!=44)
{
cout<<z[(mi-2)/3]<<endl;
}
if(mj==101&&mi!=2&&mi!=44)
{
cout<<y[(mi-2)/3]<<endl;
}
if(mi==44&&mj!=3&&mj!=101)
{
cout<<x[(mj-3)/7]<<endl;
}
if(mi==2&&mj!=3&&mj!=101)
{
cout<<s[(mj-3)/7]<<endl;
}
cout<<"1/4/7······:一号人机的房子(数字越高,级别越高)(一号玩家:00)"<<endl;
cout<<"2/5/8······:二号人机的房子(数字越高,级别越高)(二号玩家:11)"<<endl;
cout<<"3/6/9······:玩家(您)的房子(数字越高,级别越高)(玩家(您):22)"<<endl;
cout<<"玩家(您)还有 "<<mmoney<<" 元"<<endl;
cout<<"一号人机还有 "<<r1money<<" 元"<<endl;
cout<<"二号人机还有 "<<r2money<<" 元"<<endl;
if(mj==3&&mi!=2&&mi!=44)
{
int k=(mi-2)/3;
if(fz[k]==1)
{
road[mi-1][mj-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
mmoney-=200;
}
if(cf==1)
{
cout<<"您走着走着遇到了小偷,为了保命,你只好给了他300元。"<<endl;
mmoney-=300;
}
if(cf==2)
{
cout<<"由于您破坏了公物,罚款800元。"<<endl;
mmoney-=800;
}
road[mi-1][mj-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=dz[k]/2;
if(bz[k]==1||bz[k]==2)
{
if(bz[k]==1)
{
cout<<"这是一号人机的地,您需要交给他 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
mmoney-=jiaq;
r1money+=jiaq;
cout<<"您还有:"<<mmoney<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(bz[k]==2)
{
cout<<"这是二号人机的地,您需要交给他 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
mmoney-=jiaq;
r2money+=jiaq;
cout<<"您还有:"<<mmoney<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(bz[k]==3)
{
cout<<lz[k]<<"级房屋---->"<<lz[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元(y/n)"<<endl;
string hf;
hf=getch();
if(hf=="y")
{
if(mmoney>=jiaq)
{
mmoney-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
dz[k]*=2;
lz[k]++;
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
else
{
cout<<"是否购买此地?(y/n)";
string yn;
yn=getch();
if(yn=="y")
{
if(mmoney>=jiaq)
{
mmoney-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
bz[k]=3;
road[mi-1][mj-2]='3';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
if(mj==101&&mi!=2&&mi!=44)
{
int k=(mi-2)/3;
if(fy[k]==1)
{
road[mi-1][mj-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
mmoney-=200;
}
if(cf==1)
{
cout<<"您走着走着遇到了小偷,为了保命,你只好给了他300元。"<<endl;
mmoney-=300;
}
if(cf==2)
{
cout<<"由于您破坏了公物,罚款800元。"<<endl;
mmoney-=800;
}
road[mi-1][mj-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=dy[k]/2;
if(by[k]==1||by[k]==2)
{
if(by[k]==1)
{
cout<<"这是一号人机的地,您需要交给他 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
mmoney-=jiaq;
r1money+=jiaq;
cout<<"您还有:"<<mmoney<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(by[k]==2)
{
cout<<"这是二号人机的地,您需要交给他 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
mmoney-=jiaq;
r2money+=jiaq;
cout<<"您还有:"<<mmoney<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(by[k]==3)
{
cout<<ly[k]<<"级房屋---->"<<ly[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元(y/n)"<<endl;
string hf;
hf=getch();
if(hf=="y")
{
if(mmoney>=jiaq)
{
mmoney-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
dy[k]*=2;
ly[k]++;
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
else
{
cout<<"是否购买此地?(y/n)";
string yn;
yn=getch();
if(yn=="y")
{
if(mmoney>=jiaq)
{
mmoney-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
by[k]=3;
road[mi-1][mj-2]='3';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
if(mi==44&&mj!=3&&mj!=101)
{
int k=(mj-3)/7;
if(fx[k]==1)
{
road[mi-1][mj-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
mmoney-=200;
}
if(cf==1)
{
cout<<"您走着走着遇到了小偷,为了保命,你只好给了他300元。"<<endl;
mmoney-=300;
}
if(cf==2)
{
cout<<"由于您破坏了公物,罚款800元。"<<endl;
mmoney-=800;
}
road[mi-1][mj-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=dx[k]/2;
if(bx[k]==1||bx[k]==2)
{
if(bx[k]==1)
{
cout<<"这是一号人机的地,您需要交给他 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
mmoney-=jiaq;
r1money+=jiaq;
cout<<"您还有:"<<mmoney<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(bx[k]==2)
{
cout<<"这是二号人机的地,您需要交给他 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
mmoney-=jiaq;
r2money+=jiaq;
cout<<"您还有:"<<mmoney<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(bx[k]==3)
{
cout<<lx[k]<<"级房屋---->"<<lx[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元(y/n)"<<endl;
string hf;
hf=getch();
if(hf=="y")
{
if(mmoney>=jiaq)
{
mmoney-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
dx[k]*=2;
lx[k]++;
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
else
{
cout<<"是否购买此地?(y/n)";
string yn;
yn=getch();
if(yn=="y")
{
if(mmoney>=jiaq)
{
mmoney-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
bx[k]=3;
road[mi-1][mj-2]='3';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
if(mi==2&&mj!=3&&mj!=101)
{
int k=(mj-3)/7;
if(fs[k]==1)
{
road[mi-1][mj-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
mmoney-=200;
}
if(cf==1)
{
cout<<"您走着走着遇到了小偷,为了保命,你只好给了他300元。"<<endl;
mmoney-=300;
}
if(cf==2)
{
cout<<"由于您破坏了公物,罚款800元。"<<endl;
mmoney-=800;
}
road[mi-1][mj-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=ds[k]/2;
if(bs[k]==1||bs[k]==2)
{
if(bs[k]==1)
{
cout<<"这是一号人机的地,您需要交给他 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
mmoney-=jiaq;
r1money+=jiaq;
cout<<"您还有:"<<mmoney<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(bs[k]==2)
{
cout<<"这是二号人机的地,您需要交给他 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
mmoney-=jiaq;
r2money+=jiaq;
cout<<"您还有:"<<mmoney<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(bs[k]==3)
{
cout<<ls[k]<<"级房屋---->"<<ls[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元(y/n)"<<endl;
string hf;
hf=getch();
if(hf=="y")
{
if(mmoney>=jiaq)
{
mmoney-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
ds[k]*=2;
ls[k]++;
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
else
{
cout<<"是否购买此地?(y/n)";
string yn;
yn=getch();
if(yn=="y")
{
if(mmoney>=jiaq)
{
mmoney-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
bs[k]=3;
road[mi-1][mj-2]='3';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
srand(time(0));
int step1=rand()%10+1;
cout<<"一号人机走的步数:"<<step1;
Sleep(900);
for(int i=1;i<=step1;i++)
{
system("cls");
road[r1i-1][r1j]=road[r1i-1][r1j+1]='1';
for(int i=0;i<46;i++)
{
for(int j=0;j<184;j++)
{
cout<<road[i][j];
}
cout<<endl;
}
if(r1j==3&&r1i!=2&&r1i!=44)
{
cout<<z[(r1i-2)/3]<<endl;
}
if(r1j==101&&r1i!=2&&r1i!=44)
{
cout<<y[(r1i-2)/3]<<endl;
}
if(r1i==44&&r1j!=3&&r1j!=101)
{
cout<<x[(r1j-3)/7]<<endl;
}
if(r1i==2&&r1j!=3&&r1j!=101)
{
cout<<s[(r1j-3)/7]<<endl;
}
cout<<"1/4/7······:一号人机的房子(数字越高,级别越高)(一号玩家:00)"<<endl;
cout<<"2/5/8······:二号人机的房子(数字越高,级别越高)(二号玩家:11)"<<endl;
cout<<"3/6/9······:玩家(您)的房子(数字越高,级别越高)(玩家(您):22)"<<endl;
cout<<"玩家(您)还有 "<<mmoney<<" 元"<<endl;
cout<<"一号人机还有 "<<r1money<<" 元"<<endl;
cout<<"二号人机还有 "<<r2money<<" 元"<<endl;
road[r1i-1][r1j]=road[r1i-1][r1j+1]=' ';
if((r1i==2&&r1j==3)||(r1i==2&&r1j==101)||(r1i==44&&r1j==3)||(r1i==44&&r1j==101))
{
if(r1i==2&&r1j==3)
{
r1j+=7;
}
if(r1i==2&&r1j==101)
{
r1i+=3;
}
if(r1i==44&&r1j==3)
{
r1i-=3;
}
if(r1i==44&&r1j==101)
{
r1j-=7;
}
}
else
{
if(r1i==2)
{
r1j+=7;
}
if(r1i==44)
{
r1j-=7;
}
if(r1j==3&&r1i!=44)
{
r1i-=3;
}
if(r1j==101&&r1i!=2)
{
r1i+=3;
}
}
Sleep(400);
}
system("cls");
road[r1i-1][r1j]=road[r1i-1][r1j+1]='1';
for(int i=0;i<46;i++)
{
for(int j=0;j<184;j++)
{
cout<<road[i][j];
}
cout<<endl;
}
if(r1j==3&&r1i!=2&&r1i!=44)
{
cout<<z[(r1i-2)/3]<<endl;
}
if(r1j==101&&r1i!=2&&r1i!=44)
{
cout<<y[(r1i-2)/3]<<endl;
}
if(r1i==44&&r1j!=3&&r1j!=101)
{
cout<<x[(r1j-3)/7]<<endl;
}
if(r1i==2&&r1j!=3&&r1j!=101)
{
cout<<s[(r1j-3)/7]<<endl;
}
cout<<"1/4/7······:一号人机的房子(数字越高,级别越高)(一号玩家:00)"<<endl;
cout<<"2/5/8······:二号人机的房子(数字越高,级别越高)(二号玩家:11)"<<endl;
cout<<"3/6/9······:玩家(您)的房子(数字越高,级别越高)(玩家(您):22)"<<endl;
cout<<"玩家(您)还有 "<<mmoney<<" 元"<<endl;
cout<<"一号人机还有 "<<r1money<<" 元"<<endl;
cout<<"二号人机还有 "<<r2money<<" 元"<<endl;
if(r1j==3&&r1i!=2&&r1i!=44)
{
int k=(r1i-2)/3;
if(fz[k]==1)
{
road[r1i-1][r1j-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
r1money-=200;
}
if(cf==1)
{
cout<<"一号人机走着走着遇到了小偷,为了保命,他只好给了他300元。"<<endl;
r1money-=300;
}
if(cf==2)
{
cout<<"由于一号人机破坏了公物,罚款800元。"<<endl;
r1money-=800;
}
road[r1i-1][r1j-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=dz[k]/2;
if(bz[k]==2||bz[k]==3)
{
if(bz[k]==2)
{
cout<<"这是二号人机的地,一号人机需要交给他 "<<jiaq<<" 块过路费。"<<endl;
r1money-=jiaq;
r2money+=jiaq;
cout<<"一号人机还有:"<<r1money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(bz[k]==3)
{
cout<<"这是您的地,一号人机需要交给您 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
r1money-=jiaq;
mmoney+=jiaq;
cout<<"一号人机还有:"<<r1money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(bz[k]==1)
{
cout<<lz[k]<<"级房屋---->"<<lz[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元"<<endl;
if(r1money>=jiaq)
{
r1money-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
dz[k]*=2;
lz[k]++;
}
}
else
{
cout<<"是否购买此地?(y/n)";
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
bz[k]=1;
road[r1i-1][r1j-2]='1';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
if(r1j==101&&r1i!=2&&r1i!=44)
{
int k=(r1i-2)/3;
if(fy[k]==1)
{
road[r1i-1][r1j-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
r1money-=200;
}
if(cf==1)
{
cout<<"一号人机走着走着遇到了小偷,为了保命,他只好给了他300元。"<<endl;
r1money-=300;
}
if(cf==2)
{
cout<<"由于一号人机破坏了公物,罚款800元。"<<endl;
r1money-=800;
}
road[r1i-1][r1j-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=dy[k]/2;
if(by[k]==2||by[k]==3)
{
if(by[k]==2)
{
cout<<"这是二号人机的地,一号人机需要交给他 "<<jiaq<<" 块过路费。"<<endl;
r1money-=jiaq;
r2money+=jiaq;
cout<<"一号人机还有:"<<r1money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(by[k]==3)
{
cout<<"这是您的地,一号人机需要交给您 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
r1money-=jiaq;
mmoney+=jiaq;
cout<<"一号人机还有:"<<r1money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(by[k]==1)
{
cout<<ly[k]<<"级房屋---->"<<ly[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元"<<endl;
if(r1money>=jiaq)
{
r1money-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
dy[k]*=2;
ly[k]++;
}
}
else
{
cout<<"是否购买此地?(y/n)";
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
by[k]=1;
road[r1i-1][r1j-2]='1';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
if(r1i==44&&r1j!=3&&r1j!=101)
{
int k=(r1j-3)/7;
if(fx[k]==1)
{
road[r1i-1][r1j-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
r1money-=200;
}
if(cf==1)
{
cout<<"一号人机走着走着遇到了小偷,为了保命,他只好给了他300元。"<<endl;
r1money-=300;
}
if(cf==2)
{
cout<<"由于一号人机破坏了公物,罚款800元。"<<endl;
r1money-=800;
}
road[r1i-1][r1j-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=dx[k]/2;
if(bx[k]==2||bx[k]==3)
{
if(bx[k]==2)
{
cout<<"这是二号人机的地,一号人机需要交给他 "<<jiaq<<" 块过路费。"<<endl;
r1money-=jiaq;
r2money+=jiaq;
cout<<"一号人机还有:"<<r1money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(bx[k]==3)
{
cout<<"这是您的地,一号人机需要交给您 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
r1money-=jiaq;
mmoney+=jiaq;
cout<<"一号人机还有:"<<r1money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(bx[k]==1)
{
cout<<lx[k]<<"级房屋---->"<<lx[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元"<<endl;
if(r1money>=jiaq)
{
r1money-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
dx[k]*=2;
lx[k]++;
}
}
else
{
cout<<"是否购买此地?(y/n)";
if(r1money>=jiaq)
{
r1money-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
bx[k]=1;
road[r1i-1][r1j-2]='1';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
if(r1i==2&&r1j!=3&&r1j!=101)
{
int k=(r1j-3)/7;
if(fs[k]==1)
{
road[r1i-1][r1j-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
r1money-=200;
}
if(cf==1)
{
cout<<"一号人机走着走着遇到了小偷,为了保命,他只好给了他300元。"<<endl;
r1money-=300;
}
if(cf==2)
{
cout<<"由于一号人机破坏了公物,罚款800元。"<<endl;
r1money-=800;
}
road[r1i-1][r1j-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=ds[k]/2;
if(bs[k]==2||bs[k]==3)
{
if(bs[k]==2)
{
cout<<"这是二号人机的地,一号人机需要交给他 "<<jiaq<<" 块过路费。"<<endl;
r1money-=jiaq;
r2money+=jiaq;
cout<<"一号人机还有:"<<r1money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(bs[k]==3)
{
cout<<"这是您的地,一号人机需要交给您 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
r1money-=jiaq;
mmoney+=jiaq;
cout<<"一号人机还有:"<<r1money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(bs[k]==1)
{
cout<<ls[k]<<"级房屋---->"<<ls[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元"<<endl;
if(r1money>=jiaq)
{
r1money-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
ds[k]*=2;
ls[k]++;
}
}
else
{
cout<<"是否购买此地?(y/n)";
if(r1money>=jiaq)
{
r1money-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
bs[k]=1;
road[r1i-1][r1j-2]='1';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
srand(time(0));
int step2=rand()%10+1;
cout<<"二号人机走的步数:"<<step2;
Sleep(900);
for(int i=1;i<=step2;i++)
{
system("cls");
road[r2i+1][r2j]=road[r2i+1][r2j+1]='2';
for(int i=0;i<46;i++)
{
for(int j=0;j<184;j++)
{
cout<<road[i][j];
}
cout<<endl;
}
if(r2j==3&&r2i!=2&&r2i!=44)
{
cout<<z[(r2i-2)/3]<<endl;
}
if(r2j==101&&r2i!=2&&r2i!=44)
{
cout<<y[(r2i-2)/3]<<endl;
}
if(r2i==44&&r2j!=3&&r2j!=101)
{
cout<<x[(r2j-3)/7]<<endl;
}
if(r2i==2&&r2j!=3&&r2j!=101)
{
cout<<s[(r2j-3)/7]<<endl;
}
cout<<"1/4/7······:一号人机的房子(数字越高,级别越高)(一号玩家:00)"<<endl;
cout<<"2/5/8······:二号人机的房子(数字越高,级别越高)(二号玩家:11)"<<endl;
cout<<"3/6/9······:玩家(您)的房子(数字越高,级别越高)(玩家(您):22)"<<endl;
cout<<"玩家(您)还有 "<<mmoney<<" 元"<<endl;
cout<<"一号人机还有 "<<r1money<<" 元"<<endl;
cout<<"二号人机还有 "<<r2money<<" 元"<<endl;
road[r2i+1][r2j]=road[r2i+1][r2j+1]='_';
if((r2i==2&&r2j==3)||(r2i==2&&r2j==101)||(r2i==44&&r2j==3)||(r2i==44&&r2j==101))
{
if(r2i==2&&r2j==3)
{
r2j+=7;
}
if(r2i==2&&r2j==101)
{
r2i+=3;
}
if(r2i==44&&r2j==3)
{
r2i-=3;
}
if(r2i==44&&r2j==101)
{
r2j-=7;
}
}
else
{
if(r2i==2)
{
r2j+=7;
}
if(r2i==44)
{
r2j-=7;
}
if(r2j==3&&r2i!=44)
{
r2i-=3;
}
if(r2j==101&&r2i!=2)
{
r2i+=3;
}
}
Sleep(400);
}
system("cls");
road[r2i+1][r2j]=road[r2i+1][r2j+1]='2';
for(int i=0;i<46;i++)
{
for(int j=0;j<184;j++)
{
cout<<road[i][j];
}
cout<<endl;
}
if(r2j==3&&r2i!=2&&r2i!=44)
{
cout<<z[(r2i-2)/3]<<endl;
}
if(r2j==101&&r2i!=2&&r2i!=44)
{
cout<<y[(r2i-2)/3]<<endl;
}
if(r2i==44&&r2j!=3&&r2j!=101)
{
cout<<x[(r2j-3)/7]<<endl;
}
if(r2i==2&&r2j!=3&&r2j!=101)
{
cout<<s[(r2j-3)/7]<<endl;
}
cout<<"1/4/7······:一号人机的房子(数字越高,级别越高)(一号玩家:00)"<<endl;
cout<<"2/5/8······:二号人机的房子(数字越高,级别越高)(二号玩家:11)"<<endl;
cout<<"3/6/9······:玩家(您)的房子(数字越高,级别越高)(玩家(您):22)"<<endl;
cout<<"玩家(您)还有 "<<mmoney<<" 元"<<endl;
cout<<"一号人机还有 "<<r1money<<" 元"<<endl;
cout<<"二号人机还有 "<<r2money<<" 元"<<endl;
if(r2j==3&&r2i!=2&&r2i!=44)
{
int k=(r2i-2)/3;
if(fz[k]==1)
{
road[r2i-1][r2j-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
r2money-=200;
}
if(cf==1)
{
cout<<"二号人机走着走着遇到了小偷,为了保命,他只好给了他300元。"<<endl;
r2money-=300;
}
if(cf==2)
{
cout<<"由于二号人机破坏了公物,罚款800元。"<<endl;
r2money-=800;
}
road[r2i-1][r2j-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=dz[k]/2;
if(bz[k]==1||bz[k]==3)
{
if(bz[k]==1)
{
cout<<"这是一号人机的地,二号人机需要交给他 "<<jiaq<<" 块过路费。"<<endl;
r2money-=jiaq;
r1money+=jiaq;
cout<<"二号人机还有:"<<r2money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(bz[k]==3)
{
cout<<"这是您的地,二号人机需要交给您 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
r2money-=jiaq;
mmoney+=jiaq;
cout<<"二号人机还有:"<<r2money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(bz[k]==2)
{
cout<<lz[k]<<"级房屋---->"<<lz[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元"<<endl;
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
dz[k]*=2;
lz[k]++;
}
}
else
{
cout<<"是否购买此地?(y/n)";
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
bz[k]=2;
road[r2i-1][r2j-2]='2';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
if(r2j==101&&r2i!=2&&r2i!=44)
{
int k=(r2i-2)/3;
if(fy[k]==1)
{
road[r2i-1][r2j-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
r2money-=200;
}
if(cf==1)
{
cout<<"二号人机走着走着遇到了小偷,为了保命,他只好给了他300元。"<<endl;
r2money-=300;
}
if(cf==2)
{
cout<<"由于二号人机破坏了公物,罚款800元。"<<endl;
r2money-=800;
}
road[r2i-1][r2j-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=dy[k]/2;
if(by[k]==1||by[k]==3)
{
if(by[k]==1)
{
cout<<"这是一号人机的地,二号人机需要交给他 "<<jiaq<<" 块过路费。"<<endl;
r2money-=jiaq;
r1money+=jiaq;
cout<<"二号人机还有:"<<r2money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(by[k]==3)
{
cout<<"这是您的地,二号人机需要交给您 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
r2money-=jiaq;
mmoney+=jiaq;
cout<<"二号人机还有:"<<r2money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(by[k]==2)
{
cout<<ly[k]<<"级房屋---->"<<ly[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元"<<endl;
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
dy[k]*=2;
ly[k]++;
}
}
else
{
cout<<"是否购买此地?(y/n)";
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
by[k]=2;
road[r2i-1][r2j-2]='2';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
if(r2i==44&&r2j!=3&&r2j!=101)
{
int k=(r2j-3)/7;
if(fx[k]==1)
{
road[r2i-1][r2j-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
r2money-=200;
}
if(cf==1)
{
cout<<"二号人机走着走着遇到了小偷,为了保命,他只好给了他300元。"<<endl;
r2money-=300;
}
if(cf==2)
{
cout<<"由于二号人机破坏了公物,罚款800元。"<<endl;
r2money-=800;
}
road[r2i-1][r2j-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=dx[k]/2;
if(bx[k]==1||bx[k]==3)
{
if(bx[k]==1)
{
cout<<"这是一号人机的地,二号人机需要交给他 "<<jiaq<<" 块过路费。"<<endl;
r2money-=jiaq;
r1money+=jiaq;
cout<<"二号人机还有:"<<r2money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(bx[k]==3)
{
cout<<"这是您的地,二号人机需要交给您 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
r2money-=jiaq;
mmoney+=jiaq;
cout<<"二号人机还有:"<<r2money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(bx[k]==2)
{
cout<<lx[k]<<"级房屋---->"<<lx[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元"<<endl;
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
dx[k]*=2;
lx[k]++;
}
}
else
{
cout<<"是否购买此地?(y/n)";
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
bx[k]=2;
road[r2i-1][r2j-2]='2';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
if(r2i==2&&r2j!=3&&r2j!=101)
{
int k=(r2j-3)/7;
if(fs[k]==1)
{
road[r2i-1][r2j-2]=='-';
int cf=rand()%3;
if(cf==0)
{
cout<<"交200元罚款!一位警察这样说着···"<<endl;
r2money-=200;
}
if(cf==1)
{
cout<<"二号人机走着走着遇到了小偷,为了保命,他只好给了他300元。"<<endl;
r2money-=300;
}
if(cf==2)
{
cout<<"由于二号人机破坏了公物,罚款800元。"<<endl;
r2money-=800;
}
road[r2i-1][r2j-2]='p';
cout<<"按任意键继续······"<<endl;
To_continue();
}
else
{
int jiaq=ds[k]/2;
if(bs[k]==1||bs[k]==3)
{
if(bs[k]==1)
{
cout<<"这是一号人机的地,二号人机需要交给他 "<<jiaq<<" 块过路费。"<<endl;
r2money-=jiaq;
r1money+=jiaq;
cout<<"二号人机还有:"<<r2money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
if(bs[k]==3)
{
cout<<"这是您的地,二号人机需要交给您 "<<jiaq<<" 块过路费。(自动缴费)"<<endl;
r2money-=jiaq;
mmoney+=jiaq;
cout<<"二号人机还有:"<<r2money<<" 元"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
else
{
if(bs[k]==2)
{
cout<<ls[k]<<"级房屋---->"<<ls[k]+1<<"级房屋"<<endl;
cout<<"花费:"<<jiaq<<"元"<<endl;
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"升级成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
ds[k]*=2;
ls[k]++;
}
}
else
{
cout<<"是否购买此地?(y/n)";
if(r2money>=jiaq)
{
r2money-=jiaq;
cout<<"购买成功!"<<endl;
cout<<"按任意键继续······";
To_continue();
bs[k]=2;
road[r2i-1][r2j-2]='2';
}
else
{
cout<<"您没有足够的钱!"<<endl;
cout<<"按任意键继续······";
To_continue();
}
}
}
}
}
if(mmoney<=0||r1money<=0||r2money<=0)
{
if(mmoney<=0)
{
cout<<"您 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r1money<=0)
{
cout<<"一 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
if(r2money<=0)
{
cout<<"二 号 人 机 没 钱 了 ! 游 戏 结 束 ! G A M E O V E R !!!"<<endl;
}
cout<<"按任意键继续······";
To_continue();
break;
}
}
}
void operation_system()
{
char cho;
cho=getch();
if((cho=='w'||cho=='W')&&initial_choose!=1)
{
initial_choose--;
}
if((cho=='s'||cho=='S')&&initial_choose!=4)
{
initial_choose++;
}
if(cho=='k'||cho=='K')
{
if(initial_choose==1)
{
system("cls");/*
cout<<endl<<endl<<endl<<endl<<endl<<" ";
cout<<"游戏·模式"<<endl<<" ";
cout<<"1、单人模式 2、双人对战 3、三人联机"<<endl<<" ";
string m_choose;
m_choose=getch();
if(m_choose=="1")
{
*/One_Play();
/*}
if(m_choose=="2")
{
}
if(m_choose=="3")
{
}*/
}
if(initial_choose==2)
{
system("cls");
cout<<endl<<endl<<endl<<endl<<endl<<" ";
cout<<"游戏·指南(步骤)"<<endl<<" ";
cout<<"1、选模式(有单人、双人、三人)"<<endl<<" ";
cout<<"2、投掷骰子,点数是多少,就走多少格。"<<endl<<" ";
cout<<"相应位置会有奖惩,会有房子,可以买地,别人经过你这里要收过路费。"<<endl<<" ";
cout<<"游戏进行到一方破产结束。每人初始有5000元";
cout<<endl<<endl<<endl<<"按任意键继续······";
To_continue();
}
if(initial_choose==3)
{
system("cls");
string p_choose;
while(1)
{
system("cls");
cout<<endl<<endl<<endl<<endl<<endl<<" a d键换皮肤 k确定"<<endl<<endl<<endl<<endl;
cout<<" "<<pifu[oo];
p_choose=getch();
if(p_choose=="k")
{
break;
}
if(p_choose=="a")
{
if(oo==0)
{
oo=57;
}
else
{
oo--;
}
}
if(p_choose=="d")
{
if(oo==57)
{
oo=0;
}
else
{
oo++;
}
}
}
}
if(initial_choose==4)
{
system("cls");
cout<<endl<<endl<<endl<<endl<<endl<<" ";
cout<<"拜拜!"<<endl<<" ";
cout<<"制作:Magnolia_tree"<<endl<<endl<<endl<<endl<<endl;
exit(1);
}
}
}
int main()
{
while(1)
{
Print_initial();
operation_system();
system("cls");
}
return 0;
}