updating positionHistory on parseposition | bench 1857933
This commit is contained in:
1 parent
917152d63e
commit
a383901bef
1 file changed
+3
-2
+3
-2
@@ -12,7 +12,7 @@
|
||||
#include "perft.h"
|
||||
#include "utils.h"
|
||||
|
||||
static void ParsePosition(Board &board, std::string_view command) {
|
||||
static void ParsePosition(Board &board, std::string_view command, SEARCH::SearchContext& ctx) {
|
||||
if (command.find("startpos") != std::string::npos) {
|
||||
board.SetByFen(StartingFen);
|
||||
}
|
||||
@@ -33,6 +33,7 @@ static void ParsePosition(Board &board, std::string_view command) {
|
||||
|
||||
for (std::string_view move : moves) {
|
||||
bool isLegal = board.MakeMove(UTILS::parseMove(board, move));
|
||||
ctx.positionHistory[board.positionIndex] = board.hashKey;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +125,7 @@ void UCILoop(Board &board) {
|
||||
|
||||
// parse UCI "position" command
|
||||
if (input.find("position") != std::string::npos) {
|
||||
ParsePosition(board, input);
|
||||
ParsePosition(board, input, ctx);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user