Package horizons :: Package ai :: Package aiplayer :: Module internationaltrademanager :: Class InternationalTradeManager
[hide private]
[frames] | no frames]

Class InternationalTradeManager

source code

An object of this class manages the international trade routes of one AI player.

The current implementation is limited to one active route between each pair of our settlement and another player's settlement where each route can have at most one bought and one sold resource. The routes are automatically removed when they have been used once or when the ship gets destroyed.

Instance Methods [hide private]
 
__init__(self, owner) source code
 
_trade_mission_exists(self, settlement, settlement_manager)
Return a boolean showing whether there is a trade route between the settlements.
source code
 
_add_route(self)
Add a new international trade route if possible.
source code
 
tick(self) source code
Class Variables [hide private]
  log = logging.getLogger("ai.aiplayer.internationaltrade")