Started working on a random flood function for paths to do things like fill rooms with stuff.
This commit is contained in:
parent
e863bfa2fe
commit
ee1e2e5bc5
5 changed files with 46 additions and 10 deletions
|
@ -1,6 +1,8 @@
|
|||
#pragma once
|
||||
#include "point.hpp"
|
||||
#include "matrix.hpp"
|
||||
#include <functional>
|
||||
|
||||
|
||||
class Pathing {
|
||||
public:
|
||||
|
@ -22,6 +24,7 @@ public:
|
|||
Matrix &paths() { return $paths; }
|
||||
Matrix &input() { return $input; }
|
||||
int distance(Point to) { return $paths[to.y][to.x];}
|
||||
void random_flood(const Point from, std::function<void(Point at, int dnum)> cb);
|
||||
|
||||
bool INVARIANT();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue