|
|||||||||
| 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.FreeColGameObject
net.sf.freecol.common.model.PlayerExploredTile
public class PlayerExploredTile
This class contains the mutable tile data visible to a specific player.
Sometimes a tile contains information that should not be given to a
player. For instance; a settlement that was built after the player last
viewed the tile.
The toXMLElement of Tile uses information from
this class to hide information that is not available.
| Field Summary | |
|---|---|
private java.lang.String |
colonyStockadeKey
|
private int |
colonyUnitCount
|
private static java.util.logging.Logger |
logger
|
private Unit |
missionary
|
private Player |
owner
|
private Settlement |
owningSettlement
|
private Player |
player
|
private UnitType |
skill
|
private Tile |
tile
|
private java.util.List<TileItem> |
tileItems
|
private GoodsType[] |
wantedGoods
|
| Fields inherited from class net.sf.freecol.common.model.FreeColGameObject |
|---|
UNITS_TAG_NAME |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, INFINITY, NO_ID, PARTIAL_ATTRIBUTE, UNDEFINED, VALUE_TAG |
| Constructor Summary | |
|---|---|
PlayerExploredTile(Game game,
Player player,
Tile tile)
Creates a new PlayerExploredTile. |
|
PlayerExploredTile(Game game,
javax.xml.stream.XMLStreamReader in)
Initialize this object from an XML-representation of this object. |
|
| Method Summary | |
|---|---|
java.util.List<TileItem> |
getAllTileItems()
|
java.lang.String |
getColonyStockadeKey()
|
int |
getColonyUnitCount()
|
Unit |
getMissionary()
|
Player |
getOwner()
|
Settlement |
getOwningSettlement()
|
UnitType |
getSkill()
|
GoodsType[] |
getWantedGoods()
|
static java.lang.String |
getXMLElementTagName()
Returns the tag name of the root element representing this object. |
void |
readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
Initialize this object from an XML-representation of this object. |
void |
setColonyStockadeKey(java.lang.String colonyStockadeKey)
|
void |
setColonyUnitCount(int colonyUnitCount)
|
void |
setMissionary(Unit missionary)
|
void |
setOwner(Player owner)
|
void |
setOwningSettlement(Settlement owningSettlement)
|
void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out,
Player player,
boolean showAll,
boolean toSavedGame)
This method writes an XML-representation of this object to the given stream. |
void |
update(boolean full)
Update this PlayerExploredTile with the current state of its tile. |
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObject |
|---|
dispose, disposeList, equals, equals, fundamentalDispose, getFreeColGameObject, getFreeColGameObject, getGame, getIntegerID, getSpecification, hashCode, isDisposed, isUninitialized, newLocation, readFromXML, readFromXMLPartialByClass, setDefaultId, setGame, setId, toString, toXML, toXMLImpl, toXMLPartialByClass, updateFreeColGameObject |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.logging.Logger logger
private Player player
private Tile tile
private Player owner
private Settlement owningSettlement
private final java.util.List<TileItem> tileItems
private int colonyUnitCount
private java.lang.String colonyStockadeKey
private UnitType skill
private GoodsType[] wantedGoods
private Unit missionary
| Constructor Detail |
|---|
public PlayerExploredTile(Game game,
Player player,
Tile tile)
PlayerExploredTile.
player - The Player that owns this view.tile - The Tile to view.
public PlayerExploredTile(Game game,
javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
in - The XML stream to read the data from.
javax.xml.stream.XMLStreamException - if an error occurred during parsing.| Method Detail |
|---|
public void update(boolean full)
full - If true, update information hidden by settlements.public Player getOwner()
public Settlement getOwningSettlement()
public java.util.List<TileItem> getAllTileItems()
public int getColonyUnitCount()
public java.lang.String getColonyStockadeKey()
public Unit getMissionary()
public UnitType getSkill()
public GoodsType[] getWantedGoods()
public void setOwner(Player owner)
public void setOwningSettlement(Settlement owningSettlement)
public void setColonyUnitCount(int colonyUnitCount)
public void setColonyStockadeKey(java.lang.String colonyStockadeKey)
public void setMissionary(Unit missionary)
public void toXMLImpl(javax.xml.stream.XMLStreamWriter out,
Player player,
boolean showAll,
boolean toSavedGame)
throws javax.xml.stream.XMLStreamException
Player will
be added to that representation if showAll is set
to false.
toXMLImpl in class FreeColGameObjectout - The target stream.player - The Player this XML-representation
should be made for, or null if
showAll == true.showAll - Only attributes visible to player will
be added to the representation if showAll
is set to false.toSavedGame - If true then information that is
only needed when saving a game is added.
javax.xml.stream.XMLStreamException - if there are any problems writing to the
stream.
public void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readFromXMLImpl in class FreeColObjectin - The input stream with the XML.
javax.xml.stream.XMLStreamException - if an error occurred during parsing.public static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||