-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plan.java
39 lines (35 loc) · 1.01 KB
/
Plan.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import java.util.*;
public class Plan {
public boolean fail = false;
private ArrayList<Action> planActions = new ArrayList<Action>();
private ArrayList<Beliefs> planActionPostBeliefs = new ArrayList<Beliefs>();
private int index = 0;
public ArrayList<Action> getPlanActions() {
return planActions;
}
public void setPlanActions(ArrayList<Action> planActions) {
this.planActions = planActions;
}
public ArrayList<Beliefs> getPlanActionPostBeliefs() {
return planActionPostBeliefs;
}
public void setPlanActionPostBeliefs(ArrayList<Beliefs> planActionPostBeliefs) {
this.planActionPostBeliefs = planActionPostBeliefs;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public boolean isActionsConluded() {
for (int i = 0;i < index;i++)
{
if (planActions.get(i).done == false || (planActions.get(i).isPossible == true && planActions.get(i).done == false))
{
return false;
}
}
return true;
}
}