net.sourceforge.foobase
Class CBFMoveGenerator
java.lang.Object
|
+--net.sourceforge.foobase.CBFMoveGenerator
- public class CBFMoveGenerator
- extends java.lang.Object
- implements IsMoveGenerator
Move generator for old-style chessbase databases.
This class is based on the sources of "CB Utilities" by
Andy Duplain (version of 1-Apr-96, obtained from
the Pittsburg University FTP site)
None of the code made it directly in this tool (obviously, because the
original was written C ;-) but nonetheless, much of the information on
which this source is based on, comes from that toolset.
For performance reasons, all of this code perhaps might be included in
the code for class Board
directly, but accessing the protected
fields directly from this class just might be sufficient.
Note, however, that the code below relies on intimate knowledge of class
Board
, so beware of changes in that class (if they touch the
internal coding of the board or pieces)
Field Summary |
static java.lang.String |
__version
|
Method Summary |
java.util.Vector |
generateMoveList(int c,
Board board)
Generate a list of all possible moves for a given board setup. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
__version
public static final java.lang.String __version
CBFMoveGenerator
public CBFMoveGenerator()
- Default public constructor.
generateMoveList
public java.util.Vector generateMoveList(int c,
Board board)
- Generate a list of all possible moves for a given board setup.
This method is required by the oIsMoveGenerator
interface.
- Specified by:
- generateMoveList in interface IsMoveGenerator
- Parameters:
c
- int
color to move (0 means white to
move, non-zero means black to move)board
- Board
containing the piece setup, as well
as other possibilities like oportunity for castling etc.- Returns:
Vector
containing the list of all possible moves