最近 #include #include #include #include //#include #define CLS system("cls"); #define R 7 #define L 7 #define AMOUNT 6 int ca=0,cb=0; bool end=0; int xlocation=0,ylocation=0,sum=0; char ifstart=0; char a[R][L]={0}; char b[R][L]={0}; char c[R+2][L+2]={0}; struct Block { bool changable; int value; }; struct Block aa[R][L]; void initial(); void game(); void choose(); int ifsure(int x); void ifbreakend(); void ifwinend(); void printsituation();//debug函数 void printwhole();//打印棋盘 int main() { initial(); choose(); } void choose() { printf("是否开始游戏\n1-开始\n2-退出\n"); scanf("%d",&ifstart); switch(ifstart) { case 1 : printf("开始游戏\n"); getchar(); CLS game(); break; case 2 : printf("成功退出\n"); CLS break; default : break; } } void game() { initial(); int ifx=0,ify=0; int i=0,j=0,leix=0,leiy=0,leia=0; bool jd=0,jx=1; printf("\n"); while (1) { if(jx) { for(;iR) { printf("位置不合法,请重新选择!\n"); return 1; } else return 0; } void ifbreakend() { int i1=0,j1=0; bool r1=0,r2=0; for(;i1