Interface State<T>

Type Parameters:
T - represents the moves that can be applied to the states
All Superinterfaces:
Cloneable, State<T>
All Known Subinterfaces:
TwoPhaseMoveState<T>

public interface State<T> extends State<T>, Cloneable
Represents the state of a puzzle to be solved.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of the state.
    Returns the set of all moves that can be applied to the state.
    boolean
    Returns whether the puzzle is solved.

    Methods inherited from interface common.State

    isLegalMove, makeMove
  • Method Details

    • isSolved

      boolean isSolved()
      Returns whether the puzzle is solved.
      Returns:
      whether the puzzle is solved
    • getLegalMoves

      Set<T> getLegalMoves()
      Returns the set of all moves that can be applied to the state.
      Returns:
      the set of all moves that can be applied to the state
    • clone

      State<T> clone()
      Returns a copy of the state.
      Returns:
      a copy of the state