Use self-describing constants instead of numbers

And remove now useless comments.

No functional change.
This commit is contained in:
Marco Costalba
2012-10-21 10:41:23 +02:00
parent 6b909b2343
commit e304db9d1e
16 changed files with 123 additions and 117 deletions

View File

@@ -52,9 +52,9 @@ public:
private:
Key key;
int16_t value;
uint8_t factor[2];
uint8_t factor[COLOR_NB];
EndgameBase<Value>* evaluationFunction;
EndgameBase<ScaleFactor>* scalingFunction[2];
EndgameBase<ScaleFactor>* scalingFunction[COLOR_NB];
int spaceWeight;
Phase gamePhase;
};
@@ -67,7 +67,7 @@ struct MaterialTable {
MaterialEntry* probe(const Position& pos);
static Phase game_phase(const Position& pos);
template<Color Us> static int imbalance(const int pieceCount[][8]);
template<Color Us> static int imbalance(const int pieceCount[][PIECE_TYPE_NB]);
HashTable<MaterialEntry, MaterialTableSize> entries;
Endgames endgames;