Jadex 0.96

jadex.examples.puzzle
Interface IBoard

All Known Implementing Classes:
Board, JackBoard

public interface IBoard

The interface for the playing board.


Field Summary
static String MOVE
          Property event for move made.
static String TAKEBACK
          Property event for move taken back.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 List getCurrentPosition()
          Get the current board position.
 Move getLastMove()
          Get all moves made so far.
 List getMoves()
          Get all moves made so far.
 Piece getPiece(Position pos)
          Get a piece for a location.
 List getPossibleMoves()
          Get possible moves.
 int getSize()
          Get the board size.
 boolean isFreePosition(Position pos)
          Test if aposition is free.
 boolean isSolution()
          Test if it is a solution.
 boolean move(Move move)
          Do a move.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 boolean takeback()
          Takeback a move.
 boolean wasLastMoveWhite()
          Test if the last move was with a white piece.
 

Field Detail

MOVE

static final String MOVE
Property event for move made.

See Also:
Constant Field Values

TAKEBACK

static final 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

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

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.

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.