|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcivquest.units.MoveCalculator
civquest.units.DijkstraMoveCalculator
Nested Class Summary | |
class |
DijkstraMoveCalculator.FieldInfoComparator
Comparator for comparing two FieldInfo-objects (needed for the heap used within the dijkstra-algorithm). |
Constructor Summary | |
DijkstraMoveCalculator(Registry registry)
|
Method Summary | |
MovePath |
calculateOneMovePath(java.util.Collection unitCollection,
Field to)
Calculates a MovePath for a move of the given unit-group from its current position to Field |
boolean |
moveUnit(long id,
Coordinate to)
Moves the unit with the given id to field |
Methods inherited from class civquest.units.MoveCalculator |
calculateMovePaths, constructUnitGroups |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DijkstraMoveCalculator(Registry registry)
Method Detail |
public boolean moveUnit(long id, Coordinate to)
moveUnit
in class MoveCalculator
id
- unit-id as describedto
- field to move to
public MovePath calculateOneMovePath(java.util.Collection unitCollection, Field to)
calculateOneMovePath
in class MoveCalculator
to
- a Field
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |