mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Introduce namespace Material
And retire old struct MaterialTable simplifying the code. No functional change.
This commit is contained in:
@@ -208,7 +208,7 @@ void Search::think() {
|
||||
if (Options["Contempt Factor"] && !Options["UCI_AnalyseMode"])
|
||||
{
|
||||
int cf = Options["Contempt Factor"] * PawnValueMg / 100; // From centipawns
|
||||
cf = cf * MaterialTable::game_phase(RootPos) / PHASE_MIDGAME; // Scale down with phase
|
||||
cf = cf * Material::game_phase(RootPos) / PHASE_MIDGAME; // Scale down with phase
|
||||
DrawValue[ RootColor] = VALUE_DRAW - Value(cf);
|
||||
DrawValue[~RootColor] = VALUE_DRAW + Value(cf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user