dtiled.algorithm

Provides various useful operations on a tile grid.

Members

Functions

allShortestPaths
auto allShortestPaths(T grid, RowCol start, U maxCost)

Get the shortest path between a coordinate and each coordinate within a limited range.

enclosedCoords
auto enclosedCoords(T grid, RowCol origin, Diagonals diags)

Same as enclosedTiles, but return coords instead of tiles

enclosedTiles
auto enclosedTiles(T grid, RowCol origin, Diagonals diags)

Find an area of tiles enclosed by 'walls'.

floodCoords
auto floodCoords(T grid, RowCol origin, Diagonals diags)

Same as floodTiles, but return coordinates instead of the tiles at those coordinates.

floodTiles
auto floodTiles(T grid, RowCol origin, Diagonals diags)

Returns a range that iterates through tiles based on a flood filling algorithm.

shortestPath
auto shortestPath(T grid, RowCol start, RowCol end)

Get the shortest path between two coordinates.

Meta