java.lang.Object
za.co.wethinkcode.robots.server.worldinfo.Obstacle
All Implemented Interfaces:
WorldObject, Argument
Direct Known Subclasses:
SquareObstacle

public abstract class Obstacle extends Object implements WorldObject, Argument
Abstract Class that All Obstacles derive from
  • Field Details

  • Constructor Details

    • Obstacle

      public Obstacle(Obstacle.ObstacleType obstacleType, Position position)
      Standard Obstacle Constructor
      Parameters:
      obstacleType - Type of the Obstacle
      position - Center position of the Obstacle
  • Method Details

    • toString

      public String toString()
      String version of an obstacle
      Overrides:
      toString in class Object
      Returns:
      String version of an obstacle
    • getPosition

      public Position getPosition()
      Getter for an Object's Centre Position
      Returns:
      Object's Position
    • getObstacleType

      public Obstacle.ObstacleType getObstacleType()
      Getter for Obstacle Type
      Returns:
      Obstacle Type
    • equals

      public boolean equals(Object o)
      Proving if two results are equal
      Overrides:
      equals in class Object
      Parameters:
      o - the reference object with which to compare.
      Returns:
      the equality of the two objects
    • getType

      public WorldObject.WorldObjectType getType()
      Standard getter for a WorldObject's type
      Specified by:
      getType in interface WorldObject
      Returns:
      worldObject type of the worldObject
    • getValue

      public Object getValue()
      Description copied from interface: Argument
      Get the value of @param
      Specified by:
      getValue in interface Argument
      Returns:
      @param