1 package cz.cuni.amis.pogamut.ut2004.agent.navigation.astar;
2
3 import java.util.Collection;
4
5 import cz.cuni.amis.pogamut.base3d.worldview.object.Location;
6 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint;
7 import cz.cuni.amis.utils.astar.AStarGoal;
8
9 public abstract class UT2004AStarGoal implements AStarGoal<NavPoint> {
10
11 protected Collection<NavPoint> closeList;
12
13 protected Collection<NavPoint> openList;
14
15 @Override
16 public void setCloseList(Collection<NavPoint> closeList) {
17 this.closeList = closeList;
18 }
19
20 @Override
21 public void setOpenList(Collection<NavPoint> openList) {
22 this.openList = openList;
23 }
24
25 public Collection<NavPoint> getCloseList() {
26 return closeList;
27 }
28
29 public Collection<NavPoint> getOpenList() {
30 return openList;
31 }
32
33
34
35
36
37
38
39 @Override
40 public int getExtraCost(NavPoint nodeFrom, NavPoint nodeTo) {
41 return 0;
42 }
43
44
45
46
47
48
49
50 @Override
51 public boolean isNodeOpened(NavPoint node) {
52 return true;
53 }
54
55
56
57
58
59
60
61
62 @Override
63 public abstract int getEstimatedDistanceToGoal(NavPoint node);
64
65
66
67
68
69
70
71 @Override
72 public abstract boolean isGoalReached(NavPoint actualNode);
73
74 }