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

@@ -37,7 +37,7 @@ struct CheckInfo {
Bitboard dcCandidates;
Bitboard pinned;
Bitboard checkSq[8];
Bitboard checkSq[PIECE_TYPE_NB];
Square ksq;
};
@@ -49,7 +49,7 @@ struct CheckInfo {
struct StateInfo {
Key pawnKey, materialKey;
Value npMaterial[2];
Value npMaterial[COLOR_NB];
int castleRights, rule50, pliesFromNull;
Score psqScore;
Square epSquare;
@@ -62,7 +62,7 @@ struct StateInfo {
struct ReducedStateInfo {
Key pawnKey, materialKey;
Value npMaterial[2];
Value npMaterial[COLOR_NB];
int castleRights, rule50, pliesFromNull;
Score psqScore;
Square epSquare;
@@ -209,17 +209,17 @@ private:
Value compute_non_pawn_material(Color c) const;
// Board and pieces
Piece board[64]; // [square]
Bitboard byTypeBB[8]; // [pieceType]
Bitboard byColorBB[2]; // [color]
int pieceCount[2][8]; // [color][pieceType]
Square pieceList[2][8][16]; // [color][pieceType][index]
int index[64]; // [square]
Piece board[SQUARE_NB];
Bitboard byTypeBB[PIECE_TYPE_NB];
Bitboard byColorBB[COLOR_NB];
int pieceCount[COLOR_NB][PIECE_TYPE_NB];
Square pieceList[COLOR_NB][PIECE_TYPE_NB][16];
int index[SQUARE_NB];
// Other info
int castleRightsMask[64]; // [square]
Square castleRookSquare[2][2]; // [color][side]
Bitboard castlePath[2][2]; // [color][side]
int castleRightsMask[SQUARE_NB];
Square castleRookSquare[COLOR_NB][CASTLING_SIDE_NB];
Bitboard castlePath[COLOR_NB][CASTLING_SIDE_NB];
StateInfo startState;
int64_t nodes;
int startPosPly;