evolution.actions
Class Constructing

evolution.actions.Action
  |
  +--evolution.actions.Constructing

public class Constructing
extends Action

Construction of a building.


Constructor Summary
Constructing()
          Constructor for the constructing-action.

Method Summary
 protected void_perform(Human human)
          Extra things which should be done when this action's perform method is called.
 protected booleancanBePerformedOn(SquareOfLand square)
          Checks whether this constructing-action can be performed on the given square of land.
 protected voiddoChecks(Human human)
          Checks if this construction-action can be performed by the human on the selected square of land.
 protected ConstructiongetConstruction()
          Return the construction of this constructing-action.
 protected MapgetProducesLandResources()
          Returns a map of the names of landresources that are produced by this constructing-action.
 protected MapgetProducesResources()
          Returns a map of the names of resources that are produced by this constructing-action.
 protected MapgetUsesLandResources()
          Returns a map of the names of landresources that are used by this constructing-action.
 protected MapgetUsesResources()
          Returns a map of the names of resources that are used by this constructing-action.
 protected voidsetConstruction(Construction construction)
          Set the construction of this constructing-action.

Methods inherited from class evolution.actions.Action
calculateSquareValue, findSquare, getName, hasEnoughResources, isEnergyBufferAction, modifyLandResources, modifyResources, perform, performEnergyBuffer

Constructor Detail

Constructing

public Constructing()
Constructor for the constructing-action.
Method Detail

_perform

protected void _perform(Human human)
throws evolution.resources.NotEnoughResourcesException,
IllegalLandTypeException,
evolution.lands.NotEnoughLandResourcesException
Extra things which should be done when this action's perform method is called. Template method.

canBePerformedOn

protected boolean canBePerformedOn(SquareOfLand square)
Checks whether this constructing-action can be performed on the given square of land.

doChecks

protected void doChecks(Human human)
throws evolution.resources.NotEnoughResourcesException,
IllegalLandTypeException,
evolution.lands.NotEnoughLandResourcesException
Checks if this construction-action can be performed by the human on the selected square of land. If not, some exception will be thrown.

getConstruction

protected Construction getConstruction()
Return the construction of this constructing-action.

getProducesLandResources

protected Map getProducesLandResources()
Returns a map of the names of landresources that are produced by this constructing-action.

getProducesResources

protected Map getProducesResources()
Returns a map of the names of resources that are produced by this constructing-action.

getUsesLandResources

protected Map getUsesLandResources()
Returns a map of the names of landresources that are used by this constructing-action.

getUsesResources

protected Map getUsesResources()
Returns a map of the names of resources that are used by this constructing-action.

setConstruction

protected void setConstruction(Construction construction)
Set the construction of this constructing-action.

Association Links

to Class evolution.constructions.Construction

The construction of this constructing-action.

Supplier Cardinality 1

a gvijf production