Interface IBoard

  • All Known Implementing Classes:
    Board, JackBoard

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

      • TAKEBACK

        static final java.lang.String TAKEBACK
        Property event for move taken back.
        See Also:
        Constant Field Values
    • Method Detail

      • getPiece

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

        java.util.List 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

        java.util.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

        java.util.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.