mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Allow Position::init() to be called multiple times.
For the rationale to allow this, see commit
a66c73deef
This was broken when cuckoo hashing was added, and
subtly broke (for example) lichess' Android application,
thus illustrating the original judgement was sound.
No functional change.
This commit is contained in:
parent
a6fa6a9e92
commit
e0f317afaa
1 changed files with 2 additions and 0 deletions
|
@ -168,6 +168,8 @@ void Position::init() {
|
|||
Zobrist::noPawns = rng.rand<Key>();
|
||||
|
||||
// Prepare the cuckoo tables
|
||||
std::memset(cuckoo, 0, sizeof(cuckoo));
|
||||
std::memset(cuckooMove, 0, sizeof(cuckooMove));
|
||||
int count = 0;
|
||||
for (Piece pc : Pieces)
|
||||
for (Square s1 = SQ_A1; s1 <= SQ_H8; ++s1)
|
||||
|
|
Loading…
Add table
Reference in a new issue