- Score shelter = make_score(-VALUE_INFINITE, 0);
- evaluate_shelter<Us>(pos, ksq, shelter);
-
- // If we can castle use the bonus after the castling if it is bigger
- if (pos.can_castle(Us | KING_SIDE))
- evaluate_shelter<Us>(pos, relative_square(Us, SQ_G1), shelter);
-
- if (pos.can_castle(Us | QUEEN_SIDE))
- evaluate_shelter<Us>(pos, relative_square(Us, SQ_C1), shelter);
-