|
||||||||||
| 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 ConfigurableComponentIConfigurationException
public void finishConfiguration(GameManagerI gameManager)
throws ConfigurationException
ConfigurableComponentIThis 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 ConfigurableComponentIgameManager - 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.
ConfigurationExceptionpublic int getUniqueId()
getUniqueId in interface SpecialPropertyIpublic static SpecialPropertyI getByUniqueId(int i)
public void setCompany(CompanyI company)
setCompany in interface SpecialPropertyIpublic CompanyI getOriginalCompany()
getOriginalCompany in interface SpecialPropertyIpublic void setHolder(MoveableHolder holder)
setHolder in interface SpecialPropertyIpublic MoveableHolder getHolder()
getHolder in interface MoveablegetHolder in interface SpecialPropertyIpublic boolean isUsableIfOwnedByCompany()
isUsableIfOwnedByCompany in interface SpecialPropertyIpublic void setUsableIfOwnedByCompany(boolean usableIfOwnedByCompany)
setUsableIfOwnedByCompany in interface SpecialPropertyIusableIfOwnedByCompany - The usableIfOwnedByCompany to set.public boolean isUsableIfOwnedByPlayer()
isUsableIfOwnedByPlayer in interface SpecialPropertyIpublic void setUsableIfOwnedByPlayer(boolean usableIfOwnedByPlayer)
setUsableIfOwnedByPlayer in interface SpecialPropertyIusableIfOwnedByPlayer - The usableIfOwnedByPlayer to set.public boolean isUsableDuringOR()
isUsableDuringOR in interface SpecialPropertyIpublic void setUsableDuringOR(boolean usableDuringOR)
setUsableDuringOR in interface SpecialPropertyIpublic boolean isUsableDuringSR()
isUsableDuringSR in interface SpecialPropertyIpublic void setUsableDuringSR(boolean usableDuringSR)
setUsableDuringSR in interface SpecialPropertyIpublic boolean isUsableDuringTileLayingStep()
isUsableDuringTileLayingStep in interface SpecialPropertyIpublic void setUsableDuringTileLayingStep(boolean usableDuringTileLayingStep)
setUsableDuringTileLayingStep in interface SpecialPropertyIpublic boolean isUsableDuringTokenLayingStep()
isUsableDuringTokenLayingStep in interface SpecialPropertyIpublic void setUsableDuringTokenLayingStep(boolean usableDuringTokenLayingStep)
setUsableDuringTokenLayingStep in interface SpecialPropertyIpublic void setExercised()
setExercised in interface SpecialPropertyIpublic void setExercised(boolean value)
public boolean isExercised()
isExercised in interface SpecialPropertyIpublic int getClosingValue()
public boolean isSRProperty()
isSRProperty in interface SpecialPropertyIpublic boolean isORProperty()
isORProperty in interface SpecialPropertyIpublic java.lang.String getTransferText()
getTransferText in interface SpecialPropertyIpublic SpecialPropertyI.Priority getPriority()
getPriority in interface SpecialPropertyIpublic void setPriority(SpecialPropertyI.Priority priority)
setPriority in interface SpecialPropertyIpublic void moveTo(MoveableHolder newHolder)
moveTo in interface MoveablemoveTo in interface SpecialPropertyIpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toMenu()
toMenu in interface SpecialPropertyIpublic java.lang.String getInfo()
getInfo in interface SpecialPropertyIpublic java.lang.String getHelp()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||