Chess Engine
C++ chess engine with movegen, bitboards, and Arduino-friendly docs
|
Go to the source code of this file.
Functions | |
U64 | generatePositionKeys (const S_BOARD *pos) |
Generates a Zobrist hash key for the given board position. |
Generates a Zobrist hash key for the given board position.
The key uniquely (with very high probability) represents:
pos | Pointer to the current board state. |
Definition at line 5 of file hash_keys.cpp.
References ASSERT, bK, BRD_SQ_NUM, S_BOARD::castlePerm, EMPTY, S_BOARD::enPas, NO_SQ, OFFBOARD, S_BOARD::pieces, RANK_3, RANK_6, rankIndex120, S_BOARD::side, SqOnBoard(), WHITE, wP, zobristCastleKeys, zobristPieceKeys, and zobristSideKey.
Referenced by isBoardStateValid(), loadFEN(), and mirrorBoardPosition().