本游戏比较低级,可以不举报我吗?
更新日志
12.13
发帖了!
#include<iostream>
#include<windows.h>
using namespace std;
int a[3]={0,1,1};
int b[5]={0,0,0,1,1};
int c,d;
char e,f;
bool t=false;
void out();
int main()
{
cout<<"这个游戏献给洛谷!"<<endl;
Sleep(400);
cout<<"下面将转换成英文。"<<endl;
Sleep(400);
cout<<"规则:七进制!打错了,会报错并自动让下一个数"<<endl;
cout<<"write like'1-.3',ok?"<<endl;
Sleep(400);
cout<<"write A1 A2 B3 B4"<<endl;
cout<<" ";
out();
int y=0,w=0;
int r=0;
while(y!=2&&w!=2)
{
cin>>c>>e>>f>>d;
if(t==false)
{
if(e!='-'||f!='.'||(c!=1&&c!=2)||(d!=3&&d!=4))
{
cout<<"You are wrong A!"<<endl;
}
else
{
r=a[c]+b[d];
if(r==a[c]) cout<<"You are wrong A!"<<endl;
if(r==7){
r=0;
y++;
}
if(r>7) r%=7;
a[c]=r;
cout<<" ";
out();
}
t=true;
}
else
{
if(e!='-'||f!='.'||(c!=3&&c!=4)||(d!=1&&d!=2))
{
cout<<"You are wrong B!"<<endl;
}
else
{
r=b[c]+a[d];
if(r==b[c]) cout<<"You are wrong B!"<<endl;
if(r==7){
r=0;
w++;
}
if(r>7) r%=7;
b[c]=r;
cout<<" ";
out();
}
t=false;
}
continue;
}
if(y==2) cout<<"A win!";
else cout<<"B win!";
return 0;
}
void out()
{
cout<<" ";
cout<<a[1]<<" ";
Sleep(400);
cout<<a[2]<<" ";
Sleep(400);
cout<<b[3]<<" ";
Sleep(400);
cout<<b[4]<<endl;
}