public class SimpleHistoryAwareMovementSequence<S extends HistoryAwareState<L,M>,L,M> extends java.lang.Object implements HistoryAwareMovementSequence<S,L,M>
Modifier and Type | Field and Description |
---|---|
protected S |
fromState |
protected java.util.List<MoveImpl<L,M>> |
moves |
protected S |
toState |
Constructor and Description |
---|
SimpleHistoryAwareMovementSequence(S fromState,
S toState,
java.util.List<MoveImpl<L,M>> moves) |
Modifier and Type | Method and Description |
---|---|
static <S extends HistoryAwareState<L,M>,L,M> |
emptySequence(S state) |
S |
getFromState() |
L |
getLastLogMove() |
M |
getLastModelMove() |
java.util.List<MoveImpl<L,M>> |
getMovementSequence()
A non-empty list of movements
|
S |
getToState()
return the state that is the result of executing this movement sequence.
|
int |
getTotalCost()
return the total cost of this movement sequence, including the last move
|
protected final S extends HistoryAwareState<L,M> fromState
protected final S extends HistoryAwareState<L,M> toState
public static <S extends HistoryAwareState<L,M>,L,M> SimpleHistoryAwareMovementSequence<S,L,M> emptySequence(S state)
public int getTotalCost()
MovementSequence
getTotalCost
in interface MovementSequence<S extends HistoryAwareState<L,M>,L,M>
public L getLastLogMove()
public M getLastModelMove()
public S getFromState()
public S getToState()
MovementSequence
getToState
in interface MovementSequence<S extends HistoryAwareState<L,M>,L,M>
public java.util.List<MoveImpl<L,M>> getMovementSequence()
HistoryAwareMovementSequence
getMovementSequence
in interface HistoryAwareMovementSequence<S extends HistoryAwareState<L,M>,L,M>