Skip to content

Commit

Permalink
PathFinders area is always at zero
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Nov 26, 2023
1 parent 5b80e19 commit 80eb263
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ object PathFinder:
fromRectangles(Batch(rectangle))

def fromWalkable(walkable: Batch[Point]): PathFinder =
val a = Rectangle.fromPointCloud(walkable)
val area = a.resize(a.size + 1)
val area = Rectangle(Rectangle.fromPointCloud(walkable).size + 1)

val grid: Batch[GridSquare] =
Batch.fromIndexedSeq(0 until (area.size.width * area.size.height)).map { index =>
Expand Down

0 comments on commit 80eb263

Please sign in to comment.