]> git.sesse.net Git - stockfish/blobdiff - src/psqt.cpp
Use a trivially copyable struct for TBTables::Entry instead of a tuple.
[stockfish] / src / psqt.cpp
index 8bad7ed427c5c2dd2f2de48ab9a5bf64b58d8b29..7fa36ac83dd4a4d5b0e8e19f96f59f5699a4a049 100644 (file)
@@ -21,6 +21,7 @@
 #include <algorithm>
 
 #include "types.h"
+#include "bitboard.h"
 
 namespace PSQT {
 
@@ -111,10 +112,10 @@ void init() {
 
       for (Square s = SQ_A1; s <= SQ_H8; ++s)
       {
-          File f = map_to_queenside(file_of(s));
+          File f = File(edge_distance(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];
+          psq[~pc][flip_rank(s)] = -psq[pc][s];
       }
   }
 }