aboutsummaryrefslogtreecommitdiff
path: root/src/bot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bot.cpp')
-rw-r--r--src/bot.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bot.cpp b/src/bot.cpp
index e9b0b4d..969606e 100644
--- a/src/bot.cpp
+++ b/src/bot.cpp
@@ -171,14 +171,12 @@ static int search(int depth, Game *b, int alpha, int beta, int ply) {
return 0;
}
}
- const uint64_t gameHash = GenerateZobristKey(b);
-
- if (isRepetionDraw(gameHash, b)) {
+ if (isRepetionDraw(b->hash, b)) {
return 0;
};
TranspositionsEntry *entry = nullptr;
- if (auto it = b->Transpositions->find(gameHash);
+ if (auto it = b->Transpositions->find(b->hash);
it != b->Transpositions->end()) {
entry = &it->second;
if (entry->depth >= depth) {
@@ -241,7 +239,7 @@ static int search(int depth, Game *b, int alpha, int beta, int ply) {
flag = UPPERBOUND;
}
- (*b->Transpositions)[gameHash] = {
+ (*b->Transpositions)[b->hash] = {
.depth = depth, .Eval = bestScore, .flag = flag, .bestMove = bestMove};
}
return bestScore;