#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define REP(i,a,b) for (int i=(a);i<=(b);i++)
#define PER(i,a,b) for (int i=(a);i>=(b);i--)
#define max(x,y) ((x)<(y)?(y):(x))
#define min(y,x) ((x)<(y)?(x):(y))
#define MEM(a,b) memset(a,(b),sizeof(a))
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)//判断这个键是否按下
#define KEY_UP(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 0 : 1)//判断这个键是否弹起
#define KEY_EVERY(lpkeyState) GetKeyboardState(lpKeyState)//获得所有的256个键(键盘按键、鼠标按键等等)的状态,lpKeyState是指向一个256bit的数组,存放所有键的状态。
#define KEY_NOW(nVirtKey) GetKeyState(nVirtKey)//用于判断nVirtKey的状态。用返回值的最高位表示,最高位为1表示当前键处于down的状态;最高位为0当前键处于up状态。此函数从消息队列中读取消息进行处理。
#define setcolor(x) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),x)//设置颜色
#define getkey(x) GetAsyncKeyState(x)
#define GetWindow() GetForegroundWindow();//得到窗口信息
#define Nor if(B[b].x<5) B[b].x=5;
#define Out1 Bx1-Bvx1<=6||Bx1-Bvx1>=28||By1-Bvy1<=7||By1-Bvy1>=27
#define Out2 Bx2-Bvx2<=6||Bx2-Bvx2>=28||By2-Bvy2<=7||By2-Bvy2>=27
#define Chang1 {Bwhat1=0;Bvx1=Bvy1=0;memset(Bgo1,0,sizeof(Bgo1));}
#define Chang2 {Bwhat2=0;Bvx2=Bvy2=0;memset(Bgo2,0,sizeof(Bgo2));}
#define Chang3 {Bwhat3=0;Bvx3=Bvy3=0;memset(Bgo3,0,sizeof(Bgo3));}
#define MAXIMUS 15 //定义棋盘大小
int cs[8],dh[8],b[15],i[10],dg[8],bf[4],hh[10],j[9],ys1[20],ys2[20],zbcc[20],zbsx[20],yszb[20],drcf[8],cfzb[20],lb[20];
int daojvsx[11],daojvcc[11],cfdaojv[11],daojvlb[2];
using namespace std;
int brand();
void GOTO(int x,int y);
int brand(){return (rand()<<16)|(rand()<<1)|(rand()&1);}
void bsrand(){srand(GetTickCount());}
void cls(){system("cls");}
void retr(){//退出程序
system("cls");
return;
}
void Window_Hide(HWND hWnd){ShowWindow(hWnd,0);}//隐藏窗口
void Window_Show(HWND hWnd){ShowWindow(hWnd,1);}//显示窗口
int getmouse_y(){//获取鼠标在屏幕中x的位置
POINT pt;
GetCursorPos(&pt);
return pt.x;
}
int getmouse_x(){//获取鼠标在屏幕中y的位置
POINT pt;
GetCursorPos(&pt);
return pt.y;
}
void setmouse(int y,int x){SetCursorPos(x,y);}//设置鼠标在屏幕中的位置
void click_left(){//鼠标左键点击
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(5);//要留给某些应用的反应时间
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
}
void click_right(){//鼠标右键点击
mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);
Sleep(5);
mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
}
void GOTO(int x,int y){//将光标移动到屏幕中的位置
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
HANDLE hConsoleOut;
hConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(hConsoleOut,&csbiInfo);
csbiInfo.dwCursorPosition.Y = x;
csbiInfo.dwCursorPosition.X = y;
SetConsoleCursorPosition(hConsoleOut,csbiInfo.dwCursorPosition);
}
const int flg[4][2]={{1,0},{0,2},{0,-2},{-1,0}};
int n=28,m=76,tim;
struct xcw{int x,y;}ty[5][1000005],foodd[2];
int tot[5],f[5],score,food,ground=0,ms,ans_len=1e9;
bool vis[1005][1005];
void ret();
void result();
bool check();
void fnd();
void rand_food();
void draw();
int choose();
void stop();
int mods();
int ads();
int get_food();
int other();
void machine();
int change();
int main();
void Ending(){
printf("E键退出,R键重来\n");
char ch=getch();
while(ch!='E'&&ch!='e'&&ch!='R'&&ch!='r') ch=getch();
if(ch=='E'||ch=='e') return;
else{main();exit(0);}
}
void result(int t){
setcolor(7+ground);cls();
if(ms==2){
if(t==0) printf("Win!!!");else
printf("Lose...\n");
printf("机器人:%d\n你:%d\n",tot[2],tot[0]);
}else
if(ms==3) if(t==1) printf("White Lose\n");else printf("White win\n");else
if(ms==5) if(t==1) printf("Player 2 win\n");else printf("Player 1 win\n");
Ending();
}
bool check(int x,int y){
if(x<1||x>n||y<2||y>m) return 0;
bool t=1;
if(ms!=3)
for(int i=1;i<=tot[0];i++)
if(x==ty[0][i].x&&y==ty[0][i].y){t=0;break;}
if(ms==1||ms==4||ms==5)
for(int i=1;i<=tot[1];i++)
if(x==ty[1][i].x&&y==ty[1][i].y){t=0;break;}
if(ms==2||ms==3)
for(int i=1;i<=tot[2];i++)
if(x==ty[2][i].x&&y==ty[2][i].y){t=0;break;}
if(ms==3)
for(int i=1;i<=tot[3];i++)
if(x==ty[3][i].x&&y==ty[3][i].y){t=0;break;}
return t;
}
void fnd(int t,int x,int y){
if(check(x,y)) return;
setcolor(7+ground);cls();
if(ms==3) if(t==3) printf("White lose\n");else printf("White win\n");else
if(ms==4||ms==5) if(t==1) printf("Player 1 win\n");else printf("Player 2 win\n");
else{
if(t==2) printf("Win!!!\n");else printf("Lose...\n");
printf("分数:%d\n",score);score=0;
}
Ending();
}
void rand_food(){
if(!vis[foodd[0].x][foodd[0].y]){
setcolor(12+ground);
int x=brand()%(n+1),y=(brand()%m/2)*2;
while(!check(x,y)) x=brand()%(n+1),y=(brand()%m/2)*2;
GOTO(x,y);printf("▇");
if(!vis[x][y]) food++;vis[x][y]=1;foodd[0]=(xcw){x,y};
}
if(!vis[foodd[1].x][foodd[1].y]){
setcolor(12+ground);
int x=brand()%(n+1),y=(brand()%m/2)*2;
while(!check(x,y)) x=brand()%(n+1),y=(brand()%m/2)*2;
GOTO(x,y);printf("▇");
food++;vis[x][y]=1;foodd[1]=(xcw){x,y};
}
}
void draw(){
setcolor(14+ground);
for(int i=0;i<=n+1;i++) GOTO(i,m+2),printf("▇"),GOTO(i,0),printf("▇");
for(int i=1;i<=m/2+1;i++) GOTO(n+1,i*2),printf("▇"),GOTO(0,i*2),printf("▇");
}
int choose(){
printf("0.退出\n");
printf("1.单人模式\n");
printf("2.双人模式\n");
printf("3.人机对抗(谁先吃20个)\n");
printf("4.机机对抗(谁先吃20个)\n");
printf("5.对抗模式\n");
printf("6.对抗模式(谁先吃20个)\n");
printf("快捷键:\n");
printf("P:暂停\n");
printf("E:退出\n");
char ch=getch();
while(ch<'0'||ch>'6') ch=getch();
if(ch=='0') return 48;else
if(ch=='1') ms=0;else
if(ch=='2') ms=1;else
if(ch=='3') ms=2;else
if(ch=='4') ms=3;else
if(ch=='5') ms=4;else
if(ch=='6') ms=5;
}
void stop(){
char ch=getch();
while(ch!='P'&&ch!='p') ch=getch();
}
int mods(){
setcolor(10+ground);
if(ms!=3){
ty[0][1]=(xcw){1,6};ty[0][2]=(xcw){1,4};ty[0][tot[0]=3]=(xcw){1,2};f[0]=1;
for(int i=1;i<=tot[0];i++) GOTO(ty[0][i].x,ty[0][i].y),printf("▇");
}
if(ms==1||ms==4||ms==5){
setcolor(7+ground);
ty[1][1]=(xcw){n,m-6};ty[1][2]=(xcw){n,m-4};ty[1][tot[1]=3]=(xcw){n,m-2};f[1]=2;
for(int i=1;i<=tot[1];i++) GOTO(ty[1][i].x,ty[1][i].y),printf("▇");
}
if(ms==2||ms==3){
setcolor(15+ground);
ty[2][1]=(xcw){n,m-6};ty[2][2]=(xcw){n,m-4};ty[2][tot[2]=3]=(xcw){n,m-2};f[2]=2;
for(int i=1;i<=tot[2];i++) GOTO(ty[2][i].x,ty[2][i].y),printf("▇");
}
if(ms==3){
setcolor(13+ground);
ty[3][1]=(xcw){1,6};ty[3][2]=(xcw){1,4};ty[3][tot[3]=3]=(xcw){1,2};f[3]=1;
for(int i=1;i<=tot[3];i++) GOTO(ty[3][i].x,ty[3][i].y),printf("▇");
}
}
int ads(int x){return x<0?-x:x;}
int get_food(int x,int y,xcw z){return ads(x-z.x)+ads(y-z.y);}
int other(int x){
if(x==0) return 3;else
if(x==1) return 2;else
if(x==2) return 1;else
return 0;
}
void machine(int t,int x,int y){
bool tt=0;int foodid,minn=1e9,newf=f[t];
if(get_food(x,y,foodd[0])<=get_food(x,y,foodd[1])&&vis[foodd[0].x][foodd[0].y]||!vis[foodd[1].x][foodd[1].y]) foodid=0;else foodid=1;
for(int i=0;i<4;i++)
if(f[t]^other(i)){
if(check(x+flg[i][0],y+flg[i][1])){
int now=get_food(x+flg[i][0],y+flg[i][1],foodd[foodid]);
if(now if(!tt) newf=i; } } f[t]=newf; } int change(int t){ if(t==0) setcolor(10+ground);else if(t==1) setcolor(7+ground);else if(t==2) setcolor(15+ground);else if(t==3) setcolor(13+ground); int x=ty[t][1].x,y=ty[t][1].y; if(t==2||t==3) machine(t,x,y); x+=flg[f[t]][0],y+=flg[f[t]][1]; for(int i=tot[t];i;i--) ty[t][i+1]=ty[t][i]; GOTO(ty[t][tot[t]+1].x,ty[t][tot[t]+1].y); printf(" "); if(vis[x][y]){ vis[x][y]=0,score+=(t==0||t==1),food--; if(++tot[t]>=23&&(ms==3||ms==5)) result(t); GOTO(ty[t][tot[t]].x,ty[t][tot[t]].y),printf("▇"); } fnd(t,x,y); ty[t][1]=(xcw){x,y}; GOTO(ty[t][1].x,ty[t][1].y); printf("▇"); } int tanchi(){ bsrand();score=0; system("title "); system("mode con cols=80 lines=31"); if(choose()==48) { system("cls"); return 0; } cls(); printf("设置速度(毫秒/格)(建议100):"); cin>>tim; MEM(vis,0);food=0;MEM(ty,0); cls();draw();mods(); while(1){ while(!kbhit()){ Sleep(tim); rand_food(); if(ms!=3) change(0); rand_food(); if(ms==1||ms==4||ms==5) change(1);else if(ms==2) change(2);else if(ms==3) change(2),change(3); } char ch=getch(); bool t=0; if(ch=='E'||ch=='e') return 0;else if(ch=='P'||ch=='p') stop();else if(ms==0||ms==2){ if(ch==-32) ch=getch(),t=1; if((ch==75&&t||ch=='A'||ch=='a')&&f[0]^1) f[0]=2;else if((ch==77&&t||ch=='D'||ch=='d')&&f[0]^2) f[0]=1;else if((ch==80&&t||ch=='S'||ch=='s')&&f[0]^3) f[0]=0;else if((ch==72&&t||ch=='W'||ch=='w')&&f[0]^0) f[0]=3; }else if(ms==1||ms==4||ms==5){ if((ch=='W'||ch=='w')&&f[0]^0) f[0]=3;else if((ch=='A'||ch=='a')&&f[0]^1) f[0]=2;else if((ch=='D'||ch=='d')&&f[0]^2) f[0]=1;else if((ch=='S'||ch=='s')&&f[0]^3) f[0]=0; if(ch==-32) ch=getch(),t=1; if(ch==72&&t&&f[1]^0) f[1]=3;else if(ch==75&&t&&f[1]^1) f[1]=2;else if(ch==77&&t&&f[1]^2) f[1]=1;else if(ch==80&&t&&f[1]^3) f[1]=0; } } system("cls"); return 0; } int mbg() { for( ;1; ) { int a,b,c,d=9,e,f,g,h,i,j,k,l,m,n,s=0; cout<<" --------狒狒大战2.15--------"< cout<<"欢迎来到狒狒大战2.15!\n"; cout<<"请选择狒狒(如不知规则则摁10)"< cout<<"1.年轻人\n"; cout<<"2.卢本伟\n"; cout<<"3.迪迦/盖亚\n"; cout<<"4.狒狒\n"; cout<<"5.SB\n"; cout<<"6.马保国(别摁!)\n"; cout<<"7.GAY\n"; cout<<"8.老狒狒\n"; cout<<"9.退出游戏\n"; cout<<"10.关于游戏\n"<<"==========================================\n"; gamestart:cin>>a; if(a==1) do { cout<<"发现马保国!"< cout<<"1.攻击或搞事情!"< cout<<"2.走过去"< cin>>b; if(b==1) { m=3; cout<<"1.蹭右眼\n"; cout<<"2.不讲武德\n"; cout<<"3.踢隐私部位\n"; cout<<"4.太极神功(盗版)\n"; cout<<"5.耍赖\n"; cout<<"6.迪迦!!!!!\n"; cout<<"7.装逼\n"; cout<<"8.溜\n"; cin>>e; if(e==1) { cout<<"你打肿了马老师的右眼"< d=d+1; s++; } if(e==2) { cout<<"马老师说你不讲武德,并把你的鼻子蹭了一下\n"; d=d-1; } if(e==3) { cout<<"你踢了一下马老师的隐私部位\n"; d=d+1; s+=5; } if(e==4) { cout<<"你使用了太极神功(盗版)\n"; d=d+1; s+=3; } if(e==5) { cout<<"马老师摸了摸你的头,笑了笑\n"; d=d-2; s+=1; } if(e==6) { cout<<"你变成了迪迦\n"; d=d+15; s+=3; } if(e==7) { cout<<"你在马老师面前装逼\n"; d=d+10; s+=4; } if(e==8) { cout<<"马老师不让你溜\n"; d=d-2; } if(s>=11) { cout<<" win"< cout<<" w n"< cout<<" w n"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" inwinwinwinwi"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<" inwinwinwinwi"< return 0; } } if(b==2) { cout<<"不讲武德!"< } } while(d!=0); if(a==2) do { cout<<"发现马保国!"< cout<<"1.攻击或搞事情!"< cout<<"2.走过去"< cin>>b; if(b==1) { m=3; cout<<"1.蹭右眼\n"; cout<<"2.不讲武德\n"; cout<<"3.踢隐私部位\n"; cout<<"4.太极神功(盗版)\n"; cout<<"5.耍赖\n"; cout<<"6.卢本伟牛逼\n"; cout<<"7.鄙视光线\n"; cout<<"8.溜\n"; cin>>e; if(e==1) { cout<<"你打肿了马老师的右眼"< d=d+1; s++; } if(e==2) { cout<<"马老师说你不讲武德,并把你的鼻子蹭了一下\n"; d=d-1; } if(e==3) { cout<<"你踢了一下马老师的隐私部位\n"; d=d+1; s+=7; } if(e==4) { cout<<"你使用了太极神功(盗版)\n"; d=d+1; s+=3; } if(e==5) { cout<<"马老师摸了摸你的头,笑了笑\n"; d=d-2; s+=1; } if(e==6) { cout<<"你使用了卢本伟牛逼\n"; d=d+3; s+=3; } if(e==7) { cout<<"你使用了鄙视光线\n"; d=d+3; s+=5; } if(e==8) { cout<<"马老师不让你溜\n"; d=d-2; } if(s>=15) { cout<<" win"< cout<<" w n"< cout<<" w n"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" inwinwinwinwi"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<" inwinwinwinwi"< return 0; } } if(b==2) { cout<<"不讲武德!"< } } while(d!=0); if(a==3) do { cout<<"发现马保国!"< cout<<"1.攻击或搞事情!"< cout<<"2.走过去"< cin>>b; if(b==1) { m=3; cout<<"1.切割光轮\n"; cout<<"2.不讲武德\n"; cout<<"3.踢隐私部位\n"; cout<<"4.光线神功(盗版)\n"; cout<<"5.耍赖\n"; cout<<"6.鄙视光线\n"; cout<<"7.溜\n"; cin>>e; if(e==1) { cout<<"你使用了切割光轮"< d=d+3; s+=5; } if(e==2) { cout<<"马老师说你不讲武德,并把你的鼻子蹭了一下\n"; d=d-1; } if(e==3) { cout<<"你踢了一下马老师的隐私部位\n"; d=d+1; s+=7; } if(e==4) { cout<<"你使用了激光神功(盗版)\n"; d=d+1; s+=3; } if(e==5) { cout<<"马老师摸了摸你的头,笑了笑\n"; d=d-2; s+=1; } if(e==6) { cout<<"你使用了鄙视光线\n"; d=d+3; s+=5; } if(e==7) { cout<<"马老师不让你溜\n"; d=d-2; } if(s>=15) { cout<<" win"< cout<<" w n"< cout<<" w n"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" inwinwinwinwi"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<" inwinwinwinwi"< return 0; } } if(b==2) { cout<<"不讲武德!"< } } while(d!=0); if(a==4) do { cout<<"发现马保国!"< cout<<"1.攻击或搞事情!"< cout<<"2.走过去"< cin>>b; if(b==1) { m=3; cout<<"1.狒狒光轮\n"; cout<<"2.不讲武德\n"; cout<<"3.踢隐私部位\n"; cout<<"4.狒狒神功(盗版)\n"; cout<<"5.耍赖\n"; cout<<"6.狒狒光线\n"; cout<<"7.狒狒拉稀\n"; cout<<"8.溜\n"; cin>>e; if(e==1) { cout<<"你使用了狒狒光轮"< d=d+2; s+=3; } if(e==2) { cout<<"马老师说你不讲武德,并把你的鼻子蹭了一下\n"; d=d-2; } if(e==3) { cout<<"你踢了一下马老师的隐私部位\n"; d=d+2; s+=8; } if(e==4) { cout<<"你使用了狒狒神功(盗版)\n"; d=d+3; s+=4; } if(e==5) { cout<<"马老师摸了摸你的头,笑了笑\n"; d=d-2; s+=1; } if(e==6) { cout<<"你使用了狒狒光线\n"; d=d+3; s+=5; } if(e==7) { cout<<"你使用了狒狒拉稀\n"; d=d+1; s+=7; } if(e==8) { cout<<"马老师不让你溜\n"; d=d-2; } if(s>=18) { cout<<" win"< cout<<" w n"< cout<<" w n"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" inwinwinwinwi"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<" inwinwinwinwi"< return 0; } } if(b==2) { cout<<"不讲武德!"< } } while(d!=0); if(a==5) do { cout<<"发现马保国!"< cout<<"1.攻击或搞事情!"< cout<<"2.走过去"< cin>>b; if(b==1) { m=3; cout<<"1.SB激光\n"; cout<<"2.不讲武德\n"; cout<<"3.踢隐私部位\n"; cout<<"4.SB神功(盗版)\n"; cout<<"5.耍赖\n"; cout<<"6.变傻光线\n"; cout<<"7.叫爸爸!\n"; cout<<"8.溜\n"; cin>>e; if(e==1) { cout<<"你使用了SB激光"< d=d+4; s+=2; } if(e==2) { cout<<"马老师说你不讲武德,并把你的鼻子蹭了一下\n"; d=d-2; } if(e==3) { cout<<"你踢了一下马老师的隐私部位\n"; d=d+3; s+=8; } if(e==4) { cout<<"你使用了SB神功(盗版)\n"; d=d+1; s+=4; } if(e==5) { cout<<"马老师摸了摸你的头,笑了笑\n"; d=d-2; s--; } if(e==6) { cout<<"你使用了变傻光线\n"; d=d+5; s+=6; } if(e==7) { cout<<"你叫了马保国一声爸爸\n"; d=d-3; s+=3; } if(e==8) { cout<<"马老师不让你溜\n"; d=d-2; } if(s>=20) { cout<<" win"< cout<<" w n"< cout<<" w n"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" win"< cout<<" inwinwinwinwi"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<"winwinwinwinwin"< cout<<" inwinwinwinwi"< return 0; } } if(b==2) { cout<<"不讲武德!"< } } while(d!=0); if(a==6) do { cout<<"1.用闪电五连鞭!"< cout<<"2.打他鼻梁骨"< cout<<"3.太极神功(盗版)\n"; cout<<"4.盖亚!!!!!\n"; cout<<"5.斥责年轻人不讲武德\n"; cout<<"6.闪电十连鞭\n"; cin>>j; if(j==1)cout<<"一鞭,两鞭,三鞭,四鞭,五鞭!"< { cout<<" os\n"; cout<<" l e\n"; cout<<" l e\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" eloseloseloselos\n"; cout<<" loseloseloseloselo\n"; cout<<"eloseloseloseloselos\n"; cout<<"eloseloseloseloselos\n"; cout<<"eloseloseloseloselos\n"; cout<<"eloseloseloseloselos\n"; cout<<" loseloseloseloselo\n"; cout<<"=======================================\n"; for(int i=1;i<=1000;i++) cout<<"lose lose 哈哈! "; return 0; } if(j==2) cout<<"中国功夫,讲究点到为止,于是你笑了一下,准备收拳,谁知这个年轻人他不讲武德,偏来偷袭我69岁的老年人,你劝年轻人耗子尾汁适可而止好好反思。"< { cout<<" os\n"; cout<<" l e\n"; cout<<" l e\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" lose\n"; cout<<" eloseloseloselos\n"; cout<<" loseloseloseloselo\n"; cout<<"eloseloseloseloselos\n"; cout<<"eloseloseloseloselos\n"; cout<<"eloseloseloseloselos\n"; cout<<"eloseloseloseloselos\n"; cout<<" loseloseloseloselo\n"; cout<<"=======================================\n"; for(int i=1;i<=1000;i++) cout<<"lose lose 哈哈! "; return 0; } if(j==3) cout<<"你使用了太极神功(盗版)"< { d=d+3; s+=5; } if(j==4) cout<<"你变身成了盖亚"< { d=d+12; s+=2; } if(j==5) cout<<"你骂年轻人不讲武德"< { d=d+5; s+=2; } if(j==6) cout<<"你使用了闪电十连鞭"< { d=d+2; s+=7; } } while(d<=0||s>=4); if(a==7) do { cout<<"发现马保国!"< cout<<"1.攻击或搞事情!"< cout<<"2.走过去"< cin>>b; if(b==1) { m=3; cout<<"1.GAY之光轮\n"; cout<<"2.不讲武德\n"; cout<<"3.踢隐私部位\n"; cout<<"4.GAY神功(盗版)\n"; cout<<"5.耍赖\n"; cout<<"6.鄙视光线\n"; cout<<"7.奥利给!\n"; cout<<"8.溜\n"; cin>>e; if(e==1) { cout<<"你使用了GAY之光轮"< d=d+4; s+=3; } if(e==2) { cout<<"马老师说你不讲武德,并把你的鼻子蹭了一下\n"; d=d-3; } if(e==3) { cout<<"你踢了一下马老师的隐私部位\n"; d=d+16; s+=12; } if(e==4) { cout<<"你使用了GAY神功(盗版)\n"; d=d+3; s+=4; } if(e==5) { cout<<"马老师摸了摸你的头,笑了笑\n"; d=d-3; s+=2; } if(e==6) { cout<<"你使用了鄙视光线\n"; d=d+3; s+=5; } if(e==7) { cout<<"奥利给!\n"; d=d+30; s+=1; } if(e==8) { cout<<"马老师不让你溜\n"; d=d-2; } if(s>=19) { cout<<" win"< cout<<" w n"< cout<<" w n"<