| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
evolution.KnowledgeCatalog | +--evolution.constructions.ConstructionKnowledgeCatalog
KnowledgeCatalog for constructions.
Field Summary | |
protected static ConstructionKnowledgeCatalog | instance Instance of the singleton. |
Constructor Summary | |
protected | ConstructionKnowledgeCatalog(String fileName) Create a new KnowledgeCatalog from the given file. |
Method Summary | |
void | build(String constructionName, String shape, List humans, SquareOfLand sq) Build a construction. |
boolean | canBeBuildOn(String constructionName, String landType) Can this construction be build on the specified landtype? |
protected boolean | canStandOn(String construction, SquareOfLand sq, List humans) Checks if the construction can stand on the given square of land. |
protected boolean | canStandOn(String construction, List squares, List humans) Checks if the construction can stand on the given squares of land. |
boolean | canStandOnLandType(String construction, String landType) Checks if the construction can stand on the given landtype. |
boolean | constructionExists(String constructionName) Does this construction exist in the current game? |
int | countSquares(String shape) Return the squares used for this shape. |
List | getConstructionShapes(String constructionName) The shapes the given construction can be build in. |
InfoList | getConstructionsInfo() Return infolist for constructions. |
double | getConstructionSpeed(String constructionName) Get the speed at which this construction will be build. |
List | getConstructionTypes() Return the different types of constructions. |
static ConstructionKnowledgeCatalog | getInst() Return the instance of this singleton. |
double | getPriority(Construction construction) Get the priority of this construction. |
protected List | getSquares(SquareOfLand sq, String shape) Get the squares marked in the shape string with the given square as upper left corner. |
static void | initialize(String fileName) Initialize this singleton from the given file. |
protected void | instantiate(String constructionName, List squares) Instantiate the given construction on the given squares. |
boolean | isEnergyResource(String resourceName) Is the given resource in the produce energy chain? |
protected void | parseConstructions(String cstring) Parse the constructions-string. |
Map | producesLandResourcesConstructing(String construction) The landresources produced when constructing this construction. |
Map | producesResources(String constructionName) A map with as keys the resource and as value the amount the construction produces. |
Map | producesResourcesConstructing(String construction) The resources produced when constructing this construction. |
List | producesResourcesNames(String constructionName) A list with the names of the resources produced by a given construction. |
Map | usesLandResources(String constructionName) A map with as keys the landresource and as value the amount the construction uses. |
Map | usesLandResourcesConstructing(String construction) The landresources used for constructing this construction. |
Map | usesResources(String constructionName) A map with as keys the resource and as value the amount the construction uses. |
Map | usesResourcesConstructing(String construction) The resources used for constructing this construction. |
List | usesResourcesNames(String constructionName) A list with the names of the resources used by a given construction. |
Methods inherited from class evolution.KnowledgeCatalog |
dlClassForName, extractArgument, extractName, extractValue, getFileName, getProperty, getProperty, getResourcePath, isInitialized, makeStringDoubleMap, setResourcePath, split, stripPathFromClassName, stripPathFromClassName, stripPathFromClassName |
Field Detail |
protected static ConstructionKnowledgeCatalog instance
Constructor Detail |
protected ConstructionKnowledgeCatalog(String fileName)
throws java.io.IOException,
java.io.FileNotFoundException
Method Detail |
public void build(String constructionName, String shape, List humans, SquareOfLand sq)
throws evolution.lands.IllegalPlacementException
public boolean canBeBuildOn(String constructionName, String landType)
protected boolean canStandOn(String construction, SquareOfLand sq, List humans)
protected boolean canStandOn(String construction, List squares, List humans)
public boolean canStandOnLandType(String construction, String landType)
public boolean constructionExists(String constructionName)
public int countSquares(String shape)
public List getConstructionShapes(String constructionName)
public InfoList getConstructionsInfo()
public double getConstructionSpeed(String constructionName)
public List getConstructionTypes()
public static ConstructionKnowledgeCatalog getInst()
public double getPriority(Construction construction)
protected List getSquares(SquareOfLand sq, String shape)
public static void initialize(String fileName)
throws java.io.FileNotFoundException,
java.io.IOException
protected void instantiate(String constructionName, List squares)
public boolean isEnergyResource(String resourceName)
protected void parseConstructions(String cstring)
public Map producesLandResourcesConstructing(String construction)
public Map producesResources(String constructionName)
public Map producesResourcesConstructing(String construction)
public List producesResourcesNames(String constructionName)
public Map usesLandResources(String constructionName)
public Map usesLandResourcesConstructing(String construction)
public Map usesResources(String constructionName)
public Map usesResourcesConstructing(String construction)
public List usesResourcesNames(String constructionName)
Association Links |
to Class evolution.constructions.ConstructionKnowledgeCatalog
| a gvijf production | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |