|
||||||||||
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 |
---|
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
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, readFromXML, setFeatureContainer, setIndex, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
javax.xml.stream.XMLStreamException
public void readChildren(javax.xml.stream.XMLStreamReader in, Specification specification) throws javax.xml.stream.XMLStreamException
readChildren
in class FreeColGameObjectType
javax.xml.stream.XMLStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |