public class ActionExecutor extends Object
Constructor and Description |
---|
ActionExecutor() |
Modifier and Type | Method and Description |
---|---|
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 on a node within the vis.
|
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 costsworld
- 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
- Copyright © 2013. All Rights Reserved.