chess.h

来自「用人工智能的αβ剪枝算法实现,界面整洁漂亮,人机各为一方,三子连成一线即赢」· C头文件 代码 · 共 58 行

H
58
字号
// chess.h: interface for the chess class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CHESS_H__1CA1679B_64A9_46C4_A835_F5C5C021C9A6__INCLUDED_)
#define AFX_CHESS_H__1CA1679B_64A9_46C4_A835_F5C5C021C9A6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include<stdio.h>
#include<string.h>
#include<iostream.h>

#define maxwin 32767
#define minwin -32767
#define MAX 3

//const int maxwin=32767;
//const int minwin=-32767;
//const int MAX=3;
//int pai;

struct node
{
	int value;
	int father;
	char pf[MAX][MAX];
	int floor;
	int son;
};

class chess
{
private:    
    int dep;
    int p,q,ppp;
    node queue[10000];
    int sign[10000];
public:
	static int pai;
	void init();
	void print(char temp[3][3]);
	int equal(char a[MAX][MAX],char b[MAX][MAX]);
	int GetAllMoves(node f,int p,int &bit);
    int che(char f[MAX][MAX],int x,char ch);
    int check(char f[MAX][MAX]);
    int fun(char f[MAX][MAX]);
	int maxnum(int a,int b);
	int minnum(int a,int b);
	int cmax(int depth,node f,int vf_min);
    int cmin(int depth,node f,int vf_max);
	int work(char sump[3][3],int &x,int &y);
};

#endif // !defined(AFX_CHESS_H__1CA1679B_64A9_46C4_A835_F5C5C021C9A6__INCLUDED_)

⌨️ 快捷键说明

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