Package net.sf.freecol.common.model

This package contains the game model, which describes how the individual game objects, such as units, buildings, tiles and so on, interact.

See:
          Description

Interface Summary
Consumer Objects implementing the Consumer interface consume Goods.
FreeColGameObjectListener Interface for retriving information about a the creation/deletion of FreeColGameObjects.
Locatable An object that can be put in a Location.
Location A place where a Locatable can be put.
ModelController The ModelController is used by the model to perform tasks which cannot be done by the model.
Movable An object that can move from one Location to another under its own power.
Nameable An object with a name that can be changed.
Named An object that has a name.
Ownable Interface for objects which can be owned by a Player.
Specification.ChildReader  
TransactionListener Interface for classes which listen to transactions in market
 

Class Summary
Ability The Ability class encapsulates a bonus or penalty that can be applied to any action within the game, most obviously combat.
AbstractGoods Represents a certain amount of a GoodsType.
AbstractUnit Contains the information necessary to create a new unit.
BuildableType Contains information on buildable types.
Building Represents a building in a colony.
BuildingType Encapsulates data common to all instances of a particular kind of Building, such as the number of workplaces, and the types of goods it produces and consumes.
BuildQueue<T extends BuildableType>  
Colony Represents a colony.
ColonyTile Represents a work location on a tile.
ColonyTradeItem  
CombatModel  
DiplomaticTrade The class DiplomaticTrade represents an offer one player can make another.
EquipmentType  
Europe Represents Europe in the game.
EuropeanNationType Represents one of the European nations present in the game, i.e.
Event  
ExportData Objects of this class hold the export data for a particular type of goods.
Feature The Feature class encapsulates a bonus or penalty that can be applied to any action within the game, most obviously combat.
FeatureContainer  
FoundingFather Represents one FoundingFather to be contained in a Player object.
FreeColGameObject The superclass of all game objects in FreeCol.
FreeColGameObjectType The base class for all types defined by the specification.
FreeColObject  
Game The main component of the game model.
GameOptions Keeps track of the available game options.
GoldTradeItem  
Goods Represents locatable goods of a specified type and amount.
GoodsContainer Contains goods and can be used by a Location to make certain tasks easier.
GoodsLocation The GoodsLocation is a place where Units and Goods can be put.
GoodsTradeItem  
GoodsType  
HighScore  
HighSeas  
HistoryEvent  
IndianNationType Represents one of the Indian nations present in the game.
IndianSettlement Represents an Indian settlement.
LastSale This class contains the last sale a player has made, by Settlement and GoodsType.
Limit The Limit class encapsulates a limit on the availability of FreeColObjects.
LostCityRumour Represents a lost city rumour.
Map A rectangular isometric map.
Map.Position Represents a position on the Map.
Market This class implements a simple economic model where a market holds all goods to be sold and the price of a particular goods type is determined solely by its availability in that market.
MarketData Objects of this class hold the market data for a particular type of good.
ModelMessage Contains a message about a change in the model.
Modifier The Modifier class encapsulates a bonus or penalty that can be applied to any action within the game, most obviously combat.
Monarch This class implements the player's monarch, whose functions prior to the revolution include raising taxes, declaring war on other European countries, and occasionally providing military support.
Nation Represents one of the nations present in the game.
NationOptions  
NationSummary A summary of an enemy nation.
NationType Represents one of the nations present in the game.
Operand The Operand class implements Operands to be used in relations, such as the Limit class.
PathNode Represents a single Tile in a path.
Player Represents a player.
PlayerExploredTile This class contains the mutable tile data visible to a specific player.
ProductionCache The ProductionCache is contains all relevant information about the production and consumption of the colony.
ProductionInfo  
ProductionMap  
RandomRange  
Region A named region on the map.
Resource Represents a locatable goods of a specified type and quantity.
ResourceType  
Scope The Scope class determines whether a given FreeColGameObjectType fulfills certain requirements.
Settlement The super class of all settlements on the map (that is colonies and indian settlements).
SettlementType  
SimpleCombatModel This class implements the original Colonization combat model.
Specification This class encapsulates any parts of the "specification" for FreeCol that are expressed best using XML.
StanceTradeItem  
StringTemplate The StringTemplate represents a non-localized string that can be localized by looking up its value in a message bundle or similar Map.
Tension  
Tile Represents a single tile on the Map.
TileImprovement Represents a tile improvement, such as a river or road.
TileImprovementType  
TileItem Represents a TileItem item on a Tile.
TileItemContainer Contains TileItems and can be used by a Tile to make certain tasks easier.
TileType  
TradeItem One of the items a DiplomaticTrade consists of.
TradeRoute A TradeRoute holds all information for a unit to follow along a trade route.
TradeRouteStop  
Turn Represents a given turn in the game.
TypeCountMap<T extends FreeColGameObjectType>  
Unit Represents all pieces that can be moved on the map-board.
UnitLocation The UnitLocation is a place where a Unit can be put.
UnitTradeItem  
UnitType  
UnitTypeChange  
WorkLocation The WorkLocation is a place in a Colony where Units can work.
 

Enum Summary
BuildQueue.CompletionAction  
Colony.ColonyChangeEvent  
Colony.NoBuildReason  
CombatModel.CombatResult  
DiplomaticTrade.TradeStatus A type for the trade status.
Europe.MigrationType  
FoundingFather.FoundingFatherType  
HighScore.Level On retirement, an object will be named in honour of the player.
HistoryEvent.EventType  
Limit.Operator  
LostCityRumour.RumourType Constants describing types of Lost City Rumours.
Map.Direction The directions a Unit can move to.
Map.Layer The layers included in the map.
Market.Access Constant for specifying the access to this Market when selling goods.
ModelMessage.MessageType Constants describing the type of message.
Modifier.Type  
Monarch.MonarchAction Constants describing monarch actions.
NationOptions.Advantages National advantages for European players only.
NationOptions.NationState Nations may be available to all players, to AI players only, or to no players.
NationType.AggressionLevel  
NationType.SettlementNumber  
Operand.OperandType  
Operand.ScopeLevel  
Player.NoClaimReason A variety of reasons why a tile can not be claimed, either to found a settlement or just to be used by one, including the double negative NONE == "no reason" case.
Player.PlayerType The type of player.
Player.Stance Constants for describing the stance towards a player.
Region.RegionType  
Specification.TypeSelector TODO: replace with Predicates.
StringTemplate.TemplateType The type of this StringTemplate, either NAME, a proper name that must not be localized (e.g.
Tension.Level Constants for describing alarm levels.
TileType.RangeType  
Turn.Season  
Unit.MoveType A move type.
Unit.Role The roles a Unit can have.
Unit.UnitState A state a Unit can have.
UnitLocation.NoAddReason  
UnitTypeChange.ChangeType  
 

Package net.sf.freecol.common.model Description

This package contains the game model, which describes how the individual game objects, such as units, buildings, tiles and so on, interact. The model is extended by the server and used by the client. It should be independent of all packages outside of the common hierarchy.

The superclass of most model objects is FreeColObject, which provides serialization. The FreeColObject is identified by an ID, which is generally unique. The Feature class and its descendants is a notable exception to this rule, however, since Features with similar effects are provided by various model objects and are grouped by their ID. A fur production bonus, for example, might be granted by a Tile Type, a Unit Type and a Founding Father.

The main model objects inherit from the FreeColGameObject, which contains a reference to the Game class. Many model objects have a type, which inherits from the FreeColGameObjectType. Units have a UnitType, for example. These Game Object Types are defined by the Specification, which is loaded from an XML file when the game starts up.