|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.model.pathfinding.CostDeciders
public final class CostDeciders
Cost deciders to be used while finding paths.
Constructor Summary | |
---|---|
CostDeciders()
|
Method Summary | |
---|---|
static CostDecider |
avoidSettlements()
A CostDecider returning only
the cost of moving across the terrain (no additional
cost for blocking enemy units etc). |
static CostDecider |
avoidSettlementsAndBlockingUnits()
A CostDecider for avoiding using tiles
which have blocking enemy units on them. |
static CostDecider |
defaultFor(Unit unit)
Selects a default CostDecider for the given units. |
static CostDecider |
numberOfTiles()
A CostDecider only considering
the number of tiles visited when determining the
cost. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CostDeciders()
Method Detail |
---|
public static CostDecider defaultFor(Unit unit)
CostDecider
for the given units.
unit
- The unit to create a CostDecider
for.
CostDecider
depending on the owner of the
unit (ai/human) and if the unit can attack other units.public static CostDecider avoidSettlements()
CostDecider
returning only
the cost of moving across the terrain (no additional
cost for blocking enemy units etc). Paths containing
an enemy settlement are considered illegal.
CostDecider
.public static CostDecider avoidSettlementsAndBlockingUnits()
CostDecider
for avoiding using tiles
which have blocking enemy units on them. Paths containing
an enemy settlement are considered illegal, and so are
paths where the next move has an enemy unit on it.
CostDecider
.public static CostDecider numberOfTiles()
CostDecider
only considering
the number of tiles visited when determining the
cost.
CostDecider
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |