encapsulated TT
This commit is contained in:
1 parent
e7079c3c73
commit
8ca878275a
6 files changed
+28
-26
No files matched your search
+4
-4
@@ -92,10 +92,10 @@ static void ParseGo(Board &board, std::string &command, SEARCH::SearchContext& c
|
||||
}
|
||||
}
|
||||
|
||||
static void SetOption(std::string &command) {
|
||||
static void SetOption(std::string &command, SEARCH::SearchContext& ctx) {
|
||||
if (command.find("Hash") != std::string::npos) {
|
||||
hashSize = (ReadParam("value", command) * 1000000) / sizeof(TTEntry);
|
||||
TT.Resize(hashSize);
|
||||
ctx.TT->Resize(hashSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ void UCILoop(Board &board) {
|
||||
board.SetByFen(StartingFen);
|
||||
|
||||
// Clearing
|
||||
TT.Clear();
|
||||
ctx.TT->Clear();
|
||||
|
||||
ctx.killerMoves = {};
|
||||
ctx.history.Clear();
|
||||
@@ -169,7 +169,7 @@ void UCILoop(Board &board) {
|
||||
}
|
||||
|
||||
if (input.find("setoption") != std::string::npos) {
|
||||
SetOption(input);
|
||||
SetOption(input, ctx);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user