Rename CASTLE to CASTLING

It is call 'castling move', not 'castle move'

Noticed while reading DiscoCheck sources.

No functional change.
This commit is contained in:
Marco Costalba
2013-12-01 10:25:10 +01:00
parent dd4e5db2be
commit f99cb3dc27
10 changed files with 101 additions and 101 deletions

View File

@@ -259,7 +259,7 @@ template<Color Us>
Score Entry::update_safety(const Position& pos, Square ksq) {
kingSquares[Us] = ksq;
castleRights[Us] = pos.can_castle(Us);
castlingFlags[Us] = pos.can_castle(Us);
minKPdistance[Us] = 0;
Bitboard pawns = pos.pieces(Us, PAWN);
@@ -271,11 +271,11 @@ Score Entry::update_safety(const Position& pos, Square ksq) {
Value bonus = shelter_storm<Us>(pos, ksq);
// If we can castle use the bonus after the castle if it is bigger
if (pos.can_castle(make_castle_right(Us, KING_SIDE)))
// If we can castle use the bonus after the castling if it is bigger
if (pos.can_castle(make_castling_flag(Us, KING_SIDE)))
bonus = std::max(bonus, shelter_storm<Us>(pos, relative_square(Us, SQ_G1)));
if (pos.can_castle(make_castle_right(Us, QUEEN_SIDE)))
if (pos.can_castle(make_castling_flag(Us, QUEEN_SIDE)))
bonus = std::max(bonus, shelter_storm<Us>(pos, relative_square(Us, SQ_C1)));
return kingSafety[Us] = make_score(bonus, -16 * minKPdistance[Us]);