Interface IBoard

All Known Implementing Classes:
Board, JackBoard

public interface IBoard
The interface for the playing board.
  • Field Details

  • Method Details

    • getPiece

      Piece getPiece(Position pos)
      Get a piece for a location.
    • getPossibleMoves

      List<Move> getPossibleMoves()
      Get possible moves.
      Returns:
      Get all possible move.
    • move

      boolean move(Move move)
      Do a move.
      Parameters:
      move - The move.
    • takeback

      boolean takeback()
      Takeback a move.
    • isSolution

      boolean isSolution()
      Test if it is a solution.
      Returns:
      True, if solution.
    • getMoves

      List getMoves()
      Get all moves made so far.
    • getLastMove

      Move getLastMove()
      Get all moves made so far.
    • getSize

      int getSize()
      Get the board size.
    • getCurrentPosition

      List getCurrentPosition()
      Get the current board position.
    • isFreePosition

      boolean isFreePosition(Position pos)
      Test if aposition is free.
    • wasLastMoveWhite

      boolean wasLastMoveWhite()
      Test if the last move was with a white piece. When no move was made, it return true.
      Returns:
      True, is last move was with white piece.
    • addPropertyChangeListener

      void addPropertyChangeListener(PropertyChangeListener listener)
      Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
      Parameters:
      listener - The PropertyChangeListener to be added.
    • removePropertyChangeListener

      void removePropertyChangeListener(PropertyChangeListener listener)
      Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
      Parameters:
      listener - The PropertyChangeListener to be removed.