Zobrist keys for Western chess variants.
More...
#include <westernzobrist.h>
Zobrist keys for Western chess variants.
| Chess::WesternZobrist::WesternZobrist |
( |
const quint64 * |
keys = nullptr | ) |
|
Creates a new uninitialized WesternZobrist object.
- Parameters
-
| keys | An array of zobrist keys that can be used instead of the random numbers generated by the Zobrist class. |
| quint64 Chess::WesternZobrist::castling |
( |
int |
side, |
|
|
int |
square |
|
) |
| const |
|
virtual |
Returns the zobrist value for player side's castling rook at square.
| quint64 Chess::WesternZobrist::enpassant |
( |
int |
square | ) |
const |
|
virtual |
Returns the zobrist value for an en-passant target at square.
| void Chess::WesternZobrist::initialize |
( |
int |
squareCount, |
|
|
int |
pieceTypeCount |
|
) |
| |
|
virtual |
Initializes the zobrist numbers.
- Parameters
-
| 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). |
- Note
- Subclasses that reimplement this function must call the base implementation.
Reimplemented from Chess::Zobrist.
| quint64 Chess::WesternZobrist::piece |
( |
const Piece & |
piece, |
|
|
int |
square |
|
) |
| const |
|
virtual |
Returns the zobrist value for piece at square.
Reimplemented from Chess::Zobrist.
| quint64 Chess::WesternZobrist::side |
( |
| ) |
const |
|
virtual |
Returns the zobrist value for side to move. This value must be in the key on black's turn.
Reimplemented from Chess::Zobrist.
The documentation for this class was generated from the following files:
- projects/lib/src/board/westernzobrist.h
- projects/lib/src/board/westernzobrist.cpp