|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.java_chess.javaChess.engine.PlyGenerator
This class generates all possible plies for a given game position.
Constructor Summary | |
PlyGenerator(Game game)
Create a new instance of a ply generator. |
|
PlyGenerator(Game game,
BitBoard board)
Create a new instance of a ply generator from a given board. |
Method Summary | |
void |
addPliesForBishops(boolean white)
Add the plies for bishops. |
void |
addPliesForQueens(boolean white)
Add the plies for queens. |
void |
addPliesForRooks(boolean white)
Add the plies for rooks. |
Game |
getGame()
Get the current game. |
long |
getKnightPlies(int square)
Get the knight plies for a given knight square. |
Ply[] |
getPliesForColor(BitBoard board,
boolean white)
Get the plies for a given board and color. |
Ply[] |
getPliesForColor(boolean white)
Get the plies for a given game position and color. |
void |
setAnalyzer(BitBoardAnalyzer analyzer)
Set a analyzer for check tests. |
void |
setGame(Game game)
Set the current game. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public PlyGenerator(Game game)
public PlyGenerator(Game game, BitBoard board)
game
- The current game.board
- The board to operate on.Method Detail |
public final Game getGame()
public final void setGame(Game game)
The
- current game.public final Ply[] getPliesForColor(BitBoard board, boolean white)
lastPly
- The ply, that lead to the given board.board
- The board with the game position.white
- true, if white has the next move.public final Ply[] getPliesForColor(boolean white)
white
- true, if white has the next move.public final void addPliesForBishops(boolean white)
white
- Flag to indicate if we request the plies for white pieces.public final void addPliesForRooks(boolean white)
white
- Flag to indicate, if we request the moves for white pieces.public final void addPliesForQueens(boolean white)
white
- Flag to indicate if we request the plies for white pieces.public final void setAnalyzer(BitBoardAnalyzer analyzer)
analyzer
- The new analyzer to set.public final long getKnightPlies(int square)
square
- The square, where the knight is located.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |