| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Abstract class of constructions.
Constructor Summary | |
protected | Construction() Create a new construction. |
| Construction(List squares) Create a new construction. |
Method Summary | |
protected abstract void | _evolve(double percentage) Additional things which should be done when this construction's evolve method is called. |
void | construct(double inc) Construct some percents of this construction. |
protected void | doChecks(double percentage) The checks which are made in evolve. |
void | evolve(double percentage) The evolution for the construction when Evolution ticks time. |
double | getConstructionState() The percentage of construction. |
InfoList | getInfo() An InfoList with the properties of this building. |
String | getName() Returns the name of the construction. |
double | getPriority() Returns the priority of this construction. |
protected Map | getProducesResources() Returns a map of the names of resources that are produced by this action. |
int | getSize() Returns the size of the construction. |
List | getSquares() The squares where this construction is build on. |
String | getState() |
protected Map | getUsesLandResources() Returns a map of the names of landresources that are used by this action. |
protected Map | getUsesResources() Returns a map of the names of resources that are used by this action. |
boolean | hasEnoughResources(double percentage) Checks whether this construction had enough worldresources to be performed. |
boolean | isBeingBuild() Is this construction being build? |
boolean | isProduction() Is this construction in production state? |
boolean | isWorking() Is this construction working? |
double | maxEnergyProduction(Map maxProduction, Map leftOver) Return the maximum energy production of this evolver. |
protected void | modifyLandResources(List squares, Map resources, double mul) Modify the land resources for this construction. |
protected void | modifyResources(Map resources, double mul) Modify the world resources for this construction. |
boolean | producesEnergy() Does this evolver produce energy? |
List | producesResourcesNames() A list with the names of the resources produced by this construction. |
protected void | setSquares(List squares) Set the squares where this construction is standing. |
protected void | setWorking(boolean w) Change the working state of this construction. |
protected void | signalStateChange() Signal a SquareChangedEvt on every square of this construction. |
Constructor Detail |
protected Construction()
public Construction(List squares)
Method Detail |
protected abstract void _evolve(double percentage)
public void construct(double inc)
protected void doChecks(double percentage)
throws evolution.resources.NotEnoughResourcesException
public void evolve(double percentage)
public double getConstructionState()
public InfoList getInfo()
public String getName()
public double getPriority()
protected Map getProducesResources()
public int getSize()
public List getSquares()
public String getState()
protected Map getUsesLandResources()
protected Map getUsesResources()
public boolean hasEnoughResources(double percentage)
public boolean isBeingBuild()
public boolean isProduction()
public boolean isWorking()
public double maxEnergyProduction(Map maxProduction, Map leftOver)
protected void modifyLandResources(List squares, Map resources, double mul)
throws evolution.lands.NotEnoughLandResourcesException
protected void modifyResources(Map resources, double mul)
throws evolution.resources.NotEnoughResourcesException
public boolean producesEnergy()
public List producesResourcesNames()
protected void setSquares(List squares)
protected void setWorking(boolean w)
protected void signalStateChange()
Association Links |
| a gvijf production | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |