-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.movestrategies.TargetSelectionStrategy,java.io.Serializable
public abstract class ChangeTargetOnCollision<T extends Object, P extends Position<P>> implements TargetSelectionStrategy<T, P>
Base class for TargetSelectionStrategy offering automatic target change on collision and utilities for initialization. getCurrentPosition should return the current position of the object to move. P is the position type to use.
-
-
Constructor Summary
Constructors Constructor Description ChangeTargetOnCollision(Function0<P> getCurrentPosition)
-
Method Summary
Modifier and Type Method Description PgetTarget()abstract ChangeTargetOnCollision<T, P>cloneIfNeeded(Node<T> destination, Reaction<T> reaction)
-