|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmassim.competition2011.scenario.ActionExecutor
public class ActionExecutor
This class in the one in charge of executing the agents actions.
Constructor Summary | |
---|---|
ActionExecutor()
|
Method Summary | |
---|---|
protected static void |
clearFlags(GraphSimulationWorldState world)
Clears the information about the actions executed in the previous step. |
static void |
execute(GraphSimulationWorldState world)
Executes the actions of all agents. |
protected static void |
executeAttacksAndParrys(GraphSimulationWorldState world)
Executes all the attack actions simultaneously, meaning that all
the costs calculations to corroborate that an attack can actually be performed, are made
before updating the internal states of the attacked agents. |
protected static void |
executeRest(GraphSimulationWorldState world)
Executes the rest of the actions (excluding attacks) in a random order. |
protected static boolean |
validAttack(GraphSimulationAgentState agent,
GraphSimulationAgentState victim,
GraphSimulationWorldState world)
Returns true iff the victim is in the same node of the attacker. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActionExecutor()
Method Detail |
---|
public static void execute(GraphSimulationWorldState world)
world
- protected static void clearFlags(GraphSimulationWorldState world)
world
- protected static void executeAttacksAndParrys(GraphSimulationWorldState world)
attack
actions simultaneously, meaning that all
the costs calculations to corroborate that an attack can actually be performed, are made
before updating the internal states of the attacked agents.parry
action costs
world
- protected static boolean validAttack(GraphSimulationAgentState agent, GraphSimulationAgentState victim, GraphSimulationWorldState world)
agent
- victim
- world
-
protected static void executeRest(GraphSimulationWorldState world)
repair
another one
that is trying to move to a different node, or when two agents in the same team
attempt to buy
and the team only has enough resources for one buy.
world
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |