public class WaterJugMove extends Move
Constructor and Description |
---|
WaterJugMove(java.lang.String moveName)
Constructs a new water jug move object.
|
Modifier and Type | Method and Description |
---|---|
State |
doMove(State otherState)
Attempts to perform this move on a given water jug state.
|
getMoveName
public WaterJugMove(java.lang.String moveName)
moveName
- the name of this move.
It is an error if the name is not one of the following:
public State doMove(State otherState)