Class WorldConfig

java.lang.Object
za.co.wethinkcode.robots.server.config.WorldConfig

public class WorldConfig extends Object
  • Field Details

    • DEFAULT_IP_ADDRESS

      public static final String DEFAULT_IP_ADDRESS
      Default bind address that allows connections through any network interface.
      See Also:
  • Constructor Details

    • WorldConfig

      public WorldConfig(SavedWorld saved)
      Build a world config from a saved world
    • WorldConfig

      public WorldConfig()
      Explicitly bind defaults in empty constructor
  • Method Details

    • getPort

      public int getPort()
    • getWorldSize

      public int getWorldSize()
    • getMazeType

      public int getMazeType()
    • getRepairTime

      public int getRepairTime()
    • getReloadTime

      public int getReloadTime()
    • getMineTime

      public int getMineTime()
    • getVisibility

      public int getVisibility()
    • getMaxShields

      public int getMaxShields()
    • getCustomObstacles

      public List<Position> getCustomObstacles()
    • getObstacleCount

      public int getObstacleCount()
    • getCustomPits

      public List<Position> getCustomPits()
    • isPointObstacleMode

      public boolean isPointObstacleMode()
    • getIpAddress

      public String getIpAddress()
      Returns the configured server bind address, falling back to DEFAULT_IP_ADDRESS when no usable value was supplied.
      Returns:
      the normalized server bind address
    • setPort

      public WorldConfig setPort(int port)
    • setWorldSize

      public WorldConfig setWorldSize(int worldSize)
    • setMazeType

      public void setMazeType(int mazeType)
    • setCustomObstacles

      public WorldConfig setCustomObstacles(List<Position> customObstacles)
    • setCustomPits

      public void setCustomPits(List<Position> customPits)
    • setMineTime

      public void setMineTime(int mineTime)
    • setIpAddress

      public void setIpAddress(String ipAddress)
      Sets the server bind address. Null and blank values restore the default.
      Parameters:
      ipAddress - the host name or IP address on which the server listens
    • getMaxShots

      public int getMaxShots()