Introduce namespace Material

And retire old struct MaterialTable simplifying the code.

No functional change.
This commit is contained in:
Marco Costalba
2012-12-16 12:00:54 +01:00
parent 52bbf372bb
commit 231f62baf7
6 changed files with 72 additions and 104 deletions

View File

@@ -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);
}