smithers.logicpuzzles
Interface PuzzleState<P extends Puzzle>

All Known Implementing Classes:
HanjieState, MosaicState, SlitherlinkState

public interface PuzzleState<P extends Puzzle>

Interface representing a "state" of a logic puzzle - that is, some stage along an attempt at solving it.


Method Summary
 P getPuzzle()
          Returns the puzzle which this is a state of.
 boolean isSolved()
          Determines whether or not the puzzle has been completely solved.
 java.lang.String toString()
          Generates a String representing the current state of the puzzle.
 

Method Detail

getPuzzle

P getPuzzle()
Returns the puzzle which this is a state of.

Returns:
the Puzzle which this PuzzleState relates to.

isSolved

boolean isSolved()
Determines whether or not the puzzle has been completely solved.

Returns:
true iff the puzzle has been completely solved

toString

java.lang.String toString()
Generates a String representing the current state of the puzzle. May or may not include some information about the puzzle itself.

Overrides:
toString in class java.lang.Object
Returns:
a String representing the state