fen: calc pos hash, hash: fix zobrist_init, add zobrist_verify

This commit is contained in:
2024-05-15 18:36:30 +02:00
parent 86f8184c56
commit 5db45a760a
3 changed files with 60 additions and 3 deletions

View File

@@ -250,8 +250,10 @@ end:
}
if (fen_check(&tmppos) < 0)
return NULL;
tmppos.key = zobrist_calc(&tmppos);
if (!pos)
pos = pos_dup(&tmppos);
pos = pos_new();
pos_copy(&tmppos, pos);
//puts("prout 1");
//pos_print_raw(&tmppos, 1);
//puts("prout 2");