可编辑
board[0][2]=BLACK_XIANG;
board[0][3]=BLACK_SHI;
board[0][4]=BLACK_JIANG;
board[0][5]=BLACK_SHI;
board[0][6]=BLACK_XIANG;
board[0][7]=BLACK_MA;
board[0][8]=BLACK_JU;
board[2][1]=BLACK_PAO;
board[2][7]=BLACK_PAO;
board[3][0]=BLACK_BIN;
board[3][2]=BLACK_BIN;
board[3][4]=BLACK_BIN;
board[3][6]=BLACK_BIN;
board[3][8]=BLACK_BIN;
board[9][0]=RED_JU;
board[9][1]=RED_MA;
board[9][2]=RED_XIANG;
board[9][3]=RED_SHI;
board[9][4]=RED_JIANG;
board[9][5]=RED_SHI;
board[9][6]=RED_XIANG;
board[9][7]=RED_MA;
board[9][8]=RED_JU;
board[7][1]=RED_PAO;
board[7][7]=RED_PAO;
board[6][0]=RED_BIN;
board[6][2]=RED_BIN;
board[6][4]=RED_BIN;
board[6][6]=RED_BIN;
board[6][8]=RED_BIN;
}
initdrawchess()
{
int i,j;;
for(i=0;i<10;i++)
for(j=0;j<9;j++)
{
if(board[i][j])
drawbmp(position[i][j].x,position[i][j].y,chessfile[board[i][j]]);
}
}
drawcursor(struct pos p)
.