|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object us.asciiroth.client.agents.AgentUtils
public class AgentUtils
Function library for various movement and related algorithms.
Constructor Summary | |
---|---|
AgentUtils()
|
Method Summary | |
---|---|
static Item |
assessAmmo(Event event,
Item weaponType,
Item returnType)
|
static Direction |
findPathInDirection(Cell agentLoc,
Agent agent,
Cell targetCell,
Direction direction,
Targeting targeting)
Given targeting information and a desired direction to move in, return a direction that is the closest the agent can get to moving in the desired direction. |
static Direction |
findPathToTarget(Cell agentLoc,
Agent agent,
Targeting targeting)
Given targeting information, devise the best possible direction to move. |
static Agent |
getAgentOtherState(Agent agent,
State state)
Convert the agent to the opposite state of the state that is provided to this method. |
static Direction |
getDirectionToCell(Cell origin,
Cell target)
Given two cells, determine the direction that will take you from the origin closer to the target cell. |
static Direction |
getDirectionToCellRangeLimited(Cell origin,
Cell target,
Targeting targeting)
Determine a direction toward the provided target cell from the origin cell, accounting for the range specified in the targeting parameter. |
static double |
getDistance(Cell cell1,
Cell cell2)
|
static void |
turnToStone(Cell agentLoc,
Agent agent,
Color color)
Turn the agent to stone. |
static void |
updateAdjacent(Context context,
int range)
The player has done something that will change perception of the adjacent cells. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AgentUtils()
Method Detail |
---|
public static Item assessAmmo(Event event, Item weaponType, Item returnType)
public static Direction findPathInDirection(Cell agentLoc, Agent agent, Cell targetCell, Direction direction, Targeting targeting)
agentLoc
- agent
- targetCell
- direction
- targeting
-
public static Direction findPathToTarget(Cell agentLoc, Agent agent, Targeting targeting)
agentLoc
- agent
- targeting
-
public static Agent getAgentOtherState(Agent agent, State state)
agent
- state
-
public static Direction getDirectionToCell(Cell origin, Cell target)
origin
- target
-
public static Direction getDirectionToCellRangeLimited(Cell origin, Cell target, Targeting targeting)
origin
- target
- targeting
-
public static double getDistance(Cell cell1, Cell cell2)
public static void turnToStone(Cell agentLoc, Agent agent, Color color)
agentLoc
- agent
- color
- public static void updateAdjacent(Context context, int range)
context
-
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark