Minor fixes to make initializing the terminal more consistent and to remove a magic number for wall limits.

This commit is contained in:
Zed A. Shaw 2024-12-04 08:19:04 -05:00
parent 2d5490131d
commit ae43dad499
12 changed files with 47 additions and 42 deletions

View file

@ -17,7 +17,7 @@ void dump_map(const std::string &msg, Matrix &map, int show_x, int show_y) {
if(int(x) == show_x && int(y) == show_y) {
print("{:x}<", col);
} else if(col == 1000) {
} else if(col == WALL_PATH_LIMIT) {
print("# ");
} else if(col > 15) {
print("* ");
@ -30,11 +30,11 @@ void dump_map(const std::string &msg, Matrix &map, int show_x, int show_y) {
}
Map::Map(size_t width, size_t height) :
$limit(1000),
$limit(WALL_PATH_LIMIT),
$width(width),
$height(height),
$walls(height, MatrixRow(width, INV_WALL)),
$paths(height, width, 1000)
$paths(height, width, WALL_PATH_LIMIT)
{}
Map::Map(Matrix &walls, Pathing &paths, int limit) :