Package jadex.bdiv3.examples.puzzle
Interface IBoard
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPropertyChangeListener(PropertyChangeListener listener)Add a PropertyChangeListener to the listener list.java.util.List<Piece>getCurrentPosition()Get the current board position.MovegetLastMove()Get all moves made so far.java.util.List<Move>getMoves()Get all moves made so far.PiecegetPiece(Position pos)Get a piece for a location.java.util.List<Move>getPossibleMoves()Get possible moves.intgetSize()Get the board size.booleanisFreePosition(Position pos)Test if aposition is free.booleanisSolution()Test if it is a solution.booleanmove(Move move)Do a move.voidremovePropertyChangeListener(PropertyChangeListener listener)Remove a PropertyChangeListener from the listener list.booleantakeback()Takeback a move.booleanwasLastMoveWhite()Test if the last move was with a white piece.
 
- 
- 
- 
Field Detail- 
MOVEstatic final java.lang.String MOVE Property event for move made.- See Also:
- Constant Field Values
 
 - 
TAKEBACKstatic final java.lang.String TAKEBACK Property event for move taken back.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getPossibleMovesjava.util.List<Move> getPossibleMoves() Get possible moves.- Returns:
- Get all possible move.
 
 - 
moveboolean move(Move move) Do a move.- Parameters:
- move- The move.
 
 - 
takebackboolean takeback() Takeback a move.
 - 
isSolutionboolean isSolution() Test if it is a solution.- Returns:
- True, if solution.
 
 - 
getMovesjava.util.List<Move> getMoves() Get all moves made so far.
 - 
getLastMoveMove getLastMove() Get all moves made so far.
 - 
getSizeint getSize() Get the board size.
 - 
getCurrentPositionjava.util.List<Piece> getCurrentPosition() Get the current board position.
 - 
isFreePositionboolean isFreePosition(Position pos) Test if aposition is free.
 - 
wasLastMoveWhiteboolean 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.
 
 - 
addPropertyChangeListenervoid addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list. The listener is registered for all properties.- Parameters:
- listener- The PropertyChangeListener to be added.
 
 - 
removePropertyChangeListenervoid 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.
 
 
- 
 
-