View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.agent.navigation.astar;
2   
3   import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint;
4   import cz.cuni.amis.utils.NullCheck;
5   
6   public class UT2004PFGoal extends UT2004PFTask {
7   
8   	private NavPoint targetNode;
9   
10  	public UT2004PFGoal(NavPoint startNode, NavPoint targetNode) {
11  		super(startNode);
12  		NullCheck.check(targetNode, "targetNode");
13  		this.targetNode = targetNode;
14  	}
15  
16  	@Override
17  	public boolean isGoalReached(NavPoint actualNode) {
18  		return actualNode.getId() == targetNode.getId();
19  	}
20  
21  }