源代码:#include#include#include/*-------------------------------------棋盘的定义---------------------------------------------*/intDirX[]={2,1,-1,-2,-2,-1,1,2};//数组依次记录八个可走方向的横坐标intDirY[]={1,2,2,1,-1,-2,-2,-1};