rails.game.specific._18AL
Class AssignNamedTrains

java.lang.Object
  extended by rails.game.action.PossibleAction
      extended by rails.game.action.PossibleORAction
          extended by rails.game.action.UseSpecialProperty
              extended by rails.game.specific._18AL.AssignNamedTrains
All Implemented Interfaces:
java.io.Serializable

public class AssignNamedTrains
extends UseSpecialProperty

See Also:
Serialized Form

Field Summary
(package private)  int numberOfTokens
           
(package private)  int numberOfTrains
           
static long serialVersionUID
           
 
Fields inherited from class rails.game.action.UseSpecialProperty
specialProperty
 
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
AssignNamedTrains(NameTrains namedTrainsSpecialProperty, java.util.List<TrainI> trains)
           
 
Method Summary
 boolean equalsAsAction(PossibleAction action)
          Compare the chosen actions of two action objects.
 java.util.List<NameableTrain> getNameableTrains()
           
 java.util.List<NameableTrain> getPostTrainPerToken()
           
 java.util.List<NameableTrain> getPreTrainPerToken()
           
 java.util.List<NamedTrainToken> getTokens()
           
 void setPostTrainPerToken(java.util.List<NameableTrain> postTokensPerTrain)
           
 java.lang.String toMenu()
          Default version of an Menu item text.
 java.lang.String toString()
           
 
Methods inherited from class rails.game.action.UseSpecialProperty
equalsAsOption, getSpecialProperty
 
Methods inherited from class rails.game.action.PossibleORAction
getCompany, getCompanyName, setCompany
 
Methods inherited from class rails.game.action.PossibleAction
getCompanyManager, getGameManager, getPlayerIndex, getPlayerName, hasActed, setActed, setPlayerName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numberOfTrains

int numberOfTrains

numberOfTokens

int numberOfTokens

serialVersionUID

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

AssignNamedTrains

public AssignNamedTrains(NameTrains namedTrainsSpecialProperty,
                         java.util.List<TrainI> trains)
Method Detail

equalsAsAction

public boolean equalsAsAction(PossibleAction action)
Description copied from class: PossibleAction
Compare the chosen actions of two action objects. In other words: the client-set (posterior) attributes must be compared, in addition to those server-set (prior) attributes that sufficiently identify the action.

This method is used by the server (engine) to check if two action objects represent the same actual action, as is done when reloading a saved file (i.e. loading a later stage of the same game).

Overrides:
equalsAsAction in class UseSpecialProperty
Parameters:
action - Another PossibleAction to compare with.
Returns:
True if the compared PossibleAction object has equal selected action values.

toMenu

public java.lang.String toMenu()
Description copied from class: PossibleAction
Default version of an Menu item text. To be overridden where useful.

Overrides:
toMenu in class UseSpecialProperty

toString

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

getTokens

public java.util.List<NamedTrainToken> getTokens()

getNameableTrains

public java.util.List<NameableTrain> getNameableTrains()

getPreTrainPerToken

public java.util.List<NameableTrain> getPreTrainPerToken()

getPostTrainPerToken

public java.util.List<NameableTrain> getPostTrainPerToken()

setPostTrainPerToken

public void setPostTrainPerToken(java.util.List<NameableTrain> postTokensPerTrain)