|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrails.game.Token
rails.game.BonusToken
public class BonusToken
A BonusToken object represents a token that a operating public company can place on the map to gain extra revenue or other privileges.
Such tokens are usually not placed in city slots, which are intended for base tokens, but on some unoccupied part of a tile.
| Field Summary | |
|---|---|
(package private) java.lang.String |
name
|
(package private) java.lang.Object |
removingObject
|
(package private) java.lang.String |
removingObjectDesc
|
(package private) PublicCompanyI |
user
|
(package private) int |
value
|
| Fields inherited from class rails.game.Token |
|---|
description, holder, log, uniqueId |
| Fields inherited from interface rails.game.move.Moveable |
|---|
AT_END |
| Constructor Summary | |
|---|---|
BonusToken()
Create a BonusToken. |
|
| Method Summary | |
|---|---|
void |
close()
Remove the token. |
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 |
getClosingInfo()
|
java.lang.String |
getName()
|
int |
getValue()
|
boolean |
isPlaced()
|
void |
prepareForRemoval(PhaseManager phaseManager)
Prepare the bonus token for removal, if so configured. |
void |
setUser(PublicCompanyI user)
|
java.lang.String |
toString()
|
| Methods inherited from class rails.game.Token |
|---|
equals, getByUniqueId, getHolder, getUniqueId, init, moveTo, setHolder |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int value
java.lang.String name
java.lang.String removingObjectDesc
java.lang.Object removingObject
PublicCompanyI user
| Constructor Detail |
|---|
public BonusToken()
| Method Detail |
|---|
public void configureFromXML(Tag tag)
throws ConfigurationException
ConfigurableComponentI
configureFromXML in interface ConfigurableComponentIConfigurationExceptionpublic void finishConfiguration(GameManagerI gameManager)
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.public void close()
close in interface Closeablepublic void prepareForRemoval(PhaseManager phaseManager)
public void setUser(PublicCompanyI user)
public boolean isPlaced()
public java.lang.String getName()
getName in interface MoveablegetName in interface TokenIpublic int getValue()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getClosingInfo()
getClosingInfo in interface Closeable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||