rails.game.special
Class SellBonusToken

java.lang.Object
  extended by rails.game.special.SpecialProperty
      extended by rails.game.special.SellBonusToken
All Implemented Interfaces:
ConfigurableComponentI, Moveable, SpecialPropertyI

public class SellBonusToken
extends SpecialProperty


Nested Class Summary
 
Nested classes/interfaces inherited from interface rails.game.special.SpecialPropertyI
SpecialPropertyI.Priority
 
Field Summary
 
Fields inherited from class rails.game.special.SpecialProperty
closingValue, conditionText, description, exercised, gameManager, holder, isORProperty, isSRProperty, lastIndex, log, originalCompany, permanent, priority, spMap, transferText, uniqueId, usableDuringOR, usableDuringSR, usableDuringTileLayingStep, usableDuringTokenLayingStep, usableIfOwnedByCompany, usableIfOwnedByPlayer, whenText
 
Fields inherited from interface rails.game.special.SpecialPropertyI
DEFAULT_PRIORITY
 
Fields inherited from interface rails.game.move.Moveable
AT_END
 
Constructor Summary
SellBonusToken()
           
 
Method Summary
 void configureFromXML(Tag tag)
          Instructs the component to configure itself from the provided XML element.
 void finishConfiguration(GameManagerI gameManager)
          This method is intended to be called for each configurable component, to perforn any initialisation activities that require any other components to be initialised first.
 java.lang.String getLocationNameString()
           
 java.util.List<MapHex> getLocations()
           
 java.lang.String getName()
           
 int getPrice()
           
 CashHolder getSeller()
           
 int getValue()
           
 boolean isExecutionable()
           
 boolean isExercised()
           
 void makeResellable()
           
 void setExercised()
           
 void setSeller(CashHolder seller)
           
 java.lang.String toString()
           
 
Methods inherited from class rails.game.special.SpecialProperty
getByUniqueId, getClosingValue, getHelp, getHolder, getInfo, getOriginalCompany, getPriority, getTransferText, getUniqueId, init, isORProperty, isSRProperty, isUsableDuringOR, isUsableDuringSR, isUsableDuringTileLayingStep, isUsableDuringTokenLayingStep, isUsableIfOwnedByCompany, isUsableIfOwnedByPlayer, moveTo, setCompany, setExercised, setHolder, setPriority, setUsableDuringOR, setUsableDuringSR, setUsableDuringTileLayingStep, setUsableDuringTokenLayingStep, setUsableIfOwnedByCompany, setUsableIfOwnedByPlayer, toMenu
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SellBonusToken

public SellBonusToken()
Method Detail

configureFromXML

public void configureFromXML(Tag tag)
                      throws ConfigurationException
Description copied from interface: ConfigurableComponentI
Instructs the component to configure itself from the provided XML element.

Specified by:
configureFromXML in interface ConfigurableComponentI
Overrides:
configureFromXML in class SpecialProperty
Throws:
ConfigurationException

finishConfiguration

public void finishConfiguration(GameManagerI gameManager)
                         throws ConfigurationException
Description copied from interface: ConfigurableComponentI
This method is intended to be called for each configurable component, to perforn any initialisation activities that require any other components to be initialised first. This includes creating any required relationships to other configured components and objects.

This method should be called where necessary after all XML file parsing has completed, so that all objects that need to be related to do exist.

Specified by:
finishConfiguration in interface ConfigurableComponentI
Overrides:
finishConfiguration in class SpecialProperty
Parameters:
gameManager - The 'parent' configurable component is passed to allow the 'child' to access any other object without the need to resort to static calls where possible.
Throws:
ConfigurationException

setExercised

public void setExercised()
Specified by:
setExercised in interface SpecialPropertyI
Overrides:
setExercised in class SpecialProperty

makeResellable

public void makeResellable()

isExercised

public boolean isExercised()
Specified by:
isExercised in interface SpecialPropertyI
Overrides:
isExercised in class SpecialProperty

isExecutionable

public boolean isExecutionable()

getLocations

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

getLocationNameString

public java.lang.String getLocationNameString()

getName

public java.lang.String getName()

getPrice

public int getPrice()

getValue

public int getValue()

getSeller

public CashHolder getSeller()

setSeller

public void setSeller(CashHolder seller)

toString

public java.lang.String toString()
Overrides:
toString in class SpecialProperty