Package 

Class InfiniteHalls

  • All Implemented Interfaces:
    it.unibo.alchemist.model.interfaces.Environment , it.unibo.alchemist.model.interfaces.EuclideanEnvironment , it.unibo.alchemist.model.interfaces.EuclideanEnvironment , it.unibo.alchemist.model.interfaces.environments.Euclidean2DEnvironment , it.unibo.alchemist.model.interfaces.environments.Physics2DEnvironment , it.unibo.alchemist.model.interfaces.environments.PhysicsEnvironment , java.io.Serializable , java.lang.Iterable

    
    public final class InfiniteHalls<T>
    extends LimitedContinuos2D<T>
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final double ex
      private final double ci
      private final double cf
      private final double si
      private final double sf
      private boolean doorsOpen
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      double getEx()
      double getCi()
      double getCf()
      double getSi()
      double getSf()
      void setDoorsOpen(boolean isOpen)
      double getHallSize()
      boolean allowed(double xp, double yp) Checks whether a position is allowed or not.
      boolean isDoorsOpen()
      • Methods inherited from class it.unibo.alchemist.model.implementations.environments.LimitedContinuos2D

        moveNodeToPosition
      • Methods inherited from class it.unibo.alchemist.model.implementations.environments.Continuous2DEnvironment

        farthestPositionReachable, getHeading, getNodesWithin, getShape, getShapeFactory, makePosition, moveNodeToPosition, setHeading
      • Methods inherited from class it.unibo.alchemist.model.implementations.environments.Abstract2DEnvironment

        getDimensions, getOffset, getSize, moveNodeToPosition
      • Methods inherited from class it.unibo.alchemist.model.implementations.environments.AbstractEnvironment

        addLayer, addNode, addTerminator, forEach, getDistanceBetweenNodes, getIncarnation, getLayer, getLayers, getLinkingRule, getNeighborhood, getNodeByID, getNodeCount, getNodes, getNodesWithinRange, getPosition, getSimulation, getSizeInDistanceUnits, isTerminated, iterator, removeNode, setLinkingRule, setSimulation, spliterator, toString
      • Methods inherited from class it.unibo.alchemist.model.interfaces.Environment

        makePosition
      • Methods inherited from class java.lang.Iterable

        iterator, spliterator
      • Methods inherited from class it.unibo.alchemist.model.interfaces.environments.Euclidean2DEnvironment

        getOrigin, makePosition
      • Methods inherited from class it.unibo.alchemist.model.interfaces.EuclideanEnvironment

        getOrigin, moveNode
      • Methods inherited from class it.unibo.alchemist.model.interfaces.environments.PhysicsEnvironment

        farthestPositionReachable, getHeading, getNodesWithin, getShape, getShapeFactory
      • Methods inherited from class java.lang.Object

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

      • InfiniteHalls

        InfiniteHalls(Incarnation<T, Euclidean2DPosition> incarnation, double size)
        Parameters:
        incarnation - the incarnation to be used.
        size - the size of a single hall
      • InfiniteHalls

        InfiniteHalls(Incarnation<T, Euclidean2DPosition> incarnation, boolean allOpen)
        Parameters:
        incarnation - the incarnation to be used.
        allOpen - sets all the doors to open.
      • InfiniteHalls

        InfiniteHalls(Incarnation<T, Euclidean2DPosition> incarnation, double size, boolean allOpen)
        Parameters:
        incarnation - the incarnation to be used.
        size - the size of a single hall
        allOpen - sets all the doors to open.
    • Method Detail

      • setDoorsOpen

         void setDoorsOpen(boolean isOpen)
        Parameters:
        isOpen - must be true if the user wants all the four exits of the room to be open.
      • allowed

         boolean allowed(double xp, double yp)

        Checks whether a position is allowed or not.

        Parameters:
        xp - the x coordinate
        yp - the y coordinate