TilePath

class TilePath(tiles: Array<Tile>) : Path

TilePath

Constructors

TilePath
Link copied to clipboard
fun TilePath(tiles: Array<Tile>)

Functions

end
Link copied to clipboard
open override fun end(): Tile

Gets the end tile of this path.

next
Link copied to clipboard
open operator override fun next(): Tile

Gets the next immediately available vertex in this path.

randomize
Link copied to clipboard
fun randomize(maxX: Int, maxY: Int): TilePath
reverse
Link copied to clipboard
fun reverse(): TilePath
setRunMax
Link copied to clipboard
fun setRunMax(runMax: Int): TilePath
setRunMin
Link copied to clipboard
fun setRunMin(runMin: Int): TilePath
start
Link copied to clipboard
open override fun start(): Tile

Gets the start tile of this path.

toArray
Link copied to clipboard
fun toArray(): Array<Tile?>
traverse
Link copied to clipboard
fun traverse(): Boolean

Takes a step along this path if appropriate. Specifies only TraversalOption.SPACE_ACTIONS.

open override fun traverse(options: EnumSet<Path.TraversalOption>): Boolean

Takes a step along this path if appropriate. If the path cannot be traversed due to the player being too far from its vertices or already at the end vertex, false will be returned. In all other cases, true will be returned, but an action will not necessarily be performed (based on the given options).

valid
Link copied to clipboard
open override fun valid(): Boolean

Properties

tiles
Link copied to clipboard
var tiles: Array<Tile>