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

📄 astar.h

📁 寻径算法演示平台~~提供给计算机博弈爱好者参考学习
💻 H
字号:
// AStar.h: interface for the CAStar class.
//
#include "SearchPathEngine.h"
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ASTAR_H__1BAF0756_6AA9_41FF_ADAE_CE9A59A16BD9__INCLUDED_)
#define AFX_ASTAR_H__1BAF0756_6AA9_41FF_ADAE_CE9A59A16BD9__INCLUDED_

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

#include"as_node.h"

#define Height 120
#define Width 176

class CAStar:public CSearchPathEngine
{	
public:
	CAStar();
	virtual ~CAStar();

public:
	int searchThePathStepByStep();
	void prepareForStepByStep();
	void showThePath(CDC* pDC , int showMode);
	int searchThePath();
	//int targetX;
	//int targetY;
	as_node* head;

private:

	
	as_node *adjustNode(as_node *head,as_node *node);
	as_node *insertNode(as_node *head,as_node *node);
	int A();
	as_node *m_element[Height][Width];
	as_node node[Height][Width];
	bool m_open[Height][Width];
	bool m_close[Height][Width];
};

#endif // !defined(AFX_ASTAR_H__1BAF0756_6AA9_41FF_ADAE_CE9A59A16BD9__INCLUDED_)

⌨️ 快捷键说明

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