Clarify the mapping of files to queenside
[stockfish] / src / psqt.cpp
index 2b06931c6f9ed87b69347dbe052b1a5b5cebbe47..83d11cf1c1a8fe4e923e86eccf31fc2771a50733 100644 (file)
@@ -119,7 +119,7 @@ void init() {
 
       for (Square s = SQ_A1; s <= SQ_H8; ++s)
       {
-          File f = std::min(file_of(s), ~file_of(s));
+          File f = map_to_queenside(file_of(s));
           psq[ pc][ s] = score + (type_of(pc) == PAWN ? PBonus[rank_of(s)][file_of(s)]
                                                       : Bonus[pc][rank_of(s)][f]);
           psq[~pc][~s] = -psq[pc][s];