ch.sahits.game.openpatrician.model.building
Interface ITradingOffice

All Superinterfaces:
IBuilding
All Known Implementing Classes:
TradingOffice

public interface ITradingOffice
extends IBuilding

The trading office (Kontor) is the trading point in a city. You can buy/sell between the trading office and the city. You can move wares and wares between your storage and any ship currently in the city.

Author:
Andi Hotz, (c) Sahits GmbH, 2011 Created on Dec 17, 2011

Method Summary
 IBalanceSheet getBalanceLastWeek()
          Retrieve the balance sheet for last completed week.
 int getCapacity()
          Retrieve the storage capacity of the trading office and all other storages in the same city
 IBalanceSheet getCurrentWeek()
          Retrieve the balance sheet for the current week
 IAutomatedTrading getOfficeTrading()
          Get the trading object of the office
 ISteward getSteward()
          Retrieve the steward of the trading office (manager).
 IStorage getStorage()
          Retrieve an overview over the storage
 int getStored()
          Retrieve the total amount of the stored goods
 AmountablePrice getWare(IWare ware)
          Retrieve the amount of ware in storage
 IWeaponStorage getWeaponStorage()
          Retrieve the weapon storage for this trading office
 boolean hasWeapons()
          check if there are any weapons in storage
 int move(IWare ware, int amount)
          Add or remove ware from the storage.
 int move(IWare ware, int moved, int avgPrice)
          Move the ware into/from the storage with a price attached.
 int move(IWeapon weapons, int amount)
          Add or remove weapon from the storage.
 
Methods inherited from interface ch.sahits.game.openpatrician.model.building.IBuilding
getOwner, getPropertyTax, getValue
 

Method Detail

getWare

AmountablePrice getWare(IWare ware)
Retrieve the amount of ware in storage

Parameters:
ware -
Returns:

hasWeapons

boolean hasWeapons()
check if there are any weapons in storage

Returns:

move

int move(IWare ware,
         int amount)
Add or remove ware from the storage. If the amount is negative it will be removed. If the full amount is not available only the available will be moved and returned. The amount is in the ware specific size. The price of the wares is computed based on the amount

Parameters:
ware -
amount -
Returns:
amount moved

move

int move(IWeapon weapons,
         int amount)
Add or remove weapon from the storage. If the amount is negative it will be removed. If the full amount is not available only the available will be moved and returned. The amount is in the ware specific size.

Parameters:
weapons -
amount -
Returns:
amount moved

getCapacity

int getCapacity()
Retrieve the storage capacity of the trading office and all other storages in the same city

Returns:
storage capacity in barrels

getStored

int getStored()
Retrieve the total amount of the stored goods

Returns:
number of stored barrels

move

int move(IWare ware,
         int moved,
         int avgPrice)
Move the ware into/from the storage with a price attached.

Parameters:
ware - to be moved
moved - amount to be moved
avgPrice - average price to use on the amount of ware

getBalanceLastWeek

IBalanceSheet getBalanceLastWeek()
Retrieve the balance sheet for last completed week.

Returns:

getCurrentWeek

IBalanceSheet getCurrentWeek()
Retrieve the balance sheet for the current week

Returns:

getSteward

ISteward getSteward()
Retrieve the steward of the trading office (manager). May be null if no manager is employed

Returns:

getOfficeTrading

IAutomatedTrading getOfficeTrading()
Get the trading object of the office

Returns:

getWeaponStorage

IWeaponStorage getWeaponStorage()
Retrieve the weapon storage for this trading office

Returns:

getStorage

IStorage getStorage()
Retrieve an overview over the storage

Returns:


Copyright © 2011-2012 Sahits GmbH. All Rights Reserved.