⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datatype.h

📁 八数码多个算法
💻 H
字号:
// DataType.h: interface for the CPathNode class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DATATYPE_H__DCADB281_C88A_11D4_B2EE_9A2EC5627551__INCLUDED_)
#define AFX_DATATYPE_H__DCADB281_C88A_11D4_B2EE_9A2EC5627551__INCLUDED_

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

class CPathNode  
{
public:
	CPathNode();
	CPathNode(BYTE n,const CPoint &p,int width);
	CPathNode(BYTE n,int d,const CPoint &p,int width);
	int width;
	void DrawNode(CDC *pDC);
	CPoint P1;
	CPoint P0;
	CPathNode(BYTE n)
	{
		state[16]='\0';
		N=n;
		depth=0;
		next=NULL;
		parent=NULL;
	}
	CPathNode(BYTE n,UINT d)
	{
		state[16]='\0';
		N=n;
		depth=d;
		next=NULL;
		parent=NULL;
	}
	unsigned char state[17];
	BYTE space;
	BYTE move;
	BYTE rule;
	UINT depth;
	BYTE N;
	int weight;
	CPathNode *next;
	CPathNode *parent;

	virtual ~CPathNode()
	{
	} 

};


class CResult  
{
public:
	CResult()
	{
		moves=NULL;
		rules=NULL;
		depth=0;
	}
	UINT generate;
	UINT split;
	UINT depth;
	unsigned char *moves;
	BYTE *rules;

	virtual ~CResult()
	{
		if (depth>0 && moves) delete[] moves;
		if (depth>0 && rules) delete[] rules;

	}
};

#endif // !defined(AFX_DATATYPE_H__DCADB281_C88A_11D4_B2EE_9A2EC5627551__INCLUDED_)

⌨️ 快捷键说明

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