define.h

来自「这个程序是一个六子棋对弈引擎」· C头文件 代码 · 共 34 行

H
34
字号
#ifndef define_h_
#define define_h_

#define GRID_NUM 19			//棋盘行数
#define GRID_COUNT 361		//可放棋子总数
#define BLACK 0				//黑棋
#define WHITE 1				//白棋
#define NOSTONE 0xff		//无棋

//点(x,y)是否在棋盘内
#define IsValidPos(x,y)		((x>=0&&x<GRID_NUM )&&(y>=0&&y<GRID_NUM))


//棋子位置
typedef struct _stoneposition
{
	char x;
	char y;
}STONEPOS;

//走法
typedef struct _stonemove
{
	STONEPOS StonePos[2];	//棋子位置
	int		 Score;			//走法的分数
} STONEMOVE;

typedef struct _incdec
{
	int count;				//增加或减少了多少个这样的线
	int id[924];			//这些线的id
	bool containLive;		//增加或减少的这些线中,是否包含活棋
} INCDEC;
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?