| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
evolution.KnowledgeCatalog | +--evolution.actions.ActionKnowledgeCatalog
The KnowledgeCatalog for evolution.actions.
Field Summary | |
protected static ActionKnowledgeCatalog | instance Instance of the singleton. |
Constructor Summary | |
protected | ActionKnowledgeCatalog(String fileName) Create a new KnowledgeCatalog from the given file. |
Method Summary | |
boolean | actionExists(String actionName) Does the action with this name exist? |
boolean | canBePerformedOn(String actionName, SquareOfLand sq) See if this action can be performed on the given square. |
InfoList | getActionsInfo() An info list with all possible actions in the game. |
List | getActionTypes() Return a list of all possible actions. |
Action | getDefaultAction() Return an instance of the default action type. |
String | getDefaultActionType() Return the the name for the default action. |
List | getEnergyBufferActionTypes() Return a list of all possible actions while using the energy buffer. |
static ActionKnowledgeCatalog | getInst() Return the instance of this singleton. |
double | getPriority(Action action) The normal priority for this action. |
List | influencedBy(String actionName) A list of resources by which this action is influenced. |
static void | initialize(String fileName) Initialize this singleton from the given file. |
Action | instantiate(String actionName) Instantiate the action with the given name on the given square. |
boolean | isMaximizing(String actionName) See if this action can perform better when the needed landresources are high. |
boolean | mustBeExplored(String actionName) Check whether the given action must be explored or not. |
protected void | parseActionTypes(String actionTypesString) Parse a actiontypes string. |
protected List | parseActionTypesInto(String actionTypesString, List retain) Parse a actiontypes string. |
protected void | parseDefaultActionType(String actionTypeString) Parse the default actiontype string. |
protected void | parseEnergyBufferActionTypes(String actionTypesString) Parse a energy buffer actiontypes string. |
Double | producesLandResource(String actionName, String resName) Returns the amount produced by the given action of the given land resource. |
Map | producesLandResources(String actionName) A map with as keys the landresource and as value the amount the action uses. |
Map | producesResources(String actionName) A map with as keys the resource and as value the amount the action uses. |
Map | reveals(Action action) A hash of resources/speeds for the given action. |
Object[] | transformsLand(SquareOfLand sq, String actionName) Does the given action transform the landtype of the given square? Returns Object[] { Boolean transforms : does the action transform yes or no String toLand : the land type we transform to String detLandResource : the determening land resource Double limit : the limit the land resource should have to transform the land type Boolean lte : must the current value be less then equal than the limit Boolean gte : must the current value be greater then equal than the limit |
Double | usesLandResource(String actionName, String resName) Returns the amount used by the given action of the given land resource. |
Map | usesLandResources(String actionName) A map with as keys the landresource and as value the amount the action uses. |
Map | usesResources(String actionName) A map with as keys the resource and as value the amount the action uses. |
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 ActionKnowledgeCatalog instance
Constructor Detail |
protected ActionKnowledgeCatalog(String fileName)
throws java.io.FileNotFoundException,
java.io.IOException
Method Detail |
public boolean actionExists(String actionName)
public boolean canBePerformedOn(String actionName, SquareOfLand sq)
public InfoList getActionsInfo()
public List getActionTypes()
public Action getDefaultAction()
public String getDefaultActionType()
public List getEnergyBufferActionTypes()
public static ActionKnowledgeCatalog getInst()
public double getPriority(Action action)
public List influencedBy(String actionName)
public static void initialize(String fileName)
throws java.io.FileNotFoundException,
java.io.IOException
public Action instantiate(String actionName)
public boolean isMaximizing(String actionName)
public boolean mustBeExplored(String actionName)
protected void parseActionTypes(String actionTypesString)
protected List parseActionTypesInto(String actionTypesString, List retain)
protected void parseDefaultActionType(String actionTypeString)
protected void parseEnergyBufferActionTypes(String actionTypesString)
public Double producesLandResource(String actionName, String resName)
public Map producesLandResources(String actionName)
public Map producesResources(String actionName)
public Map reveals(Action action)
public Object[] transformsLand(SquareOfLand sq, String actionName)
Returns Object[] { Boolean transforms : does the action transform yes or no String toLand : the land type we transform to String detLandResource : the determening land resource Double limit : the limit the land resource should have to transform the land type Boolean lte : must the current value be less then equal than the limit Boolean gte : must the current value be greater then equal than the limit
public Double usesLandResource(String actionName, String resName)
public Map usesLandResources(String actionName)
public Map usesResources(String actionName)
Association Links |
to Class java.lang.String
to Class evolution.actions.Action
to Class java.util.List
to Class evolution.actions.ActionKnowledgeCatalog
| a gvijf production | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |