Package-level declarations

Types

Link copied to clipboard
data class AccessibilityTrie<T : AxisPoint>(val origin: T, val maxMoveCost: Int, val neighbors: (T) -> List<T>, val isWalkable: (T) -> Boolean, val heuristic: (T, T) -> Int, val movementCost: (T, T) -> Double)

A data class that implements a pathfinding algorithm on a graph represented by points of type T extending AxisPoint.

Link copied to clipboard
interface Heuristic<T>

Provides an interface to calculate the heuristic value to a certain location.

Link copied to clipboard
interface MovementCost<T>

Provides an interface to calculate the movement cost to a certain location.

Link copied to clipboard

Represents a path tile with generic type T.

Link copied to clipboard
Link copied to clipboard

A provider for pre-computed tries for the line of sight (LoS) on a symmetric grid.

Link copied to clipboard
data class TrieNode(val parent: TrieNode? = null, val q: Int, val r: Int, val childrenIndices: MutableList<Int?> = MutableList(10) { null })

Data class defining a trie node for the SymmetricPreComputedVisionTries.

Link copied to clipboard
interface Walkable

Provides an interface to determine if a path is walkable.

Functions

Link copied to clipboard
fun <T : PathTile<T>> aStar(from: T, to: T, neighbors: (T) -> List<T>): List<T>

fun <T : AxisPoint> aStar(from: T, to: T, neighbors: (T) -> List<T>, isWalkable: (T) -> Boolean, heuristic: (T, T) -> Int, movementCost: (T, T) -> Double): List<T>

Applies the A* pathfinding algorithm on a given graph to find the shortest path from the start point from to the destination to.