energyTycoon.powerStation
Class Battery
java.lang.Object
energyTycoon.powerStation.EnergyProviderBuilding
energyTycoon.powerStation.Battery
public class Battery
- extends EnergyProviderBuilding
Methods inherited from class energyTycoon.powerStation.EnergyProviderBuilding |
askRestore, askUpdate, deleteStation, getConstructionDate, getGeneration, getId, getLastRenovationDate, getLifeTime, restore, setClient, setServer, update |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CELL_CAPACITY
public static final int CELL_CAPACITY
- See Also:
- Constant Field Values
Battery
public Battery(ServerGame server,
int stationId,
FullPlayer player,
PowerStationType powerStationType)
Battery
public Battery(ClientGame client,
int stationId,
FullPlayer player,
PowerStationType powerStationType)
getCapacity
public int getCapacity()
getStock
public int getStock()
addToStock
public int addToStock(int quantity)
- save some energy on battery
- Parameters:
quantity
- quantity of energy to stock
- Returns:
- quantity of energy saved
getFromStock
public int getFromStock(int quantity)
- take back some energy on the battery
- Parameters:
quantity
- quantity to get from stock
- Returns:
- real quantity get
addCapacity
public void addCapacity(int nbCells)
- Ajout de la capacité des batteries en fonction du nombre de cellules achetées
- Parameters:
nbCells
- : cells number in your battery
compute
public void compute(int time)
- compute the battery (loose energy, explode, ...)
- Parameters:
time
- time in second
getMaintenancePrice
public int getMaintenancePrice()
- Description copied from class:
EnergyProviderBuilding
- get maintenance price for the month
- Specified by:
getMaintenancePrice
in class EnergyProviderBuilding
- Returns:
- exploitation price
computeMaintenancePrice
public void computeMaintenancePrice()