|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.pathfinding.BaseCostDecider
net.sf.freecol.common.model.pathfinding.AvoidBlockingUnitsCostDecider
class AvoidBlockingUnitsCostDecider
A CostDecider avoid units blocking the path.
| Field Summary |
|---|
| Fields inherited from class net.sf.freecol.common.model.pathfinding.BaseCostDecider |
|---|
moveType |
| Fields inherited from interface net.sf.freecol.common.model.pathfinding.CostDecider |
|---|
ILLEGAL_MOVE |
| Constructor Summary | |
|---|---|
AvoidBlockingUnitsCostDecider()
|
|
| Method Summary | |
|---|---|
int |
getCost(Unit unit,
Tile oldTile,
Tile newTile,
int movesLeftBefore,
int turns)
Determines the cost of a single move. |
| Methods inherited from class net.sf.freecol.common.model.pathfinding.BaseCostDecider |
|---|
getMovesLeft, isNewTurn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
AvoidBlockingUnitsCostDecider()
| Method Detail |
|---|
public int getCost(Unit unit,
Tile oldTile,
Tile newTile,
int movesLeftBefore,
int turns)
getCost in interface CostDecidergetCost in class BaseCostDeciderunit - The Unit making the move.oldTile - The Tile we are moving from.newTile - The Tile we are moving to.movesLeftBefore - The remaining moves left.turns - The number of turns spent so far.
oldTile to the newTile.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||