Class FollowTarget
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.movestrategies.TargetSelectionStrategy
,java.io.Serializable
public class FollowTarget<T, P extends Position<P>> implements TargetSelectionStrategy<T, P>
This strategy reads the value of a "target" molecule and tries to interpret it as a coordinate.
-
-
Constructor Summary
Constructors Constructor Description FollowTarget(Environment<T, P> environment, Node<T> node, Molecule targetMolecule)
-
Method Summary
Modifier and Type Method Description final P
getTarget()
FollowTarget<T, P>
cloneIfNeeded(Node<T> destination, Reaction<T> reaction)
Molecule
getTargetMolecule()
-
-
Method Detail
-
cloneIfNeeded
FollowTarget<T, P> cloneIfNeeded(Node<T> destination, Reaction<T> reaction)
-
getTargetMolecule
Molecule getTargetMolecule()
- Returns:
the molecule holding the destination information
-
-
-
-