Class TeleportObstacle


  • public class TeleportObstacle
    extends PathObstacle
    Teleport obstacle is one that on completion teleports you to an end tile EX: Abyss obstacles
    • Constructor Detail

      • TeleportObstacle

        public TeleportObstacle​(java.lang.String name,
                                java.lang.String action,
                                Tile endTile,
                                Tile obstacleTile,
                                Condition condition)
        Instantiates a new Path obstacle with name action, and both primary and secondary tile.
        Parameters:
        name - the name of the obstacle.
        action - the action to preform to complete this obstacle.
      • TeleportObstacle

        public TeleportObstacle​(java.lang.String name,
                                java.lang.String action)
    • Method Detail

      • duplicate

        public TeleportObstacle duplicate​(Tile obsTile)
        Description copied from class: PathObstacle
        Creates a new PathObstacle setting the obstacles tile Note: This MUST return a new PathObstacle with the correct obstacle tile
        Specified by:
        duplicate in class PathObstacle
        Parameters:
        obsTile - Obstacle's tile
        Returns:
        duplicated PathObstacle
      • isValid

        public boolean isValid()
        Description copied from class: PathObstacle
        Checks to see if the obstacle exists
        Overrides:
        isValid in class PathObstacle
        Returns:
      • traverse

        public boolean traverse()
        Description copied from class: PathObstacle
        Traverses the obstacle **NOTE** this is not abstract to preserve current compilation of existing overrides At some point when deprecated methods start to be removed, this *will* become abstract
        Overrides:
        traverse in class PathObstacle
        Returns:
        true if successfully traversed
      • isCompleted

        public boolean isCompleted()
        Description copied from class: PathObstacle
        Checks if the obstacle has been completed
        Specified by:
        isCompleted in class PathObstacle
        Returns:
      • calculateEnd

        public void calculateEnd()