roguish/pathing.hpp
2024-12-01 09:49:48 -05:00

25 lines
507 B
C++

#pragma once
#include "map.hpp"
#include "point.hpp"
class Pathing {
public:
int $limit;
size_t $width;
size_t $height;
Matrix $paths;
Matrix $input;
Pathing(size_t width, size_t height, int limit) :
$limit(limit),
$width(width),
$height(height),
$paths(height, MatrixRow(width, 1)),
$input(height, MatrixRow(width, 1))
{}
void compute_paths(Matrix &walls);
void set_target(const Point &at, int value=0);
void clear_target(const Point &at);
bool INVARIANT();
};