GoTo

data class GoTo<T, P : Position<P>>(destination: P) : TargetSelectionStrategy<T, P>

TargetSelectionStrategy that has the objective to go towards a fixed destination in the Environment.

Parameters

position type

Constructors

Link copied to clipboard
constructor(destination: P)
constructor(environment: Environment<T, P>, vararg destination: Number)

Properties

Link copied to clipboard
open override val target: P

The next target where the Node is directed.

Functions

Link copied to clipboard
open fun cloneIfNeeded(destination: Node<T>, reaction: NodeReaction<T>): TargetSelectionStrategy<T, P>

Clones this strategy, if needed, for the destination node and its reaction. Returns a copy of the strategy if the strategy is stateful, and this object otherwise: the default implementation assumes a stateless strategy.

Link copied to clipboard
open override fun toString(): String