LocalEdge

abstract class LocalEdge(destination: Tile, finalDestination: Tile)

Functions

execute
Link copied to clipboard
abstract fun execute(): Boolean
getCost
Link copied to clipboard
abstract fun getCost(): Double
getNeighbors
Link copied to clipboard
fun getNeighbors(onlyWalk: Boolean): MutableList<LocalEdge>
getPathCost
Link copied to clipboard
fun getPathCost(): Double
toString
Link copied to clipboard
open override fun toString(): String

Properties

destination
Link copied to clipboard
val destination: Tile
finalDestination
Link copied to clipboard
val finalDestination: Tile
heuristics
Link copied to clipboard
val heuristics: Double
parent
Link copied to clipboard
abstract val parent: LocalEdge
type
Link copied to clipboard
abstract val type: LocalEdgeType

Inheritors

StartEdge
Link copied to clipboard
LocalTileEdge
Link copied to clipboard

Extensions

getEdgeForDiagonalNeighbour
Link copied to clipboard
fun LocalEdge.getEdgeForDiagonalNeighbour(neighbor: Tile, flags: Array<IntArray>): Optional<LocalEdge>

If the given tile (diagonal neighbor) is not blocked, it gets added to the neighbors. If it is blocked, we check if there is a door that has a diagonal rotation Flag.Rotation.DIAGONAL

getLocalNeighbors
Link copied to clipboard
fun LocalEdge.getLocalNeighbors(flags: Array<IntArray> = cachedFlags, onlyWalk: Boolean = false): MutableList<LocalEdge>

Used to find neighbors of LocalEdge