energyTycoon.powerStation
Class PowerStation

java.lang.Object
  extended by energyTycoon.powerStation.EnergyProviderBuilding
      extended by energyTycoon.powerStation.PowerStation
Direct Known Subclasses:
CoalCentral, NuclearStation, SolarPanel, Weir, WindMachine

public abstract class PowerStation
extends EnergyProviderBuilding


Constructor Summary
PowerStation(ClientGame game, int stationId, FullPlayer player, PowerStationType powerStationType)
           
PowerStation(ServerGame game, int stationId, FullPlayer player, PowerStationType powerStationType)
           
 
Method Summary
 void askChangeUseRate(int rate)
           
 int compute(int time)
           
abstract  void computeMaintenancePrice()
           
 void computeName()
           
abstract  void computePollution()
           
abstract  void computeProduction()
           
 void computeRenovationPrice()
           
 int getBuildingRate()
          get the rate building of the power station
 int getMaintenancePrice()
          compute maintenance price per frame use useRate, age, ...
 java.lang.String getName()
           
 int getPollution()
           
 int getProduction()
           
 int getUseRate()
           
 boolean isBinaryUseRate()
           
 boolean isBuilt()
           
 boolean isJustBuilt()
           
 java.lang.String networkCreateDefinition()
          get network definition
 void setId(int id)
           
 void setName(java.lang.String name)
           
 void setPollution(int pollution)
           
 void setProduction(int prod)
          define power station production (used by client)
 void setUsePrice(int maintenancePrice)
           
 void setUseRate(int rate)
           
abstract  void testDead()
           
 void update(int generation)
           
 
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
 

Constructor Detail

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 -
Method Detail

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 -