jfreerails.move
Class TrackMoveTransactionsGenerator
java.lang.Object
jfreerails.move.TrackMoveTransactionsGenerator
public class TrackMoveTransactionsGenerator
- extends java.lang.Object
This class calculates the cost of a series of track moves. The motivation for
separating this code from the code that generates track moves is that the
transactions will be generated by the server whereas the track moves will be
generated by a client.
- Author:
- Luke Lindsay
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
trackAdded
private int[] trackAdded
- Number of each of the track types added.
fixedCostsStations
private long fixedCostsStations
fixedCostsBridges
private long fixedCostsBridges
trackRemoved
private int[] trackRemoved
- Number of each of the track types removed.
principal
private final FreerailsPrincipal principal
transactions
private final java.util.ArrayList<Transaction> transactions
w
private final ReadOnlyWorld w
TrackMoveTransactionsGenerator
public TrackMoveTransactionsGenerator(ReadOnlyWorld world,
FreerailsPrincipal p)
- Parameters:
p - the Principal on behalf of which this object generates
transactions for
addTransactions
public CompositeMove addTransactions(Move move)
unpackMove
private void unpackMove(Move move)
processMove
private void processMove(ChangeTrackPieceMove move)
generateTransactions
private void generateTransactions()