|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface GoalDecider
Used by search
in order to determine a goal.
The method check(Unit, PathNode) will be called by
search
until:
true and there is
no sub goals.getGoal() will get called after this.
| Method Summary | |
|---|---|
boolean |
check(Unit u,
PathNode pathNode)
Checks wether the given PathNode is a
goal/sub-goal. |
PathNode |
getGoal()
Gets the PathNode containing the goal. |
boolean |
hasSubGoals()
Determines wether this GoalDecider has any
sub goals. |
| Method Detail |
|---|
PathNode getGoal()
PathNode containing the goal.
PathNode where the Tile
returned by pathNode.getTile() is the goal.boolean hasSubGoals()
GoalDecider has any
sub goals.
true if there are any sub goals
and false otherwise.
boolean check(Unit u,
PathNode pathNode)
PathNode is a
goal/sub-goal.
u - The Unit which we are trying
to find a path for.pathNode - The PathNode where the
Tile returned by
pathNode.getTile() is the tile to be
checked.
true if the PathNode was
either a goal or a sub goal and false
otherwise. The goal should be returned by
getGoal() right after a call to this method,
if this method returns true and
hasSubGoals() returns
false.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||