X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=fced8e0c974c8a50c1921954ca62e1177975af46;hp=7418b0d325a55ce87bd27d6d42727d51434472c1;hb=e304db9d1ecf6a2318708483c90fadecf4fac4ee;hpb=7c8b7222f5eea024ab480abb2d9289fd1e42da9c diff --git a/src/position.h b/src/position.h index 7418b0d3..fced8e0c 100644 --- a/src/position.h +++ b/src/position.h @@ -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;