energyTycoon.powerStation
Class EnergyProviderBuilding

java.lang.Object
  extended by energyTycoon.powerStation.EnergyProviderBuilding
Direct Known Subclasses:
Battery, PowerStation

public abstract class EnergyProviderBuilding
extends java.lang.Object


Constructor Summary
EnergyProviderBuilding(ClientGame client, int stationId, FullPlayer player, PowerStationType powerStationType)
          EnergyProviderBuilding constructor
EnergyProviderBuilding(ServerGame server, int stationId, FullPlayer player, PowerStationType powerStationType)
          EnergyProviderBuilding constructor
 
Method Summary
 void askRestore()
           
 void askUpdate(int level)
           
 long computeMonthlyUsePrice()
          compute the monthly use price
 void explode(int pollution, java.lang.String message)
           
 int getConstructionDate()
          Get the construction date
 int getGeneration()
          get power station generation
 int getId()
          get the building id
 int getLastRenovationDate()
          Last upgrade date
 int getLife()
          get the restant life of the plant : 100 to 0...
 int getLifeTime()
          get the life time of the building
abstract  int getMaintenancePrice()
          get maintenance price for the month
 long getMonthlyUsePrice()
          Get monthly use price
 PowerStationType getPowerStationType()
          get type of this power station
 int getRenovationPrice()
           
 void restore()
           
 void setClient(ClientGame client)
          set the client
 void setPowerStationType(PowerStationType powerStationType)
          set the new power station type of the central
 void setServer(ServerGame server)
          set the server
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnergyProviderBuilding

public EnergyProviderBuilding(ServerGame server,
                              int stationId,
                              FullPlayer player,
                              PowerStationType powerStationType)
EnergyProviderBuilding constructor

Parameters:
server -
player -
powerStationType -

EnergyProviderBuilding

public EnergyProviderBuilding(ClientGame client,
                              int stationId,
                              FullPlayer player,
                              PowerStationType powerStationType)
EnergyProviderBuilding constructor

Parameters:
client -
player -
powerStationType -
Method Detail

setServer

public void setServer(ServerGame server)
set the server

Parameters:
server -

setClient

public void setClient(ClientGame client)
set the client

Parameters:
client -

getConstructionDate

public int getConstructionDate()
Get the construction date


getLastRenovationDate

public int getLastRenovationDate()
Last upgrade date

Returns:
lastRenovationDate

askUpdate

public void askUpdate(int level)

askRestore

public void askRestore()

restore

public void restore()

explode

public void explode(int pollution,
                    java.lang.String message)

getMonthlyUsePrice

public long getMonthlyUsePrice()
Get monthly use price


getId

public int getId()
get the building id

Returns:
building id

getLifeTime

public int getLifeTime()
get the life time of the building

Returns:
life time

getGeneration

public int getGeneration()
get power station generation

Returns:
generation

setPowerStationType

public void setPowerStationType(PowerStationType powerStationType)
set the new power station type of the central

Parameters:
powerStationType -

getMaintenancePrice

public abstract int getMaintenancePrice()
get maintenance price for the month

Returns:
exploitation price

getPowerStationType

public PowerStationType getPowerStationType()
get type of this power station

Returns:

computeMonthlyUsePrice

public long computeMonthlyUsePrice()
compute the monthly use price


getRenovationPrice

public int getRenovationPrice()

getLife

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

Returns: