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

📄 person.h

📁 回溯法实现的走迷宫方法
💻 H
字号:
////////////////////////////////////////////
//the CPerson class
//the person will find a path int the maze
////////////////////////////////////////////
#ifndef PERSON
#define PERSON

#include <vector>
using namespace std;

typedef struct MYPOINT{
	int dir;
	int LastDir;
	bool access;
}MyPoint;

class CPerson{
public:
	CPerson(const vector < vector<MYPOINT> > &map );
	int SearchDir();
	void ReStart(const vector< vector<MYPOINT> > &map);
	int GetX() const{return m_x;}
	int GetY() const{return m_y;}
private:
	int m_x,m_y;
	vector< vector<MYPOINT> > m_Map;
};

void  CreateMap(vector< vector<MYPOINT> > &map);
#endif

⌨️ 快捷键说明

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