Cleaned up the map for more work.

This commit is contained in:
Zed A. Shaw 2024-09-26 23:14:42 -04:00
parent 4f863c2635
commit 8b67a25732
5 changed files with 46 additions and 20 deletions

22
map.hpp
View file

@ -15,4 +15,24 @@ typedef std::vector<MatrixRow> Matrix;
void dump_map(const std::string &msg, Matrix &map);
void add_neighbors(Matrix &closed, size_t j, size_t i);
Matrix dijkstra_map(Matrix &input_map, Matrix &walls_map, int limit=0);
class Map {
Matrix m_input_map;
Matrix m_walls_map;
Matrix m_paths;
int m_limit = 0;
public:
void make_paths();
Matrix& paths() { return m_paths; }
Matrix& input_map() { return m_input_map; }
Matrix& walls() { return m_walls_map; }
int limit() { return m_limit; }
Map(Matrix input_map, Matrix walls_map, int limit) :
m_input_map(input_map),
m_walls_map(walls_map), m_limit(limit) {
}
Map(Map &map) = delete;
};