|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.option.AbstractOption
net.sf.freecol.common.option.OptionGroup
net.sf.freecol.common.option.OptionMap
net.sf.freecol.server.generator.MapGeneratorOptions
public class MapGeneratorOptions
Keeps track of the available map generator options.
New options should be added to addDefaultOptions()
and each option
should be given an unique identifier (defined as a constant in this class).
MapGenerator
Field Summary | |
---|---|
static java.lang.String |
BONUS_NUMBER
Option for setting the percentage of bonus tiles on the map. |
static java.lang.String |
FOREST_NUMBER
Option for setting the percentage of forests on the map. |
static java.lang.String |
HUMIDITY
Option for setting the humidity of the map. |
static java.lang.String |
IMPORT_BONUSES
Option for using the bonuses imported from a file. |
static java.lang.String |
IMPORT_FILE
Option for setting a file to be imported (map etc). |
static java.lang.String |
IMPORT_RUMOURS
Option for using the lost city rumours imported from a file. |
static java.lang.String |
IMPORT_SETTLEMENTS
Option for using the settlements imported from a file. |
static java.lang.String |
IMPORT_TERRAIN
Option for using the terrain imported from a file. |
static int |
LAND_GEN_ARCHIPELAGO
|
static int |
LAND_GEN_CLASSIC
|
static int |
LAND_GEN_CONTINENT
|
static int |
LAND_GEN_ISLANDS
|
static java.lang.String |
LAND_GEN_TYPE
Option for setting the type of land generator to be used. |
static java.lang.String |
LAND_MASS
Option for setting the land mass of the map. |
static java.lang.String |
MAP_SIZE
Option for setting the size of the map. |
static int |
MAP_SIZE_HUGE
One of the settings used by MAP_SIZE . |
static int |
MAP_SIZE_LARGE
One of the settings used by MAP_SIZE . |
static int |
MAP_SIZE_MEDIUM
One of the settings used by MAP_SIZE . |
static int |
MAP_SIZE_SMALL
One of the settings used by MAP_SIZE . |
static int |
MAP_SIZE_VERY_LARGE
One of the settings used by MAP_SIZE . |
static java.lang.String |
MOUNTAIN_NUMBER
Option for setting the number of mountains on the map. |
static java.lang.String |
RIVER_NUMBER
Option for setting the number of rivers on the map. |
static java.lang.String |
RUMOUR_NUMBER
Option for setting the number of rumours on the map. |
static java.lang.String |
SETTLEMENT_NUMBER
Option for setting the number of settlements on the map. |
static java.lang.String |
TEMPERATURE
Option for setting the temperature of the map. |
static int |
TEMPERATURE_CHILLY
One of the settings used by TEMPERATURE . |
static int |
TEMPERATURE_COLD
One of the settings used by TEMPERATURE . |
static int |
TEMPERATURE_HOT
One of the settings used by TEMPERATURE . |
static int |
TEMPERATURE_TEMPERATE
One of the settings used by TEMPERATURE . |
static int |
TEMPERATURE_WARM
One of the settings used by TEMPERATURE . |
Fields inherited from class net.sf.freecol.common.option.AbstractOption |
---|
NO_ID |
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
MapGeneratorOptions()
Creates a new MapGeneratorOptions . |
|
MapGeneratorOptions(org.w3c.dom.Element element)
Creates a MapGeneratorOptions from an XML representation. |
|
MapGeneratorOptions(javax.xml.stream.XMLStreamReader in)
Creates a MapGeneratorOptions from an XML representation. |
Method Summary | |
---|---|
int |
getDistLandHighSea()
Gets the width of "short sea" of the map to be created. |
int |
getHeight()
Gets the height of the map to be created. |
static int |
getHeight(int size)
|
int |
getHumidity()
Gets the average humidity of the map. |
int |
getLand()
Gets the approximate number of land tiles to be created. |
int |
getLandGeneratorType()
Gets the type of land generator to be used. |
int |
getLandMass()
Gets the percentage of land of the map to be created. |
int |
getMaxDistToEdge()
Gets the maximum allowed distance between edge and possible highSea tile. |
int |
getNumberOfMountainTiles()
Gets the number of mountain tiles on the map to be created. |
int |
getNumberOfRivers()
Gets the number of rivers on the map to be created. |
int |
getNumberOfRumours()
Gets the number of rumours on the map to be created. |
int |
getNumberOfSettlements()
Gets the number of settlements on the map to be created. |
int |
getPercentageOfBonusTiles()
Gets the percentage of bonus tiles on the map to be created. |
int |
getPercentageOfForests()
Gets the percentage of forests on the map to be created. |
int |
getPrefDistToEdge()
Gets the preferred distance to edge of the map to be created. |
int |
getTemperature()
Gets the average temperature of the map. |
int |
getWidth()
Gets the width of the map to be created. |
static int |
getWidth(int size)
|
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
Methods inherited from class net.sf.freecol.common.option.OptionMap |
---|
addToMap, getBoolean, getFile, getInteger, getObject, load, putOption, save, setFile, toXML |
Methods inherited from class net.sf.freecol.common.option.OptionGroup |
---|
add, getName, getShortDescription, iterator, removeAll |
Methods inherited from class net.sf.freecol.common.option.AbstractOption |
---|
getGroup, isPreviewEnabled, setGroup, setPreviewEnabled, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.freecol.common.option.Option |
---|
addPropertyChangeListener, getId, readFromXML, readFromXMLElement, removePropertyChangeListener, toXMLElement |
Field Detail |
---|
public static final java.lang.String MAP_SIZE
MAP_SIZE_SMALL
MAP_SIZE_MEDIUM
MAP_SIZE_LARGE
MAP_SIZE_VERY_LARGE
MAP_SIZE_HUGE
public static final int MAP_SIZE_SMALL
MAP_SIZE
.
public static final int MAP_SIZE_MEDIUM
MAP_SIZE
.
public static final int MAP_SIZE_LARGE
MAP_SIZE
.
public static final int MAP_SIZE_VERY_LARGE
MAP_SIZE
.
public static final int MAP_SIZE_HUGE
MAP_SIZE
.
public static final java.lang.String LAND_MASS
public static final java.lang.String RIVER_NUMBER
public static final java.lang.String MOUNTAIN_NUMBER
public static final java.lang.String RUMOUR_NUMBER
public static final java.lang.String SETTLEMENT_NUMBER
public static final java.lang.String FOREST_NUMBER
public static final java.lang.String BONUS_NUMBER
public static final java.lang.String HUMIDITY
public static final java.lang.String TEMPERATURE
public static final int TEMPERATURE_COLD
TEMPERATURE
.
public static final int TEMPERATURE_CHILLY
TEMPERATURE
.
public static final int TEMPERATURE_TEMPERATE
TEMPERATURE
.
public static final int TEMPERATURE_WARM
TEMPERATURE
.
public static final int TEMPERATURE_HOT
TEMPERATURE
.
public static final java.lang.String IMPORT_FILE
public static final java.lang.String IMPORT_TERRAIN
public static final java.lang.String IMPORT_BONUSES
public static final java.lang.String IMPORT_RUMOURS
public static final java.lang.String IMPORT_SETTLEMENTS
public static final java.lang.String LAND_GEN_TYPE
public static final int LAND_GEN_CLASSIC
public static final int LAND_GEN_CONTINENT
public static final int LAND_GEN_ARCHIPELAGO
public static final int LAND_GEN_ISLANDS
Constructor Detail |
---|
public MapGeneratorOptions()
MapGeneratorOptions
.
public MapGeneratorOptions(org.w3c.dom.Element element)
MapGeneratorOptions
from an XML representation.
element
- The XML Element
from which this object
should be constructed.public MapGeneratorOptions(javax.xml.stream.XMLStreamReader in) throws javax.xml.stream.XMLStreamException
MapGeneratorOptions
from an XML representation.
in
- The XML stream to read the data from.
javax.xml.stream.XMLStreamException
- if an error occurred during parsing.Method Detail |
---|
public int getWidth()
public static int getWidth(int size)
public int getHeight()
public static int getHeight(int size)
public int getLandMass()
public int getLand()
public int getLandGeneratorType()
public int getNumberOfRivers()
public int getNumberOfMountainTiles()
public int getNumberOfRumours()
public int getNumberOfSettlements()
public int getPercentageOfForests()
public int getPercentageOfBonusTiles()
public int getDistLandHighSea()
public int getMaxDistToEdge()
public int getPrefDistToEdge()
public int getHumidity()
public int getTemperature()
public static java.lang.String getXMLElementTagName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |