jfreerails.move
Class TransferCargoAtStationMove

java.lang.Object
  extended by jfreerails.move.CompositeMove
      extended by jfreerails.move.TransferCargoAtStationMove
All Implemented Interfaces:
java.io.Serializable, Move, FreerailsSerializable

public class TransferCargoAtStationMove
extends CompositeMove

This CompositeMove transfers cargo from a train to a station and vice-versa.

Author:
Luke Lindsay
See Also:
Serialized Form

Field Summary
static int CHANGE_AT_STATION_INDEX
           
static int CHANGE_ON_TRAIN_INDEX
           
private static long serialVersionUID
           
private  boolean waitingForFullLoad
           
 
Constructor Summary
  TransferCargoAtStationMove(java.util.ArrayList<Move> movesArrayList, boolean waiting)
           
private TransferCargoAtStationMove(Move[] moves, boolean waiting)
           
 
Method Summary
static TransferCargoAtStationMove generateMove(ChangeCargoBundleMove changeAtStation, ChangeCargoBundleMove changeOnTrain, CompositeMove payment, boolean waiting)
           
 ChangeCargoBundleMove getChangeAtStation()
           
 ChangeCargoBundleMove getChangeOnTrain()
           
 FreerailsPrincipal getPrincipal()
          The player who is getting paid for the delivery.
 int getQuantityOfCargo(int cargoType)
           
 Money getRevenue()
           
 boolean isWaitingForFullLoad()
           
 
Methods inherited from class jfreerails.move.CompositeMove
compositeTest, doMove, equals, getMove, getMoves, hashCode, size, toString, tryDoMove, tryUndoMove, undoMove
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

CHANGE_ON_TRAIN_INDEX

public static final int CHANGE_ON_TRAIN_INDEX
See Also:
Constant Field Values

CHANGE_AT_STATION_INDEX

public static final int CHANGE_AT_STATION_INDEX
See Also:
Constant Field Values

waitingForFullLoad

private final boolean waitingForFullLoad
Constructor Detail

TransferCargoAtStationMove

private TransferCargoAtStationMove(Move[] moves,
                                   boolean waiting)

TransferCargoAtStationMove

public TransferCargoAtStationMove(java.util.ArrayList<Move> movesArrayList,
                                  boolean waiting)
Method Detail

generateMove

public static TransferCargoAtStationMove generateMove(ChangeCargoBundleMove changeAtStation,
                                                      ChangeCargoBundleMove changeOnTrain,
                                                      CompositeMove payment,
                                                      boolean waiting)

getChangeAtStation

public ChangeCargoBundleMove getChangeAtStation()

getChangeOnTrain

public ChangeCargoBundleMove getChangeOnTrain()

getRevenue

public Money getRevenue()

getQuantityOfCargo

public int getQuantityOfCargo(int cargoType)

getPrincipal

public FreerailsPrincipal getPrincipal()
The player who is getting paid for the delivery.


isWaitingForFullLoad

public boolean isWaitingForFullLoad()