X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=d07db40f4d749d852d061f77dab6ed6fdae4757b;hp=09d272e56983361fe813032c0051adf011169aac;hb=e304db9d1ecf6a2318708483c90fadecf4fac4ee;hpb=55bd27b8f08a151128d7065fa2819aa3e9605299 diff --git a/src/search.cpp b/src/search.cpp index 09d272e5..d07db40f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -42,6 +42,7 @@ namespace Search { LimitsType Limits; std::vector RootMoves; Position RootPosition; + Color RootColor; Time::point SearchTime; StateStackPtr SetupStates; } @@ -91,7 +92,7 @@ namespace { int BestMoveChanges; int SkillLevel; bool SkillLevelEnabled, Chess960; - Value DrawValue[2]; + Value DrawValue[COLOR_NB]; History H; template @@ -174,7 +175,7 @@ void Search::think() { Position& pos = RootPosition; Chess960 = pos.is_chess960(); - Eval::RootColor = pos.side_to_move(); + RootColor = pos.side_to_move(); TimeMgr.init(Limits, pos.startpos_ply_counter(), pos.side_to_move()); TT.new_search(); H.clear(); @@ -192,8 +193,8 @@ void Search::think() { { int cf = Options["Contempt Factor"] * PawnValueMg / 100; // In centipawns cf = cf * MaterialTable::game_phase(pos) / PHASE_MIDGAME; // Scale down with phase - DrawValue[ Eval::RootColor] = VALUE_DRAW - Value(cf); - DrawValue[~Eval::RootColor] = VALUE_DRAW + Value(cf); + DrawValue[ RootColor] = VALUE_DRAW - Value(cf); + DrawValue[~RootColor] = VALUE_DRAW + Value(cf); } else DrawValue[WHITE] = DrawValue[BLACK] = VALUE_DRAW;