-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnemyMove.java
More file actions
45 lines (38 loc) · 1.04 KB
/
Copy pathEnemyMove.java
File metadata and controls
45 lines (38 loc) · 1.04 KB
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
40
41
42
43
44
45
import java.util.List;
import org.ggp.base.util.statemachine.Move;
import org.ggp.base.util.statemachine.exceptions.MoveDefinitionException;
import org.ggp.base.util.statemachine.exceptions.TransitionDefinitionException;
public class EnemyMove {
public EnemyMove(List<Move> jointMoves, MyMove parent)
{
mJointMoves = jointMoves;
mParent = parent;
mChild = null;
}
public StoredState getNextState() throws TransitionDefinitionException, MoveDefinitionException
{
if (mChild == null)
{
mChild = new StoredState(mParent.getState().getMachine()
.getNextState(mParent.getState().getState(), mJointMoves), mParent.getState().getMachine(), mParent
.getState().getRole(), this);
}
return mChild;
}
public List<Move> getJointMoves()
{
return mJointMoves;
}
public MyMove getMyMove()
{
return mParent;
}
public int getVisitCount()
{
return mVisitCount;
}
private List<Move> mJointMoves;
private MyMove mParent;
private StoredState mChild;
private int mVisitCount;
}