Class ChangeTargetOnCollision

  • All Implemented Interfaces:
    it.unibo.alchemist.model.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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • ChangeTargetOnCollision

        ChangeTargetOnCollision(Function0<P> getCurrentPosition)
    • Method Detail

      • getTarget

         P getTarget()
        Returns:

        the next target where the Node is directed