Initial stab at pulling the pathing out.
This commit is contained in:
parent
d515c33afc
commit
e05335b153
5 changed files with 156 additions and 1 deletions
25
pathing.hpp
Normal file
25
pathing.hpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#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();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue