|
Cute Chess 0.1
|
Unsigned 64-bit values for generating zobrist position keys. More...
#include <zobrist.h>
Public Member Functions | |
| virtual void | initialize (int squareCount, int pieceTypeCount) |
| bool | isInitialized () const |
| virtual quint64 | piece (const Piece &piece, int square) const |
| virtual quint64 | reservePiece (const Piece &piece, int slot) const |
| virtual quint64 | side () const |
| Zobrist (const quint64 *keys=nullptr) | |
| virtual | ~Zobrist () |
Protected Member Functions | |
| const quint64 * | keys () const |
| int | pieceTypeCount () const |
| int | squareCount () const |
Static Protected Member Functions | |
| static quint64 | random64 () |
Unsigned 64-bit values for generating zobrist position keys.
Chess::Board uses zobrist keys to quickly and easily compare two positions for equality. Primary uses for zobrist keys are:
| Chess::Zobrist::Zobrist | ( | const quint64 * | keys = nullptr | ) |
|
inlinevirtual |
Destroys the Zobrist object.
|
virtual |
Initializes the zobrist numbers.
| squareCount | The number of squares the board has, including the invisible "Wall" squares. |
| pieceTypeCount | The number of piece types the variant has, including the empty "NoPiece" type (type 0). |
Reimplemented in Chess::WesternZobrist.
| bool Chess::Zobrist::isInitialized | ( | ) | const |
Returns true if the keys are initialized.
|
inlineprotected |
Returns the array of zobrist keys.
|
virtual |
Returns the zobrist value for piece at square.
Reimplemented in Chess::WesternZobrist.
|
inlineprotected |
Returns the number of piece types the variant has, including the empty "NoPiece" type (type 0).
|
staticprotected |
Returns an unsigned 64-bit pseudo-random number.
|
virtual |
Returns the zobrist value for reserve piece piece at slot.
|
virtual |
Returns the zobrist value for side to move. This value must be in the key on black's turn.
Reimplemented in Chess::WesternZobrist.
|
inlineprotected |
Returns the number of squares the board has, including the invisible "Wall" squares.