Class MoveForwardAndTeleport

  • All Implemented Interfaces:
    it.unibo.alchemist.model.Action , java.io.Serializable

    
    public final class MoveForwardAndTeleport<T, P extends Position2D<P>>
    extends AbstractMoveNode<T, P>
                        

    Moves the node along the x axis up to coordinate getMaxX, with steps of size getDeltaX. Once getMaxX is reached, the nodes gets teleported back to getMinX. Somewhat, it mimics the movement a node would have in a cylindrical environment.

    • 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
    • Method Summary

      Modifier and Type Method Description
      MoveForwardAndTeleport<T, P> cloneAction(Node<T> node, Reaction<T> reaction)
      P getNextPosition()
      double getMaxX()
      double getMinX()
      double getDeltaX()
      • Methods inherited from class it.unibo.alchemist.model.actions.AbstractMoveNode

        execute, getContext
      • Methods inherited from class it.unibo.alchemist.model.actions.AbstractAction

        getOutboundDependencies, toString
      • Methods inherited from class it.unibo.alchemist.model.Action

        execute, getContext, getOutboundDependencies
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MoveForwardAndTeleport

        MoveForwardAndTeleport(Environment<T, P> environment, Node<T> node, double deltaX, double minX, double maxX)
        Parameters:
        environment - the environment
        node - the node
        deltaX - how far along the x axis the node should move each time the action is triggered
        minX - minimum x point
        maxX - maximum x point