ch.sahits.game.openpatrician.model.building.impl
Class Storage

java.lang.Object
  extended by ch.sahits.game.openpatrician.model.building.impl.Storage
All Implemented Interfaces:
IStorage, IPeriodicalUpdate

public class Storage
extends Object
implements IStorage, IPeriodicalUpdate


Field Summary
private  ICity city
           
static int GUARD_COST_PER_DAY
           
private  int nbGuards
           
private  IPlayer owner
           
static int RENT_COST_PER_DAY_AND_BALE
           
private  int rentOutStorage
           
 
Constructor Summary
Storage(IPlayer owner, ICity city)
           
 
Method Summary
 int getCostsPerDay()
          Retrieve the daily cost for rent storage
 int getGuardCostsPerDay()
          Retrieve the costs for the guards
private  int getNbWareHouses()
          Retrieve the number of warehouses
 int getNumberGuards()
          Retrieve the number of guards
 int getRentOutStorage()
          Retrieve the amount of storage in barrels that is rented by someone else
 ELevel getSecurityLevel()
          Retrieve the security level
 void notify(DateObject date)
          The time defined as period has passed and it is now date
 void updateGuardsNumber(int update)
          Increase or decrease the number of guards
 void updateRendedSpace(int nbBarrels)
          Update the rented out space
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GUARD_COST_PER_DAY

public static final int GUARD_COST_PER_DAY
See Also:
Constant Field Values

RENT_COST_PER_DAY_AND_BALE

public static final int RENT_COST_PER_DAY_AND_BALE
See Also:
Constant Field Values

owner

private final IPlayer owner

city

private final ICity city

rentOutStorage

private int rentOutStorage

nbGuards

private int nbGuards
Constructor Detail

Storage

public Storage(IPlayer owner,
               ICity city)
Method Detail

getNbWareHouses

private int getNbWareHouses()
Retrieve the number of warehouses

Returns:

getRentOutStorage

public int getRentOutStorage()
Description copied from interface: IStorage
Retrieve the amount of storage in barrels that is rented by someone else

Specified by:
getRentOutStorage in interface IStorage
Returns:

updateRendedSpace

public void updateRendedSpace(int nbBarrels)
Description copied from interface: IStorage
Update the rented out space

Specified by:
updateRendedSpace in interface IStorage

getCostsPerDay

public int getCostsPerDay()
Description copied from interface: IStorage
Retrieve the daily cost for rent storage

Specified by:
getCostsPerDay in interface IStorage
Returns:

getNumberGuards

public int getNumberGuards()
Description copied from interface: IStorage
Retrieve the number of guards

Specified by:
getNumberGuards in interface IStorage
Returns:

getGuardCostsPerDay

public int getGuardCostsPerDay()
Description copied from interface: IStorage
Retrieve the costs for the guards

Specified by:
getGuardCostsPerDay in interface IStorage
Returns:

getSecurityLevel

public ELevel getSecurityLevel()
Description copied from interface: IStorage
Retrieve the security level

Specified by:
getSecurityLevel in interface IStorage
Returns:

updateGuardsNumber

public void updateGuardsNumber(int update)
Description copied from interface: IStorage
Increase or decrease the number of guards

Specified by:
updateGuardsNumber in interface IStorage

notify

public void notify(DateObject date)
Description copied from interface: IPeriodicalUpdate
The time defined as period has passed and it is now date

Specified by:
notify in interface IPeriodicalUpdate
Parameters:
date - current date time


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