|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbridge.BridgeProblem
public class BridgeProblem
This class represents the Bridge Crossing problem. It provides an introductory message describing the problem, stores the problem's possible moves and current state, and tests for whether the problem has been successfully solved.
Constructor Summary | |
---|---|
BridgeProblem()
The bridge problem constructor should create the initial bridge state object and store it as the problem's current state. |
Method Summary | |
---|---|
BridgeState |
getCurrentState()
Getter (accessor) for this problem's current bridge state. |
java.lang.String |
getIntroduction()
Getter (accessor) for this problem's introduction string. |
java.util.List<BridgeMove> |
getMoves()
Getter (accessor) for this problem's list of valid bridge move objects. |
void |
setCurrentState(BridgeState currentState)
Setter (mutator) for this problem's current bridge state. |
boolean |
success()
Tests for whether the current state of this problem indicates that the problem has been successfully solved. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BridgeProblem()
Method Detail |
---|
public java.lang.String getIntroduction()
public java.util.List<BridgeMove> getMoves()
public boolean success()
public BridgeState getCurrentState()
public void setCurrentState(BridgeState currentState)
currentState
- the state to be made this problem's current state
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |