de.java_chess.javaChess.engine
Interface ChessEngine

All Known Implementing Classes:
ChessEngineImpl

public interface ChessEngine

This interface defines the functionality of a engine to play the game of chess.


Method Summary
 Ply computeBestPly()
          Compute the best ply for the current position.
 Board getBoard()
          Get the current board.
 Game getGame()
          Get the current game.
 javax.swing.JMenu getMenu()
          Request a menu from the chess engine, where the user can change it's settings.
 boolean isWhite()
          Get the color of this engine.
 void setBoard(Board board)
          Set the board.
 void setGame(Game game)
          Set the current game.
 void setWhite(boolean white)
          Set the color of the engine.
 boolean validateUserPly(Ply ply)
          Check if a ply made by the user is valid.
 

Method Detail

getGame

public Game getGame()
Get the current game.
Returns:
The current game.

setGame

public void setGame(Game game)
Set the current game.
Parameters:
The - current game.

getBoard

public Board getBoard()
Get the current board.
Returns:
The current board.

setBoard

public void setBoard(Board board)
Set the board.
Parameters:
board - The new board.

isWhite

public boolean isWhite()
Get the color of this engine.
Parameters:
white - true, if the engine operates with the white pieces.

setWhite

public void setWhite(boolean white)
Set the color of the engine.
Parameters:
white - flag to indicate if the engine operates on the white pieces.

computeBestPly

public Ply computeBestPly()
Compute the best ply for the current position.
Returns:
The best known ply for the current position.

validateUserPly

public boolean validateUserPly(Ply ply)
Check if a ply made by the user is valid.
Parameters:
ply - The user ply.
Returns:
true, if the ply is valid. false otherwise.

getMenu

public javax.swing.JMenu getMenu()
Request a menu from the chess engine, where the user can change it's settings.
Returns:
A menu for the engine settings.