#include"iostream.h"
#include"chess.h"
#include"rule.h"
#include"result.h"
void main(){
char ch;
chess ch1('x');
chess ch2('o');
while(ch!='N'){
initboard();
qipan();
int k=1;
while(1){
ch1.xiaqi();//'x'方先下
qipan();
if(ch1.judge()){
ch1.Wins();
ch2.Loses();
break;
}
if(k==5){//'x'方下了5次还未赢棋,即平局
ch1.Draws();
break;
}
ch2.xiaqi();//'o'后下
qipan();
if(ch2.judge()){
ch2.Wins();
ch1.Loses();
break;
}
k++;
}
ch1.show();
ch2.show();
cout<>ch;
}
}
1