Fixed the bug that made walls not receive the algorithm.

This commit is contained in:
Zed A. Shaw 2024-09-26 16:55:42 -04:00
parent 4d748d1f48
commit ebb5360c5c
3 changed files with 30 additions and 30 deletions

View file

@ -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);