clientmap.h
来自「巫魔问题求解」· C头文件 代码 · 共 64 行
H
64 行
#pragma once
#include <Wum_Base/src/Map.h>
#include <vector>
namespace _algorithm
{
class WorldModel;
class ClientMap : public _base::Map
{
public:
//constructor and destructor
ClientMap(unsigned int x_border, unsigned int y_border, WorldModel &wm);
~ClientMap(void);
//update information
void Update(void);
void UpdateCells(void);
private:
//disable copy constructor
ClientMap(const ClientMap &from);
public:
//for referencing the world model
const WorldModel &GetWorldModel(void) const;
WorldModel &TheWorldModel(void);
public:
//get map infos
std::vector<_base::Cell*> &TheKnownCells(void);
std::vector<_base::Cell*> &TheSuspectCells(void);
std::vector<_base::Cell*> &TheHasCameCells(void);
std::vector<_base::Cell*> &TheSafeCells(void);
const std::vector<_base::Cell*> &GetKnownCells(void) const;
const std::vector<_base::Cell*> &GetSuspectCells(void) const;
const std::vector<_base::Cell*> &GetHasCameCells(void) const;
const std::vector<_base::Cell*> &GetSafeCells(void) const;
public:
//reset client map
void Reset(void);
//for inserting a cell into a vector
static void Tool_InsertToVector(std::vector<_base::Cell*> &v, _base::Cell *c);
//whether it is sure no decision
bool IsNoSolution(void) const;
bool &_su_IsNoSolution(void);
private:
void UpdateCellTags(unsigned int x, unsigned int y);
std::vector<_base::Cell*> mKnownCells;
std::vector<_base::Cell*> mSuspectCells;
std::vector<_base::Cell*> mHasCameCells;
std::vector<_base::Cell*> mSafeCells;
WorldModel *mpWorldModel;
bool mIsNoSolution;
};
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?