|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrails.game.special.SpecialProperty
public abstract class SpecialProperty
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface rails.game.special.SpecialPropertyI |
---|
SpecialPropertyI.Priority |
Field Summary | |
---|---|
protected int |
closingValue
|
protected java.lang.String |
conditionText
|
protected java.lang.String |
description
Optional descriptive text, for display in menus and info text. |
protected BooleanState |
exercised
|
protected GameManagerI |
gameManager
To give subclasses access to the various 'managers' |
protected MoveableHolder |
holder
|
protected boolean |
isORProperty
|
protected boolean |
isSRProperty
|
protected static int |
lastIndex
|
protected static org.apache.log4j.Logger |
log
|
protected CompanyI |
originalCompany
|
protected boolean |
permanent
|
protected SpecialPropertyI.Priority |
priority
Priority indicates whether or not the UI should assign priority to the execution of a PossibleAction. |
protected static java.util.Map<java.lang.Integer,SpecialPropertyI> |
spMap
|
protected java.lang.String |
transferText
|
protected int |
uniqueId
|
protected boolean |
usableDuringOR
|
protected boolean |
usableDuringSR
|
protected boolean |
usableDuringTileLayingStep
|
protected boolean |
usableDuringTokenLayingStep
|
protected boolean |
usableIfOwnedByCompany
|
protected boolean |
usableIfOwnedByPlayer
|
protected java.lang.String |
whenText
|
Fields inherited from interface rails.game.special.SpecialPropertyI |
---|
DEFAULT_PRIORITY |
Fields inherited from interface rails.game.move.Moveable |
---|
AT_END |
Constructor Summary | |
---|---|
SpecialProperty()
|
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. |
static SpecialPropertyI |
getByUniqueId(int i)
|
int |
getClosingValue()
|
java.lang.String |
getHelp()
Default Help text: "You can " + the menu description |
MoveableHolder |
getHolder()
|
java.lang.String |
getInfo()
Default Info text. |
CompanyI |
getOriginalCompany()
|
SpecialPropertyI.Priority |
getPriority()
|
java.lang.String |
getTransferText()
|
int |
getUniqueId()
|
static void |
init()
|
boolean |
isExercised()
|
boolean |
isORProperty()
|
boolean |
isSRProperty()
|
boolean |
isUsableDuringOR()
|
boolean |
isUsableDuringSR()
|
boolean |
isUsableDuringTileLayingStep()
|
boolean |
isUsableDuringTokenLayingStep()
|
boolean |
isUsableIfOwnedByCompany()
|
boolean |
isUsableIfOwnedByPlayer()
|
void |
moveTo(MoveableHolder newHolder)
Move the special property to another holder. |
void |
setCompany(CompanyI company)
|
void |
setExercised()
|
void |
setExercised(boolean value)
|
void |
setHolder(MoveableHolder holder)
|
void |
setPriority(SpecialPropertyI.Priority priority)
|
void |
setUsableDuringOR(boolean usableDuringOR)
|
void |
setUsableDuringSR(boolean usableDuringSR)
|
void |
setUsableDuringTileLayingStep(boolean usableDuringTileLayingStep)
|
void |
setUsableDuringTokenLayingStep(boolean usableDuringTokenLayingStep)
|
void |
setUsableIfOwnedByCompany(boolean usableIfOwnedByCompany)
|
void |
setUsableIfOwnedByPlayer(boolean usableIfOwnedByPlayer)
|
java.lang.String |
toMenu()
Default menu item text, should be by all special properties that can appear as a menu item |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface rails.game.special.SpecialPropertyI |
---|
getName, isExecutionable |
Field Detail |
---|
protected CompanyI originalCompany
protected MoveableHolder holder
protected int closingValue
protected BooleanState exercised
protected boolean usableIfOwnedByPlayer
protected boolean usableIfOwnedByCompany
protected boolean usableDuringSR
protected boolean usableDuringOR
protected boolean usableDuringTileLayingStep
protected boolean usableDuringTokenLayingStep
protected java.lang.String conditionText
protected java.lang.String whenText
protected java.lang.String transferText
protected boolean permanent
protected boolean isORProperty
protected boolean isSRProperty
protected SpecialPropertyI.Priority priority
protected java.lang.String description
protected int uniqueId
protected GameManagerI gameManager
protected static java.util.Map<java.lang.Integer,SpecialPropertyI> spMap
protected static int lastIndex
protected static org.apache.log4j.Logger log
Constructor Detail |
---|
public SpecialProperty()
Method Detail |
---|
public static void init()
public void configureFromXML(Tag tag) throws ConfigurationException
ConfigurableComponentI
configureFromXML
in interface ConfigurableComponentI
ConfigurationException
public void finishConfiguration(GameManagerI gameManager) throws ConfigurationException
ConfigurableComponentI
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.
finishConfiguration
in interface ConfigurableComponentI
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.
ConfigurationException
public int getUniqueId()
getUniqueId
in interface SpecialPropertyI
public static SpecialPropertyI getByUniqueId(int i)
public void setCompany(CompanyI company)
setCompany
in interface SpecialPropertyI
public CompanyI getOriginalCompany()
getOriginalCompany
in interface SpecialPropertyI
public void setHolder(MoveableHolder holder)
setHolder
in interface SpecialPropertyI
public MoveableHolder getHolder()
getHolder
in interface Moveable
getHolder
in interface SpecialPropertyI
public boolean isUsableIfOwnedByCompany()
isUsableIfOwnedByCompany
in interface SpecialPropertyI
public void setUsableIfOwnedByCompany(boolean usableIfOwnedByCompany)
setUsableIfOwnedByCompany
in interface SpecialPropertyI
usableIfOwnedByCompany
- The usableIfOwnedByCompany to set.public boolean isUsableIfOwnedByPlayer()
isUsableIfOwnedByPlayer
in interface SpecialPropertyI
public void setUsableIfOwnedByPlayer(boolean usableIfOwnedByPlayer)
setUsableIfOwnedByPlayer
in interface SpecialPropertyI
usableIfOwnedByPlayer
- The usableIfOwnedByPlayer to set.public boolean isUsableDuringOR()
isUsableDuringOR
in interface SpecialPropertyI
public void setUsableDuringOR(boolean usableDuringOR)
setUsableDuringOR
in interface SpecialPropertyI
public boolean isUsableDuringSR()
isUsableDuringSR
in interface SpecialPropertyI
public void setUsableDuringSR(boolean usableDuringSR)
setUsableDuringSR
in interface SpecialPropertyI
public boolean isUsableDuringTileLayingStep()
isUsableDuringTileLayingStep
in interface SpecialPropertyI
public void setUsableDuringTileLayingStep(boolean usableDuringTileLayingStep)
setUsableDuringTileLayingStep
in interface SpecialPropertyI
public boolean isUsableDuringTokenLayingStep()
isUsableDuringTokenLayingStep
in interface SpecialPropertyI
public void setUsableDuringTokenLayingStep(boolean usableDuringTokenLayingStep)
setUsableDuringTokenLayingStep
in interface SpecialPropertyI
public void setExercised()
setExercised
in interface SpecialPropertyI
public void setExercised(boolean value)
public boolean isExercised()
isExercised
in interface SpecialPropertyI
public int getClosingValue()
public boolean isSRProperty()
isSRProperty
in interface SpecialPropertyI
public boolean isORProperty()
isORProperty
in interface SpecialPropertyI
public java.lang.String getTransferText()
getTransferText
in interface SpecialPropertyI
public SpecialPropertyI.Priority getPriority()
getPriority
in interface SpecialPropertyI
public void setPriority(SpecialPropertyI.Priority priority)
setPriority
in interface SpecialPropertyI
public void moveTo(MoveableHolder newHolder)
moveTo
in interface Moveable
moveTo
in interface SpecialPropertyI
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toMenu()
toMenu
in interface SpecialPropertyI
public java.lang.String getInfo()
getInfo
in interface SpecialPropertyI
public java.lang.String getHelp()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |