Class WorldConfig
java.lang.Object
za.co.wethinkcode.robots.server.config.WorldConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault bind address that allows connections through any network interface. -
Constructor Summary
ConstructorsConstructorDescriptionExplicitly bind defaults in empty constructorWorldConfig(SavedWorld saved) Build a world config from a saved world -
Method Summary
Modifier and TypeMethodDescriptionReturns the configured server bind address, falling back toDEFAULT_IP_ADDRESSwhen no usable value was supplied.intintintintintintgetPort()intintintintbooleansetCustomObstacles(List<Position> customObstacles) voidsetCustomPits(List<Position> customPits) voidsetIpAddress(String ipAddress) Sets the server bind address.voidsetMazeType(int mazeType) voidsetMineTime(int mineTime) setPort(int port) setWorldSize(int worldSize)
-
Field Details
-
DEFAULT_IP_ADDRESS
Default bind address that allows connections through any network interface.- See Also:
-
-
Constructor Details
-
WorldConfig
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
-
getObstacleCount
public int getObstacleCount() -
getCustomPits
-
isPointObstacleMode
public boolean isPointObstacleMode() -
getIpAddress
Returns the configured server bind address, falling back toDEFAULT_IP_ADDRESSwhen no usable value was supplied.- Returns:
- the normalized server bind address
-
setPort
-
setWorldSize
-
setMazeType
public void setMazeType(int mazeType) -
setCustomObstacles
-
setCustomPits
-
setMineTime
public void setMineTime(int mineTime) -
setIpAddress
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()
-