astar.h

来自「用 vc 编 写 的」· C头文件 代码 · 共 46 行

H
46
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?