# include <iostream>
# include <string>
using namespace std;
int main()
{
begin:
int k=0,sum=0,count=0;
char m,q,Y=''Y'',y=''y'';
char b={''q'',''w'',''e'',''a'',''s'',''d'',''z'',''x'',''c''};
int i,j,s,t,c={8,8,8,8,8,8,8,8,8};
string a={"□","□","□","□","□","□","□","□","□"};
reput:
cout<<"*****井字游戏*****"<<endl; //输出说明信息。
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
cout<<a[i][j];
cout<<endl;
}
cout<<"请用"<<endl;
cout<<"qwe"<<endl;
cout<<"asd"<<endl;
cout<<"zxc"<<endl;
cout<<"请选择下棋位置"<<endl;
cout<<"r:重新开始游戏"<<endl;
start: //跳转的起始位置。
count++;
if(count==10)
goto over;
switch(k)
{
case 0: cout<<"轮到1号选手下棋:";break; //输出该谁下棋。
case 1: cout<<"轮到2号选手下棋:";break;
}
cin>>m; //选手选择下棋的位置。
for(i=0;i<3;i++)
for(j=0;j<3;j++)
if(b[i][j]==m)
{
s=i;
t=j;
}
for(i=0;i<3;i++)
for(j=0;j<3;j++)
{
if(c[s][t]==8)
goto asd ;
else
{
system ("cls");
cout<<"输入错误,请从新输入:"<<endl;
&nbs