Rename some variables for more clarity.

No functional change.

Resolves #131
This commit is contained in:
hxim
2014-12-08 07:53:33 +08:00
committed by Gary Linscott
parent ba1464751d
commit fbb53524ef
14 changed files with 161 additions and 161 deletions

View File

@@ -268,14 +268,14 @@ Score Entry::do_king_safety(const Position& pos, Square ksq) {
kingSquares[Us] = ksq;
castlingRights[Us] = pos.can_castle(Us);
minKPdistance[Us] = 0;
minKingPawnDistance[Us] = 0;
Bitboard pawns = pos.pieces(Us, PAWN);
if (pawns)
while (!(DistanceRingsBB[ksq][minKPdistance[Us]++] & pawns)) {}
while (!(DistanceRingsBB[ksq][minKingPawnDistance[Us]++] & pawns)) {}
if (relative_rank(Us, ksq) > RANK_4)
return make_score(0, -16 * minKPdistance[Us]);
return make_score(0, -16 * minKingPawnDistance[Us]);
Value bonus = shelter_storm<Us>(pos, ksq);
@@ -286,7 +286,7 @@ Score Entry::do_king_safety(const Position& pos, Square ksq) {
if (pos.can_castle(MakeCastling<Us, QUEEN_SIDE>::right))
bonus = std::max(bonus, shelter_storm<Us>(pos, relative_square(Us, SQ_C1)));
return make_score(bonus, -16 * minKPdistance[Us]);
return make_score(bonus, -16 * minKingPawnDistance[Us]);
}
// Explicit template instantiation