|
|||||||||
| 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.model.FreeColGameObjectType
net.sf.freecol.common.model.TileType
public final class TileType
| Nested Class Summary | |
|---|---|
static class |
TileType.RangeType
|
| Field Summary | |
|---|---|
private int[] |
altitude
|
private java.lang.String |
artBasic
|
private java.lang.String |
artCoast
|
private java.lang.String |
artForest
|
private java.lang.String |
artOverlay
|
private int |
basicMoveCost
|
private int |
basicWorkTurns
|
private boolean |
canSettle
|
private boolean |
connected
Whether this TileType is connected to Europe. |
private boolean |
forest
|
private int[] |
humidity
|
private java.awt.Color |
minimapColor
|
private java.util.List<AbstractGoods> |
production
Describe production here. |
private java.util.List<RandomChoice<ResourceType>> |
resourceType
|
private GoodsType |
secondaryGoods
|
private int[] |
temperature
|
private boolean |
water
|
| Fields inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
|---|
featureContainer |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, logger, PARTIAL_ATTRIBUTE |
| Constructor Summary | |
|---|---|
TileType(int index)
|
|
| Method Summary | |
|---|---|
boolean |
canHaveImprovement(TileImprovementType improvement)
Returns true if this TileType supports the given TileImprovementType. |
boolean |
canHaveResourceType(ResourceType resourceType)
Can this TileType contain a specified
ResourceType? |
boolean |
canSettle()
|
java.lang.String |
getArtBasic()
|
java.lang.String |
getArtCoast()
|
java.lang.String |
getArtForest()
|
java.lang.String |
getArtOverlay()
|
int |
getBasicMoveCost()
|
int |
getBasicWorkTurns()
|
java.util.Set<Modifier> |
getDefenceBonus()
|
java.awt.Color |
getMinimapColor()
|
java.util.List<AbstractGoods> |
getProduction()
Get the Production value. |
java.util.Set<Modifier> |
getProductionBonus(GoodsType goodsType)
Returns the production bonus for the given GoodsType. |
int |
getProductionOf(GoodsType goodsType,
UnitType unitType)
Returns the amount of goods of given GoodsType this TileType can produce. |
java.util.List<ResourceType> |
getResourceTypeList()
|
GoodsType |
getSecondaryGoods()
|
java.util.List<RandomChoice<ResourceType>> |
getWeightedResources()
|
boolean |
isConnected()
Get the Connected value. |
boolean |
isForested()
|
boolean |
isWater()
|
void |
readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
boolean |
withinRange(TileType.RangeType rangeType,
int value)
|
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
|---|
addAbility, addModifier, getFeatureContainer, getIndex, getModifierSet, hasAbility, hasAbility, readChild, readFromXML, readFromXMLImpl, setFeatureContainer, setIndex, toString, toXMLImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String artBasic
private java.lang.String artOverlay
private java.lang.String artForest
private java.lang.String artCoast
private java.awt.Color minimapColor
private boolean forest
private boolean water
private boolean canSettle
private int basicMoveCost
private int basicWorkTurns
private int[] humidity
private int[] temperature
private int[] altitude
private java.util.List<RandomChoice<ResourceType>> resourceType
private GoodsType secondaryGoods
private boolean connected
private java.util.List<AbstractGoods> production
| Constructor Detail |
|---|
public TileType(int index)
| Method Detail |
|---|
public java.lang.String getArtBasic()
public java.lang.String getArtOverlay()
public java.lang.String getArtForest()
public java.lang.String getArtCoast()
public java.awt.Color getMinimapColor()
public boolean isForested()
public boolean isWater()
public boolean isConnected()
Connected value.
boolean valuepublic boolean canSettle()
public boolean canHaveImprovement(TileImprovementType improvement)
improvement - a TileImprovementType value
boolean valuepublic int getBasicMoveCost()
public int getBasicWorkTurns()
public java.util.Set<Modifier> getDefenceBonus()
public int getProductionOf(GoodsType goodsType,
UnitType unitType)
0f. Thus, it
will always return 0 unless an additive modifier is
present. This is intentional.
goodsType - a GoodsType valueunitType - an UnitType value
int valuegetProductionBonus(GoodsType)public java.util.Set<Modifier> getProductionBonus(GoodsType goodsType)
goodsType - a GoodsType value
Modifier valuepublic GoodsType getSecondaryGoods()
public java.util.List<AbstractGoods> getProduction()
Production value.
List valuepublic java.util.List<RandomChoice<ResourceType>> getWeightedResources()
public java.util.List<ResourceType> getResourceTypeList()
public boolean canHaveResourceType(ResourceType resourceType)
TileType contain a specified
ResourceType?
resourceType - a ResourceType to test
TileType contains the specified
ResourceType
public boolean withinRange(TileType.RangeType rangeType,
int value)
public void readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readAttributes in class FreeColGameObjectTypejavax.xml.stream.XMLStreamException
public void readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readChildren in class FreeColGameObjectTypejavax.xml.stream.XMLStreamException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||