Refactored out the tilemap since it was mostly doing nothing useful.

This commit is contained in:
Zed A. Shaw 2025-05-25 11:39:43 -04:00
parent ea9f6bf383
commit 3a745d492a
15 changed files with 40 additions and 187 deletions

10
map.cpp
View file

@ -13,13 +13,11 @@ using namespace fmt;
Map::Map(size_t width, size_t height) :
$width(width),
$height(height),
$tiles(width, height),
$walls(height, matrix::Row(width, SPACE_VALUE)),
$paths(width, height)
{}
Map::Map(Matrix &walls, Pathing &paths) :
$tiles(matrix::width(walls), matrix::height(walls)),
$walls(walls),
$paths(paths)
{
@ -144,8 +142,12 @@ bool Map::INVARIANT() {
return true;
}
void Map::load_tiles() {
$tiles.load($walls);
void Map::init_tiles() {
$tiles = $walls;
}
Matrix& Map::tiles() {
return $walls;
}
void Map::enclose() {