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)
           
 void deleteStation(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 getLifeTime()
          get the life time of the building
abstract  int getMaintenancePrice()
          get maintenance price for the month
 void restore()
           
 void setClient(ClientGame client)
          set the client
 void setServer(ServerGame server)
          set the server
 void update(int generation)
           
 
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

update

public void update(int generation)
Parameters:
generation -

askUpdate

public void askUpdate(int level)

askRestore

public void askRestore()

restore

public void restore()

deleteStation

public void deleteStation(java.lang.String message)

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

getMaintenancePrice

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

Returns:
exploitation price