Figuring out something weird about the Pathing::random_walk code.
This commit is contained in:
parent
ee804581a8
commit
77f2e94515
3 changed files with 30 additions and 10 deletions
|
@ -7,7 +7,7 @@ using matrix::Matrix;
|
|||
|
||||
constexpr const int PATHING_TOWARD=1;
|
||||
constexpr const int PATHING_AWAY=-1;
|
||||
constexpr const int MOVE_DIAGONAL=8;
|
||||
constexpr const int DIRECTION_MAX=8;
|
||||
|
||||
class Pathing {
|
||||
public:
|
||||
|
@ -29,7 +29,8 @@ public:
|
|||
Matrix &paths() { return $paths; }
|
||||
Matrix &input() { return $input; }
|
||||
int distance(Point to) { return $paths[to.y][to.x];}
|
||||
bool random_walk(Point &out, bool random, int direction, size_t dir_count = 4);
|
||||
bool random_walk(Point &out, bool random, int direction,
|
||||
size_t slice_count=4, size_t dist_size=4);
|
||||
|
||||
bool INVARIANT();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue