* *
if(x<5) return 0; if(x!=oldx&&y!=oldy) {
if((x-oldx)==2&&(y-oldy)==2) {i=oldx+1;j=oldy+1;}
else if((x-oldx)==2&&(oldy-y)==2) {i=oldx+1;j=oldy-1;}
else if((oldx-x)==2&&(y-oldy)==2) {i=oldx-1;j=oldy+1;}
else if((oldx-x)==2&&(oldy-y)==2) {i=oldx-1;j=oldy-1;} else return 0;
if(board[i][j]!=0) return 0; }
else return 0; break; } return 1; }
中国象棋源代码-C语言知识学习小程序
**if(x<5)return0;if(x!=oldx&&y!=oldy){if((x-oldx)==2&&(y-oldy)==2){i=oldx+1;j=oldy+1;}elseif((x-oldx)==2&&(oldy-y)==2){i=oldx+1;j=oldy-1;}elseif((oldx-x)==
推荐度:
点击下载文档文档为doc格式