Test coverage back and save system should work again but have to confirm it in-game.

This commit is contained in:
Zed A. Shaw 2024-12-02 09:58:54 -05:00
parent 6b4ebf7629
commit 2576b16869
9 changed files with 43 additions and 31 deletions

10
map.cpp
View file

@ -26,6 +26,15 @@ Map::Map(size_t width, size_t height) :
$paths(height, width, 1000)
{}
Map::Map(Matrix &walls, Pathing &paths, int limit) :
$limit(limit),
$walls(walls),
$paths(paths)
{
$width = walls[0].size();
$height = walls.size();
}
void Map::make_paths() {
$paths.compute_paths($walls);
}
@ -34,7 +43,6 @@ bool Map::inmap(size_t x, size_t y) {
return x < $width && y < $height;
}
void Map::set_target(const Point &at, int value) {
$paths.set_target(at, value);
}