Fixed the bug that made walls not receive the algorithm.
This commit is contained in:
parent
4d748d1f48
commit
ebb5360c5c
3 changed files with 30 additions and 30 deletions
3
map.hpp
3
map.hpp
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <string>
|
||||
|
||||
struct Pair {
|
||||
size_t j = 0;
|
||||
|
@ -11,7 +12,7 @@ typedef std::vector<Pair> PairList;
|
|||
typedef std::vector<int> MatrixRow;
|
||||
typedef std::vector<MatrixRow> Matrix;
|
||||
|
||||
void dump_map(Matrix &map);
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue