X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=d1642827f540263686c57b5100b98d0e268aa2fc;hp=fa544a1754ae4cb0f6b39ac5157d8afc59091985;hb=b6ab610e2f3d9148e2a75984800cebc0757b7f01;hpb=a98dee783582c84ca2647ca28daad0c9a13d1d35 diff --git a/src/search.cpp b/src/search.cpp index fa544a17..d1642827 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -411,9 +411,8 @@ int perft(Position& pos, Depth depth) /// search-related global variables, and calls root_search(). It returns false /// when a quit command is received during the search. -bool think(const Position& pos, bool infinite, bool ponder, int side_to_move, - int time[], int increment[], int movesToGo, int maxDepth, - int maxNodes, int maxTime, Move searchMoves[]) { +bool think(const Position& pos, bool infinite, bool ponder, int time[], int increment[], + int movesToGo, int maxDepth, int maxNodes, int maxTime, Move searchMoves[]) { // Initialize global search variables StopOnPonderhit = AbortSearch = Quit = AspirationFailLow = false; @@ -486,8 +485,8 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move, TM.wake_sleeping_threads(); // Set thinking time - int myTime = time[side_to_move]; - int myIncrement = increment[side_to_move]; + int myTime = time[pos.side_to_move()]; + int myIncrement = increment[pos.side_to_move()]; if (UseTimeManagement) { if (!movesToGo) // Sudden death time control