Started working on a random flood function for paths to do things like fill rooms with stuff.

This commit is contained in:
Zed A. Shaw 2024-12-12 11:38:38 -05:00
parent e863bfa2fe
commit ee1e2e5bc5
5 changed files with 46 additions and 10 deletions

View file

@ -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();
};