Skip to content

Commit

Permalink
Don't remove shelter weakness penalty
Browse files Browse the repository at this point in the history
  • Loading branch information
glinscott committed Jan 11, 2014
1 parent 8c4efba commit 4dca871
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/pawns.cpp
Expand Up @@ -261,12 +261,8 @@ Value Entry::shelter_storm(const Position& pos, Square ksq) {
if (b) {
Square stormSq = frontmost_sq(Them, b);
rkThem = relative_rank(Us, stormSq);
if (rkThem == rkUs + 1)
if (rkThem == rkUs + 1 || ksq == stormSq + pawn_push(Them))
stormType = 2;
else if (ksq == stormSq + pawn_push(Them)) {
stormType = 2;
safety += ShelterWeakness[rkUs];
}
} else rkThem = RANK_1;
safety -= StormDanger[stormType][rkThem];

Expand Down

0 comments on commit 4dca871

Please sign in to comment.