You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
602 B
26 lines
602 B
2 weeks ago
|
#include "matrix.hpp"
|
||
|
#include "constants.hpp"
|
||
|
#include <fmt/core.h>
|
||
|
|
||
|
using namespace fmt;
|
||
|
|
||
|
void matrix_dump(const std::string &msg, Matrix &map, int show_x, int show_y) {
|
||
|
println("----------------- {}", msg);
|
||
|
for(size_t y = 0; y < map.size(); y++) {
|
||
|
for(size_t x = 0; x < map[y].size(); x++) {
|
||
|
int col = map[y][x];
|
||
|
|
||
|
if(int(x) == show_x && int(y) == show_y) {
|
||
|
print("{:x}<", col);
|
||
|
} else if(col == WALL_PATH_LIMIT) {
|
||
|
print("# ");
|
||
|
} else if(col > 15) {
|
||
|
print("* ");
|
||
|
} else {
|
||
|
print("{:x} ", col);
|
||
|
}
|
||
|
}
|
||
|
print("\n");
|
||
|
}
|
||
|
}
|