de.java_chess.javaChess.engine
Interface BitBoardAnalyzer

All Known Implementing Classes:
BitBoardAnalyzerImpl

public interface BitBoardAnalyzer

This interface has to be implemented by any class, that that analyses a BitBoard type chess game position.


Field Summary
static short BLACK_WIN
          A board, where the white king is in chess.
static short WHITE_WIN
          A board, where the black king is in chess.
 
Method Summary
 short analyze()
          Analyze the current board.
 short analyze(BitBoard board, boolean white)
          Analyzed a new board.
 BitBoard getBoard()
          Get the currently analyzed board.
 boolean isInCheck(BitBoard board, boolean white)
          Test if a king is in check on a given board.
 boolean isInCheck(boolean white)
          Test if a king is in check.
 void setBoard(BitBoard board)
          Set a new board to be analyzed.
 void setMoveRight(boolean white)
          Set the flag, if white is about to move.
 

Field Detail

BLACK_WIN

public static final short BLACK_WIN
A board, where the white king is in chess.

WHITE_WIN

public static final short WHITE_WIN
A board, where the black king is in chess.
Method Detail

getBoard

public BitBoard getBoard()
Get the currently analyzed board.
Returns:
The currently analyzed board.

setBoard

public void setBoard(BitBoard board)
Set a new board to be analyzed.
Parameters:
board - The new board.

setMoveRight

public void setMoveRight(boolean white)
Set the flag, if white is about to move.
Parameters:
white - Flag to indicate, if white has the next move.

isInCheck

public boolean isInCheck(boolean white)
Test if a king is in check.
Parameters:
white - true, if the white king is checked, false otherwise.

isInCheck

public boolean isInCheck(BitBoard board,
                         boolean white)
Test if a king is in check on a given board.
Parameters:
board - The board to test.
white - true, if the white king is checked, false otherwise.

analyze

public short analyze()
Analyze the current board.

analyze

public short analyze(BitBoard board,
                     boolean white)
Analyzed a new board.
Parameters:
board - The new board to analyze.
white - Flag to indicate, if white has the next move.