#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");
  }
}
