#include <stdio.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
struct ij //作者:唐鑫 2012年7月4日
{ //请尊重劳动 此处勿作修改
int i;
int j;
struct ij *next;
};
struct ij *thead;
/******************************游戏界面***********************************/
void desktop()
{
int i;
for(i=0; i<9; i++)
{
printf(" | | | | | | | | |\n");
printf("___|___|___|___|___|___|___|___|___|\n");
}
}
/******************************游戏规则*******************************/
int ninesqure(int a[10][10],int i,int j,int num)
{
int bi,ei;
int bj,ej;
int x,y;
if(0<=i&&2>=i && 0<=j&&2>=j)//1
{
bi=0;ei=2; bj=0;ej=2;
}
else if(0<=i&&2>=i && 3<=j&&5>=j)//2
{
bi=0;ei=2; bj=3;ej=5;
} //
else if(0<=i&&2>=i && 6<=j&&8>=j)//3 //
{ //
bi=0;ei=2; bj=6;ej=8; //
} //
else if(3<=i&&5>=i && 0<=j&&2>=j)//4 //
{ //
bi=3;ei=5; bj=0;ej=2; //
} //
else if(3<=i&&5>=i && 3<=j&&5>=j)//5 用while写虽代码短但不好理解
{ //
bi=3;ei=5; bj=3;ej=5;