Class: TradeManager

TradeManager()

new TradeManager()

Source:

Classes

TradeManager

Members

Config

Source:

[undefined]

Source:

minimalGain

Source:

potentialTradeRoute

Source:

potentialTradeRoute

Source:

potentialTradeRoute

Source:

potentialTradeRoute

Source:

potentialTradeRoute

Source:

routeProspection

Source:

routeProspection

Source:

routeProspection

Source:

routeProspection

Source:

targetNumTraders

Source:

targetNumTraders

Source:

tradeRoute

Source:

tradeRoute

Source:

tradeRoute

Source:

tradeRoute

Source:

tradeRoute

Source:

traders

Source:

warnedAllies

Source:

warnedAllies[undefined]

Source:

Methods

Deserialize()

Source:

Serialize()

Source:

activateProspection()

Source:

assignTrader()

Source:

checkEvents()

Source:

checkRoutes()

fills the best trade route in this.tradeRoute and the best potential route in this.potentialTradeRoute If an index is given, it returns the best route with this index or the best land route if index is a land index
Source:

checkTrader()

Called when a market was built or destroyed, and checks if trader orders should be changed
Source:

hasTradeRoute()

Source:

init()

Source:

isNewMarketWorth()

Source:

performBarter()

Try to barter unneeded resources for needed resources. only once per turn because the info is not updated within a turn
Source:

prospectForNewMarket()

Source:

setTradingGoods()

Source:

trainMoreTraders()

Source:

update()

Source:

updateTrader()

Source:

TradeManager()

Manage the trade

Constructor

new TradeManager()

Source:

Classes

TradeManager

Members

Config

Source:

[undefined]

Source:

minimalGain

Source:

potentialTradeRoute

Source:

potentialTradeRoute

Source:

potentialTradeRoute

Source:

potentialTradeRoute

Source:

potentialTradeRoute

Source:

routeProspection

Source:

routeProspection

Source:

routeProspection

Source:

routeProspection

Source:

targetNumTraders

Source:

targetNumTraders

Source:

tradeRoute

Source:

tradeRoute

Source:

tradeRoute

Source:

tradeRoute

Source:

tradeRoute

Source:

traders

Source:

warnedAllies

Source:

warnedAllies[undefined]

Source:

Methods

Deserialize()

Source:

Serialize()

Source:

activateProspection()

Source:

assignTrader()

Source:

checkEvents()

Source:

checkRoutes()

fills the best trade route in this.tradeRoute and the best potential route in this.potentialTradeRoute If an index is given, it returns the best route with this index or the best land route if index is a land index
Source:

checkTrader()

Called when a market was built or destroyed, and checks if trader orders should be changed
Source:

hasTradeRoute()

Source:

init()

Source:

isNewMarketWorth()

Source:

performBarter()

Try to barter unneeded resources for needed resources. only once per turn because the info is not updated within a turn
Source:

prospectForNewMarket()

Source:

setTradingGoods()

Source:

trainMoreTraders()

Source:

update()

Source:

updateTrader()

Source: