#include<stdio.h>
#define Length 3
#define Width 3
int decwin(int length,int width,int a[][Width])
{
int i,j,k;
int count_1=0;
int count_0=0;
int ret=-1;//当没有输赢时候,返回-1,1赢返回1,0赢返回0
for(i=0,j=0;i<length,j<width;i++,j++) //检查对角线
{
if(a[i][j])
{
count_1++;
}
else
{
count_0++
tic-tac-toe游戏(简单判断)
最新推荐文章于 2022-06-01 11:04:07 发布