Accessibility Trie
data class AccessibilityTrie<T>(val origin: T, val maxMoveCost: Int, val neighbors: (T) -> List<T>, val isWalkable: (T) -> Boolean, val distance: (T, T) -> Int, val movementCost: (T, T) -> Double)(source)
A data class that represents a trie structure for accessibility in a hexagonal grid. Used for pathfinding and accessibility checks. Uses the A* algorithm to build the trie structure.
Parameters
T
The type of the elements in the grid.
origin
The starting point in the grid.
max Move Cost
The maximum cost of moving from one point to another.
neighbors
A function that returns a list of neighbors for a given point.
is Walkable
A function that checks if a given point is walkable.
distance
A function that calculates the distance between two points.
movement Cost
A function that calculates the cost of moving from one point to another.
Constructors
Properties
Link copied to clipboard
The set of all points accessible from the origin within maxMoveCost.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard