|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPuzzleSolution
public class PuzzleSolution
PuzzleSolution searches the provided initial puzzle to find the shortest solution. The solved puzzle and list of moves are available via accessors.
| Field Summary | |
|---|---|
private java.util.Set |
existingPuzzles
|
private java.util.List |
puzzles
|
private java.util.List |
solutionMoves
|
private Puzzle |
solvedPuzzle
|
| Constructor Summary | |
|---|---|
PuzzleSolution(Puzzle initialPuzzle)
Constructor: searches for a solution to the initial puzzle. |
|
| Method Summary | |
|---|---|
private void |
addPuzzle(Puzzle puzzle)
Adds the puzzle to the search space, if it doesn't already exist there |
java.util.List |
getSolutionMoves()
Accessor for solution moves |
Puzzle |
getSolvedPuzzle()
Accessor for solved puzzle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.Set existingPuzzles
private Puzzle solvedPuzzle
private java.util.List solutionMoves
private java.util.List puzzles
| Constructor Detail |
|---|
public PuzzleSolution(Puzzle initialPuzzle)
initialPuzzle - the starting puzzle| Method Detail |
|---|
public java.util.List getSolutionMoves()
public Puzzle getSolvedPuzzle()
private void addPuzzle(Puzzle puzzle)
puzzle - the puzzle to be added
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||