rails.game.action
Class LayToken

java.lang.Object
  extended by rails.game.action.PossibleAction
      extended by rails.game.action.PossibleORAction
          extended by rails.game.action.LayToken
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LayBaseToken, LayBonusToken

public abstract class LayToken
extends PossibleORAction

Author:
Erik Vos
See Also:
Serialized Form

Field Summary
protected  MapHex chosenHex
          The map hex on which the token is laid
protected  java.lang.String chosenHexName
           
protected  java.lang.String locationNames
           
protected  java.util.List<MapHex> locations
          Where to lay a token (null means anywhere)
static long serialVersionUID
           
protected  SpecialTokenLay specialProperty
          Special property that will be fulfilled by this token lay.
protected  int specialPropertyId
           
 
Fields inherited from class rails.game.action.PossibleORAction
company, companyName
 
Fields inherited from class rails.game.action.PossibleAction
acted, gameManager, log, playerIndex, playerName
 
Constructor Summary
LayToken(java.util.List<MapHex> locations)
          Allow laying a base token on a given location.
LayToken(MapHex hex)
           
LayToken(SpecialTokenLay specialProperty)
           
 
Method Summary
 MapHex getChosenHex()
           
 java.lang.String getLocationNameString()
           
 java.util.List<MapHex> getLocations()
           
 SpecialTokenLay getSpecialProperty()
           
 void setChosenHex(MapHex chosenHex)
           
 void setSpecialProperty(SpecialTokenLay specialProperty)
           
 
Methods inherited from class rails.game.action.PossibleORAction
getCompany, getCompanyName, setCompany
 
Methods inherited from class rails.game.action.PossibleAction
equalsAsAction, equalsAsOption, getCompanyManager, getGameManager, getPlayerIndex, getPlayerName, hasActed, setActed, setPlayerName, toMenu
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locations

protected transient java.util.List<MapHex> locations
Where to lay a token (null means anywhere)


locationNames

protected java.lang.String locationNames

specialProperty

protected transient SpecialTokenLay specialProperty
Special property that will be fulfilled by this token lay. If null, this is a normal token lay.


specialPropertyId

protected int specialPropertyId

chosenHex

protected transient MapHex chosenHex
The map hex on which the token is laid


chosenHexName

protected java.lang.String chosenHexName

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

LayToken

public LayToken(java.util.List<MapHex> locations)
Allow laying a base token on a given location.


LayToken

public LayToken(SpecialTokenLay specialProperty)

LayToken

public LayToken(MapHex hex)
Method Detail

getChosenHex

public MapHex getChosenHex()
Returns:
Returns the chosenHex.

setChosenHex

public void setChosenHex(MapHex chosenHex)
Parameters:
chosenHex - The chosenHex to set.

getSpecialProperty

public SpecialTokenLay getSpecialProperty()
Returns:
Returns the specialProperty.

setSpecialProperty

public void setSpecialProperty(SpecialTokenLay specialProperty)
Parameters:
specialProperty - The specialProperty to set.

getLocations

public java.util.List<MapHex> getLocations()

getLocationNameString

public java.lang.String getLocationNameString()