Package jfreerails.controller

Provides classes that may be used by the client or the server to operate on the game world, for example, building trains and stations.


Interface Summary
ClientControlInterface Defines the methods that the server can call on a client using a Message2Client.
FreerailsServerSerializable Tags classes that the server may need to save but which won't be sent to clients.
GraphExplorer This interface lets the caller explorer a graph while hiding the way the graph is stored.
IncrementalPathFinder Defines part of the contract for a pathfinder whose search can be completed in several steps.
Message2Client Defines a command sent from the server to the client.
Message2Server Defines a command sent from a client to the server.
ModelRoot Defines methods and constants that GUI classes can use to access shared data.
MoveExecutor Lets the caller try and execute Moves.
PreMove Defines a method that generates a move based on the state of the world object.
ServerControlInterface Defines the methods that a client can call on the server using a Message2Server.

Class Summary
AddStationPreMove Generates a move that adds or upgrades a station.
BalanceSheetGenerator Generates the balance sheet - note, its fields are read using reflection so don't change their names.
BuildTrackExplorer GraphExplorer that explorers possible track placements, the ints it returns are encoded PositionOnTrack objects.
BuildTrackStrategy A BuildTrackStrategy determines which track types to build (or upgrade to) on different terrains.
CalcCargoSupplyRateAtStation This class probes the tiles adjacent to a station for what cargo they supply, demand, and convert and then returns a vector of these rates.
CalcNearestCity Class to find the nearest city and return that name, so that a station can be named appropriately.
CargoElementObject Small data object to store the rate of supply of a cargo.
CopyableTextJPanel Displays text that can be selected with the mouse and copied to the clipboard.
DropOffAndPickupCargoMoveGenerator This class generates moves that transfer cargo between train and the stations it stops at - it also handles cargo conversions that occur when cargo is dropped off.
DropOffAndPickupCargoMoveGenerator.WagonLoad Stores the type and quanity of cargo in a wagon.
FinancialDataGatherer Gathers the financial data for a company.
FinancialMoveProducer Not yet implemented
FlatTrackExplorer GraphExplorer that explorers track, the ints it returns are encoded PositionOnTrack objects.
JFrameMinimumSizeEnforcer Since there is no setMinimum size method on JFrame, we use an instance of this class to do the job.
MessageStatus An instance of this class is returned to the client (the server) when a Message2Server (Message2Client) is executed by the server (the client).
MoveTrainPreMove Generates moves for changes in train position and stops at stations.
MyDisplayMode Stores a DisplayMode and provides a customised implementation of toString that can be used in menus.
NetWorthCalculator A TransactionAggregator that calculates the networth of a player by totalling the value of their assets.
OpenList An OpenList for SimpleAStarPathFinder.
PathOnTrackFinder Finds a path along existing track.
PreMoveStatus Records the success or failure of an attempt to execute a move.
ProcessCargoAtStationMoveGenerator This class generates Moves that pay the player for delivering the cargo.
RandomPathFinder Returns a random path along the track.
ScreenHandler Handles going into fullscreen mode and setting buffer strategy etc.
SimpleAStarPathFinder A simple A* pathfinder implementation.
SimpleMoveExecutor A MoveExecutor that executes moves on the world object passed to its constructor.
StationBuilder Class to build a station at a given point, names station after nearest city.
StockPriceCalculator Calculates the stock price for each of the players.
TimeTickPreMove Generates a TimeTickMove.
ToAndFroPathIterator Returns a path that goes forwards and backwards along the path passed to its constructor.
TrackMoveProducer Provides methods that generate moves that build, upgrade, and remove track.
TrackPathFinder Finds the best route to build track between two points.
TrainAccessor Provides convenience methods to access the properties of a train from the world object.
TrainPathIntIterator FlatTrackExplorer to FreerailsIntIterator adapter.
VerifyStationName Class to verify that the chosen name for a station hasn't already been taken by another station.

Enum Summary

Exception Summary
PathNotFoundException Thrown when a path cannot be found.

Package jfreerails.controller Description

Provides classes that may be used by the client or the server to operate on the game world, for example, building trains and stations. The classes in this package do not make changes to the game world directly, instead, changes are encapsulated in objects referred to as moves. See the package jfreerails.move for more details.