diff options
Diffstat (limited to 'server/bot/src/pathfinding.rs')
-rw-r--r-- | server/bot/src/pathfinding.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/bot/src/pathfinding.rs b/server/bot/src/pathfinding.rs index 593b5900..96d6b37a 100644 --- a/server/bot/src/pathfinding.rs +++ b/server/bot/src/pathfinding.rs @@ -48,6 +48,9 @@ impl Path { pub fn is_stuck(&self) -> bool { self.seg_time > 5. } + pub fn remaining_segments(&self) -> usize { + self.segments.len() + } } pub fn find_path_to_neighbour(walkable: &HashSet<IVec2>, from: IVec2, to: IVec2) -> Option<Path> { |