energyTycoon.customer
Class Industry

java.lang.Object
  extended by energyTycoon.customer.Customer
      extended by energyTycoon.customer.Industry

public class Industry
extends Customer


Constructor Summary
Industry(int id, Game game, java.lang.String name, int settingPrice, int developmentRate, int needed, boolean night)
          Constructor of the industry with parameters
 
Method Summary
 void compute(int time)
          Correspond to the method which compute all information each frame
 void computeFractionEnergy(int time)
          Compute the fraction of energy that each supplier will have to provide according the satisfaction
 void computeNewDevelopmentRate()
          Compute the growth of the industry through the time with random
 void computeNewSettingPrice()
          Compute the evolution of the setting price according the number of supplier
 void computeSatisfaction(int time)
          Compute the satisfaction of the supplier according various details
 double computeWorkEnergy()
          Compute the industry energy needed to work according the time
 java.lang.String getDefineMessage()
          Define the customer in a network string
 int getDevelopmentRate()
           
 int getEnergyNeeded()
          Assessor on energyNeeded
 Industry getIndustry()
           
 boolean getNightWork()
          Assessor on nightWork
 int getSettingPrice()
           
 boolean isIndustry()
           
 void setEnergyNeeded(int needed)
          Set the value of energyNeeded
 void setNightWork(boolean night)
          Set the value of nightWork
 
Methods inherited from class energyTycoon.customer.Customer
addProvider, getCity, getId, getName, isCity, setName, setSettingPrice
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Industry

public Industry(int id,
                Game game,
                java.lang.String name,
                int settingPrice,
                int developmentRate,
                int needed,
                boolean night)
Constructor of the industry with parameters

Parameters:
id -
game -
name -
settingPrice -
developmentRate -
needed -
night -
Method Detail

setEnergyNeeded

public void setEnergyNeeded(int needed)
Set the value of energyNeeded

Parameters:
needed -

setNightWork

public void setNightWork(boolean night)
Set the value of nightWork

Parameters:
night -

getNightWork

public boolean getNightWork()
Assessor on nightWork

Returns:

getEnergyNeeded

public int getEnergyNeeded()
Assessor on energyNeeded

Returns:

computeNewDevelopmentRate

public void computeNewDevelopmentRate()
Compute the growth of the industry through the time with random


computeNewSettingPrice

public void computeNewSettingPrice()
Compute the evolution of the setting price according the number of supplier


computeWorkEnergy

public double computeWorkEnergy()
Compute the industry energy needed to work according the time

Returns:

computeSatisfaction

public void computeSatisfaction(int time)
Compute the satisfaction of the supplier according various details

Parameters:
time -

computeFractionEnergy

public void computeFractionEnergy(int time)
Compute the fraction of energy that each supplier will have to provide according the satisfaction

Parameters:
time -

compute

public void compute(int time)
Correspond to the method which compute all information each frame

Specified by:
compute in class Customer
Parameters:
time -

getDevelopmentRate

public int getDevelopmentRate()

getSettingPrice

public int getSettingPrice()

getDefineMessage

public java.lang.String getDefineMessage()
Define the customer in a network string

Specified by:
getDefineMessage in class Customer
Returns:
network customer definition

isIndustry

public boolean isIndustry()
Overrides:
isIndustry in class Customer

getIndustry

public Industry getIndustry()
Overrides:
getIndustry in class Customer