|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectenergyTycoon.powerStation.EnergyProviderBuilding
energyTycoon.powerStation.Battery
public class Battery
Field Summary | |
---|---|
static int |
CELL_CAPACITY
|
Constructor Summary | |
---|---|
Battery(ClientGame client,
FullPlayer player)
|
|
Battery(ServerGame server,
FullPlayer player)
|
Method Summary | |
---|---|
void |
addCapacity(int nbCells)
Ajout de la capacité des batteries en fonction du nombre de cellules achetées |
int |
addToStock(int quantity)
save some energy on battery |
void |
compute(int time)
compute the battery (loose energy, explode, ...) |
void |
computeMaintenancePrice()
|
void |
computeRenovationPrice()
|
int |
getCapacity()
|
int |
getFromStock(int quantity)
take back some energy on the battery |
int |
getLife()
get the restant life of the plant : 100 to 0... |
int |
getMaintenancePrice()
get maintenance price for the month |
java.lang.String |
getNetworkDefinition()
|
int |
getStock()
|
void |
setCapacity(int capa)
Change capacity |
void |
setLastRenovationDate(int date)
|
void |
setMaintenancePrice(int price)
|
void |
setStock(int stock)
change stock |
Methods inherited from class energyTycoon.powerStation.EnergyProviderBuilding |
---|
askRestore, askUpdate, computeMonthlyUsePrice, explode, getConstructionDate, getGeneration, getId, getLastRenovationDate, getLifeTime, getMonthlyUsePrice, getPowerStationType, getRenovationPrice, restore, setClient, setPowerStationType, setServer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CELL_CAPACITY
Constructor Detail |
---|
public Battery(ServerGame server, FullPlayer player)
public Battery(ClientGame client, FullPlayer player)
Method Detail |
---|
public int getCapacity()
public int getStock()
public int addToStock(int quantity)
quantity
- quantity of energy to stock
public int getFromStock(int quantity)
quantity
- quantity to get from stock
public void addCapacity(int nbCells)
nbCells
- : cells number in your batterypublic void compute(int time)
time
- time in secondpublic int getMaintenancePrice()
EnergyProviderBuilding
getMaintenancePrice
in class EnergyProviderBuilding
public void computeMaintenancePrice()
public void computeRenovationPrice()
public void setMaintenancePrice(int price)
public void setLastRenovationDate(int date)
public java.lang.String getNetworkDefinition()
public void setStock(int stock)
stock
- public void setCapacity(int capa)
capa
- public int getLife()
EnergyProviderBuilding
getLife
in class EnergyProviderBuilding
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |