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()
           
abstract  void computePollution()
           
abstract  void computeProduction()
           
 void computeRenovationPrice()
           
 int getBuildingRate()
          get the rate building of the power station
 int getLife()
          get the restant life of the plant : 100 to 0...
 int getMaintenancePrice()
          compute maintenance price per frame use useRate, age, ...
 java.lang.String getName()
           
 int getPollution()
           
 PowerStationType getPowerStationType()
          get type of this power station
 int getProduction()
           
 int getRenovationPrice()
           
 int getUseRate()
           
 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()
           
 
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
 

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

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()

getRenovationPrice

public int getRenovationPrice()

getMaintenancePrice

public int getMaintenancePrice()
compute maintenance price per frame use useRate, age, ...

Specified by:
getMaintenancePrice in class EnergyProviderBuilding
Returns:

isJustBuilt

public boolean isJustBuilt()

getPowerStationType

public PowerStationType getPowerStationType()
get type of this power station

Returns:

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:

getLife

public int getLife()
get the restant life of the plant : 100 to 0...

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)