int x; int y; } _POINT;
typedef struct qixing{ // 棋形信息 char qx[8]; // 棋形 int value; // 相应的权值 }QIXING;
HANDLE hOutput=GetStdHandle(STD_OUTPUT_HANDLE); // 得到标准输出的句柄 _POINT cursor; // 游戏中,光标所在的当前位置
int direction[8][2]={{0,-1},{0,1},{-1,0},{1,0},{-1,-1},{1,1},{-1,1},{1,-1}}; // 向量数组,依次为左、右、上、下、左上、右下、右上、左下
QIXING qx1[qx1_num]={{"x1111",200000},{"1x111",200000}, {"11x11",200000}, // 连五型
{"0x1110",6000},{"01x110",6000},{"101x101",6000}, // 活四型 {"0x111",1100},{"x0111",1100},{"0x1011",1100},{"0x1101",1100}, {"01x11",1100}, // 冲四型
{"011x1",1100},{"1x011",1100},{"10x11",1100},{"11x01",1100}, {"1x101",1100}, // 冲四型
{"x011102",250},{"0x110",250},{"01x10",250},{"0x01102",240}, {"0x101",240}, // 活三型 {"0x112",20},{"01x12",10},{"011x2",20},{"1x12",10}, {"0x10",20},{"0x010",5}}; // 死三活二
//防御的基本棋形及权值,0为空,1为对手,2为自己,x为下棋位置
QIXING qx2[qx2_num]={{"x1111",2000000},{"1x111",2000000}, {"11x11",2000000}, // 连五型
{"0x1110",24000},{"01x110",24000}, {"101x101",24000}, //活四型 {"0x111",2000},{"x0111",1900},{"0x1011",1900},{"0x1101",2000}, {"01x11",2000}, // 冲四型
{"011x1",2000},{"1x011",1900},{"10x11",2000},{"1x101",2000}, {"x01112",2000}, // 冲四型
{"0x110",850},{"01x10",850},{"0x0110",840},{"0x101",840},//活三型 {"0x112",125},{"01x12",125},{"011x2",115},{"1x12",115}, {"0x10",125},{"0x010",110}};// 死三活二
// 攻击的基本棋形及权值,0为空,1为自己,2为对手,x为下棋位置
//----------------------------------界面部分---------------------------------
void textcolor(int color) {// 更改字体颜色 SetConsoleTextAttribute(hOutput,color); }