encapsulated TT | bench 1857933

This commit is contained in:
rektdie committed 2025-04-12 22:43:39 +02:00
1 parent c08c545335
commit 53f6ae17bc
7 files changed
+43 -49

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
#include "tt.h"
SEARCH::SearchResults TTable::ReadEntry(U64 &hashKey, int depth, int alpha, int beta) {
TTEntry *current = &table[hashKey % hashSize];
SearchResults TTable::ReadEntry(U64 &hashKey, int depth, int alpha, int beta) {
TTEntry *current = &table[hashKey % table.size()];
if (current->hashKey == hashKey) {
if (current->depth >= depth) {
@@ -20,7 +20,7 @@ SEARCH::SearchResults TTable::ReadEntry(U64 &hashKey, int depth, int alpha, int
}
void TTable::WriteEntry(U64 &hashKey, int depth, int score, int nodeType, Move bestMove) {
TTEntry *current = &table[hashKey % hashSize];
TTEntry *current = &table[hashKey % table.size()];
current->hashKey = hashKey;
current->nodeType = nodeType;