energyTycoon.powerStation
Class PowerStation
java.lang.Object
energyTycoon.powerStation.EnergyProviderBuilding
energyTycoon.powerStation.PowerStation
- Direct Known Subclasses:
- CoalCentral, NuclearStation, SolarPanel, Weir, WindMachine
public abstract class PowerStation
- extends EnergyProviderBuilding
Methods inherited from class energyTycoon.powerStation.EnergyProviderBuilding |
askRestore, askUpdate, computeMonthlyUsePrice, explode, getConstructionDate, getGeneration, getId, getLastRenovationDate, getLife, getLifeTime, getMonthlyUsePrice, getPowerStationType, getRenovationPrice, restore, setClient, setPowerStationType, setServer |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PowerStation
public PowerStation(ServerGame game,
int stationId,
FullPlayer player,
PowerStationType powerStationType)
- Parameters:
game
- player
- powerStationType
-
PowerStation
public PowerStation(ClientGame game,
int stationId,
FullPlayer player,
PowerStationType powerStationType)
- Parameters:
game
- player
- powerStationType
-
computeName
public void computeName()
getName
public java.lang.String getName()
getUseRate
public int getUseRate()
getPollution
public int getPollution()
getProduction
public int getProduction()
setProduction
public void setProduction(int prod)
- define power station production (used by client)
- Parameters:
prod
-
setUsePrice
public void setUsePrice(int maintenancePrice)
setPollution
public void setPollution(int pollution)
isBuilt
public boolean isBuilt()
getMaintenancePrice
public int getMaintenancePrice()
- compute maintenance price per frame
use useRate, age, ...
- Specified by:
getMaintenancePrice
in class EnergyProviderBuilding
- Returns:
isJustBuilt
public boolean isJustBuilt()
networkCreateDefinition
public java.lang.String networkCreateDefinition()
- get network definition
- Returns:
- string definition
getBuildingRate
public int getBuildingRate()
- get the rate building of the power station
- Returns:
setUseRate
public void setUseRate(int rate)
setName
public void setName(java.lang.String name)
askChangeUseRate
public void askChangeUseRate(int rate)
- Parameters:
rate
-
setId
public void setId(int id)
computeRenovationPrice
public void computeRenovationPrice()
computeMaintenancePrice
public abstract void computeMaintenancePrice()
computeProduction
public abstract void computeProduction()
computePollution
public abstract void computePollution()
testDead
public abstract void testDead()
compute
public int compute(int time)
isBinaryUseRate
public boolean isBinaryUseRate()
update
public void update(int generation)
- Parameters:
generation
-