ScriptedGoalAgent.Goal

public static class Goal implements Serializable

The goal and the means for achieving it.

Fields

attackwithall

boolean attackwithall

commandstring

String commandstring

endtype

GathererTask endtype

numgatherers

int numgatherers

starttype

GathererTask starttype

template

TemplateView template

type

GoalType type

waittype

WaitType waittype

waitvalue

int waitvalue

xoffset

int xoffset

yoffset

int yoffset

Constructors

Goal

public Goal(String command, StateView state, ScriptedGoalAgent agent)

Methods

tryExecute

public boolean tryExecute(StateView state, RelevantStateView relstate, Map<Integer, Action> actions)

See if those actions can be done. This is not a final test, merely the best that can be done without fully simulating it. This method alters this map by adding actions.

Parameters:
  • state
  • relstate
  • actions – A map builder of actions.
Returns:

Assign actions