#include<iostream>
using namespace std;
class five
{
int x,y,m,n,num_xy,num_mn;
char qipan[20][20]; //定义20行20列的数组
public:
five(int X = 0,int Y =0,int M = 0,int N = 0,int Num_xy = 0,int Num_mn = 0) //构造函数初始化
{ x = X;
y = Y;
m = M;
n = N;
num_xy = Num_xy;
num_mn = Num_mn;
for(int i = 0 ; i < 20 ; i ++) //输出20行20列的棋盘界面
{ for(int j = 0 ;j < 20 ; j ++) qipan[i][j] = '.'; }
}
void getpointxy(); //白棋出子及计数
void getpointmn(); //黑棋出子及计数
void showqipan(); //实现20行20列正方形界面输出
void print(); //输出下一棋盘界面
bool IsxyWin(); //白棋获胜
bool IsmnWin(); //黑棋获胜
void menu();//显示开始菜单界面
};
void five::getpointxy() //判断白棋出子情况及对其计数
{ std::cout<<"请分别输入第"<<num_xy+1<<"步白棋○的横坐标和纵坐标:";
std::cin >> y >> x;
if (!(1<=x&&x<=20&&1<=y&&y<=20))
{ std::cout << "输入错误,请重新输入:"<<endl ;
getpointxy();
}
else if(qipan[y-1][x-1] != '.' )
{ std::cout << "请所下的位置已经有棋子,请重新输入:" <<endl;
getpointxy();
}
else if(num_xy+num_mn >= 400)
{ std::cout << "棋盘已满,平局!" << endl;
exit(0);
}
else
{ qipan[y-1][x-1] = 'O';
num_xy++;
}
}
void five::getpointmn() //判断黑棋出子情况及对其计数
{ std::cout<<"请分别输入第"<<num_mn+1<<"步黑棋●的横坐标和纵坐标:";
std::cin >> n >> m;
if (!(1<=m&&m<=20&&1<=n&&n<=20))
{ std::cout << "输入错误,请重新输入:"<<endl ;
getpointmn();
}
else if(qipan[n-1][m-1]!='.')
{ std::cout << "请所下的位置已